diff options
| author | 2015-07-29 11:54:44 -0300 | |
|---|---|---|
| committer | 2015-08-16 01:03:46 -0300 | |
| commit | e2c7954be5ccabc7c5f87000db01cef040ca4b47 (patch) | |
| tree | 5b3288c66f6941a9d6be0f2907c3526bb3b7e6ac /src/core/memory.h | |
| parent | Process: Store kernel compatibility version during loading (diff) | |
| download | yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.gz yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.xz yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.zip | |
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.
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index 2a06cc6c3..e6da3e2a5 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -124,6 +124,17 @@ void WriteBlock(VAddr addr, const u8* data, size_t size); | |||
| 124 | u8* GetPointer(VAddr virtual_address); | 124 | u8* GetPointer(VAddr virtual_address); |
| 125 | 125 | ||
| 126 | /** | 126 | /** |
| 127 | * Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical | ||
| 128 | * address. This should be used by services to translate addresses for use by the hardware. | ||
| 129 | */ | ||
| 130 | PAddr VirtualToPhysicalAddress(VAddr addr); | ||
| 131 | |||
| 132 | /** | ||
| 133 | * Undoes a mapping performed by VirtualToPhysicalAddress(). | ||
| 134 | */ | ||
| 135 | VAddr PhysicalToVirtualAddress(PAddr addr); | ||
| 136 | |||
| 137 | /** | ||
| 127 | * Gets a pointer to the memory region beginning at the specified physical address. | 138 | * Gets a pointer to the memory region beginning at the specified physical address. |
| 128 | * | 139 | * |
| 129 | * @note This is currently implemented using PhysicalToVirtualAddress(). | 140 | * @note This is currently implemented using PhysicalToVirtualAddress(). |