Memory: move GetPhysicalPointer and IsValidPhysicalAddress into class

This commit is contained in:
Weiyi Wang
2018-11-21 12:01:19 -05:00
parent cfee59c6db
commit 296c458e0e
18 changed files with 76 additions and 65 deletions

View File

@ -83,7 +83,7 @@ MemoryRegionInfo* KernelSystem::GetMemoryRegion(MemoryRegion region) {
}
}
void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mapping) {
void KernelSystem::HandleSpecialMapping(VMManager& address_space, const AddressMapping& mapping) {
using namespace Memory;
struct MemoryArea {
@ -128,7 +128,7 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
return;
}
u8* target_pointer = Memory::GetPhysicalPointer(area->paddr_base + offset_into_region);
u8* target_pointer = memory.GetPhysicalPointer(area->paddr_base + offset_into_region);
// TODO(yuriks): This flag seems to have some other effect, but it's unknown what
MemoryState memory_state = mapping.unk_flag ? MemoryState::Static : MemoryState::IO;