summaryrefslogtreecommitdiff
path: root/src/core/memory_setup.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-05-14 20:40:53 -0700
committerGravatar Yuri Kunde Schlesner2015-05-14 20:40:53 -0700
commitbb689338943791c735c7c6adb186256457e064b4 (patch)
treea04ba64d18dd163709b1cb4b4212afaca6c091a6 /src/core/memory_setup.h
parentMerge pull request #769 from lioncash/cond (diff)
parentMemory: Use a table based lookup scheme to read from memory regions (diff)
downloadyuzu-bb689338943791c735c7c6adb186256457e064b4.tar.gz
yuzu-bb689338943791c735c7c6adb186256457e064b4.tar.xz
yuzu-bb689338943791c735c7c6adb186256457e064b4.zip
Merge pull request #762 from yuriks/memmap
Memory: Use a table based lookup scheme to read from memory regions
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 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_types.h"
8
9namespace Memory {
10
11void InitMemoryMap();
12
13/**
14 * Maps an allocated buffer onto a region of the emulated process address space.
15 *
16 * @param base The address to start mapping at. Must be page-aligned.
17 * @param size The amount of bytes to map. Must be page-aligned.
18 * @param target Buffer with the memory backing the mapping. Must be of length at least `size`.
19 */
20void MapMemoryRegion(VAddr base, u32 size, u8* target);
21
22/**
23 * Maps a region of the emulated process address space as a IO region.
24 * @note Currently this can only be used to mark a region as being IO, since actual memory-mapped
25 * IO isn't yet supported.
26 */
27void MapIoRegion(VAddr base, u32 size);
28
29}