Memory: Add TryVirtualToPhysicalAddress, returning a boost::optional
This commit is contained in:
parent
326e7c7020
commit
6ae0086b39
2 changed files with 23 additions and 7 deletions
|
@ -149,9 +149,17 @@ u8* GetPointer(VAddr virtual_address);
|
|||
std::string ReadCString(VAddr virtual_address, std::size_t max_length);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
* 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.
|
||||
*/
|
||||
boost::optional<PAddr> TryVirtualToPhysicalAddress(VAddr addr);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @deprecated Use TryVirtualToPhysicalAddress(), which reports failure.
|
||||
*/
|
||||
PAddr VirtualToPhysicalAddress(VAddr addr);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue