diff options
| author | 2015-05-09 03:08:11 -0300 | |
|---|---|---|
| committer | 2015-05-09 03:08:11 -0300 | |
| commit | 28a9e4c1d55c66e99b5cf16fda00dcb75ab27fde (patch) | |
| tree | 9c40b519bff8a84c948b9343367763781cb64454 /src/core/mem_map.h | |
| parent | Memory: Sort memory region variables by VAddr (diff) | |
| download | yuzu-28a9e4c1d55c66e99b5cf16fda00dcb75ab27fde.tar.gz yuzu-28a9e4c1d55c66e99b5cf16fda00dcb75ab27fde.tar.xz yuzu-28a9e4c1d55c66e99b5cf16fda00dcb75ab27fde.zip | |
Memory: Support more regions in the VAddr-PAddr translation functions
Also adds better documentation and removes the one-off reimplementation
of the function in pica.h.
Diffstat (limited to 'src/core/mem_map.h')
| -rw-r--r-- | src/core/mem_map.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/mem_map.h b/src/core/mem_map.h index 1591fc0a9..5a08cc105 100644 --- a/src/core/mem_map.h +++ b/src/core/mem_map.h | |||
| @@ -181,10 +181,15 @@ inline const char* GetCharPointer(const VAddr address) { | |||
| 181 | return (const char *)GetPointer(address); | 181 | return (const char *)GetPointer(address); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /// Converts a physical address to virtual address | 184 | /** |
| 185 | VAddr PhysicalToVirtualAddress(PAddr addr); | 185 | * Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical |
| 186 | 186 | * address. This should be used by services to translate addresses for use by the hardware. | |
| 187 | /// Converts a virtual address to physical address | 187 | */ |
| 188 | PAddr VirtualToPhysicalAddress(VAddr addr); | 188 | PAddr VirtualToPhysicalAddress(VAddr addr); |
| 189 | 189 | ||
| 190 | /** | ||
| 191 | * Undoes a mapping performed by VirtualToPhysicalAddress(). | ||
| 192 | */ | ||
| 193 | VAddr PhysicalToVirtualAddress(PAddr addr); | ||
| 194 | |||
| 190 | } // namespace | 195 | } // namespace |