summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-07-29 16:54:44 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-16 06:03:46 +0200
commite2c7954be5ccabc7c5f87000db01cef040ca4b47 (patch)
tree5b3288c66f6941a9d6be0f2907c3526bb3b7e6ac /src/core/memory.h
parentProcess: Store kernel compatibility version during loading (diff)
downloadyuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.gz
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.bz2
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.lz
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.xz
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.tar.zst
yuzu-e2c7954be5ccabc7c5f87000db01cef040ca4b47.zip
Diffstat (limited to '')
-rw-r--r--src/core/memory.h11
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);
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.
*
* @note This is currently implemented using PhysicalToVirtualAddress().