summaryrefslogtreecommitdiffstats
path: root/src/core/memory_setup.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-13 04:38:56 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-15 05:04:43 +0200
commitdd4430609afce172542fba1d2cd53c3029f182ce (patch)
treea04ba64d18dd163709b1cb4b4212afaca6c091a6 /src/core/memory_setup.h
parentMemory: Read SharedPage directly from Memory::Read (diff)
downloadyuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar.gz
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar.bz2
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar.lz
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar.xz
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.tar.zst
yuzu-dd4430609afce172542fba1d2cd53c3029f182ce.zip
Diffstat (limited to 'src/core/memory_setup.h')
-rw-r--r--src/core/memory_setup.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/memory_setup.h b/src/core/memory_setup.h
new file mode 100644
index 000000000..46263495f
--- /dev/null
+++ b/src/core/memory_setup.h
@@ -0,0 +1,29 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+
+namespace Memory {
+
+void InitMemoryMap();
+
+/**
+ * Maps an allocated buffer onto a region of the emulated process address space.
+ *
+ * @param base The address to start mapping at. Must be page-aligned.
+ * @param size The amount of bytes to map. Must be page-aligned.
+ * @param target Buffer with the memory backing the mapping. Must be of length at least `size`.
+ */
+void MapMemoryRegion(VAddr base, u32 size, u8* target);
+
+/**
+ * Maps a region of the emulated process address space as a IO region.
+ * @note Currently this can only be used to mark a region as being IO, since actual memory-mapped
+ * IO isn't yet supported.
+ */
+void MapIoRegion(VAddr base, u32 size);
+
+}