Memory: Add GetPhysicalPointer helper function

This commit is contained in:
Yuri Kunde Schlesner 2015-05-09 04:02:32 -03:00
parent 28a9e4c1d5
commit 17a8cae003
7 changed files with 28 additions and 19 deletions

View file

@ -192,4 +192,13 @@ PAddr VirtualToPhysicalAddress(VAddr addr);
*/
VAddr PhysicalToVirtualAddress(PAddr addr);
/**
* Gets a pointer to the memory region beginning at the specified physical address.
*
* @note This is currently implemented using PhysicalToVirtualAddress().
*/
inline u8* GetPhysicalPointer(PAddr address) {
return GetPointer(PhysicalToVirtualAddress(address));
}
} // namespace