Memory: Move address type conversion routines to memory.cpp/h

These helpers aren't really part of the kernel, and mem_map.cpp/h is
going to be moved there next.
This commit is contained in:
Yuri Kunde Schlesner 2015-07-29 11:54:44 -03:00
parent a12a30c9e0
commit e2c7954be5
9 changed files with 47 additions and 53 deletions

View file

@ -123,6 +123,17 @@ void WriteBlock(VAddr addr, const u8* data, size_t size);
u8* GetPointer(VAddr virtual_address);
/**
* Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical
* address. This should be used by services to translate addresses for use by the hardware.
*/
PAddr VirtualToPhysicalAddress(VAddr addr);
/**
* Undoes a mapping performed by VirtualToPhysicalAddress().
*/
VAddr PhysicalToVirtualAddress(PAddr addr);
/**
* Gets a pointer to the memory region beginning at the specified physical address.
*