Memory: move GetFCRAMOffset into MemorySystem
This commit is contained in:
parent
8118be6615
commit
b199b7ada9
|
@ -218,7 +218,7 @@ ResultCode Process::HeapFree(VAddr target, u32 size) {
|
|||
// Free heaps block by block
|
||||
CASCADE_RESULT(auto backing_blocks, vm_manager.GetBackingBlocksForRange(target, size));
|
||||
for (const auto [backing_memory, block_size] : backing_blocks) {
|
||||
memory_region->Free(Memory::GetFCRAMOffset(backing_memory), block_size);
|
||||
memory_region->Free(kernel.memory.GetFCRAMOffset(backing_memory), block_size);
|
||||
}
|
||||
|
||||
ResultCode result = vm_manager.UnmapRange(target, size);
|
||||
|
|
|
@ -739,7 +739,7 @@ void WriteMMIO<u64>(MMIORegionPointer mmio_handler, VAddr addr, const u64 data)
|
|||
mmio_handler->Write64(addr, data);
|
||||
}
|
||||
|
||||
u32 GetFCRAMOffset(u8* pointer) {
|
||||
u32 MemorySystem::GetFCRAMOffset(u8* pointer) {
|
||||
ASSERT(pointer >= fcram.data() && pointer < fcram.data() + fcram.size());
|
||||
return pointer - fcram.data();
|
||||
}
|
||||
|
|
|
@ -251,11 +251,10 @@ enum class FlushMode {
|
|||
*/
|
||||
void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode);
|
||||
|
||||
class MemorySystem {
|
||||
public:
|
||||
/// Gets offset in FCRAM from a pointer inside FCRAM range
|
||||
u32 GetFCRAMOffset(u8* pointer);
|
||||
|
||||
class MemorySystem {
|
||||
|
||||
};
|
||||
|
||||
} // namespace Memory
|
||||
|
|
Loading…
Reference in New Issue