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

@ -183,8 +183,6 @@ extern std::array<u8, Memory::FCRAM_N3DS_SIZE> fcram;
/// Determines if the given VAddr is valid for the specified process.
bool IsValidVirtualAddress(const Kernel::Process& process, VAddr vaddr);
bool IsValidPhysicalAddress(PAddr paddr);
u8 Read8(VAddr addr);
u16 Read16(VAddr addr);
u32 Read32(VAddr addr);
@ -207,11 +205,6 @@ u8* GetPointer(VAddr vaddr);
std::string ReadCString(VAddr vaddr, std::size_t max_length);
/**
* Gets a pointer to the memory region beginning at the specified physical address.
*/
u8* GetPhysicalPointer(PAddr address);
/**
* Mark each page touching the region as cached.
*/
@ -253,6 +246,13 @@ public:
void SetCurrentPageTable(PageTable* page_table);
PageTable* GetCurrentPageTable();
/**
* Gets a pointer to the memory region beginning at the specified physical address.
*/
u8* GetPhysicalPointer(PAddr address);
bool IsValidPhysicalAddress(PAddr paddr);
/// Gets offset in FCRAM from a pointer inside FCRAM range
u32 GetFCRAMOffset(u8* pointer);
};