summaryrefslogtreecommitdiff
path: root/src/core/mem_map.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-24 23:56:06 -0400
committerGravatar bunnei2014-04-24 23:56:06 -0400
commit890c7261d2d6d6a760512ebe93c565ee87220983 (patch)
tree7d822f01da90c37c188faa76578c0d1733136d06 /src/core/mem_map.h
parentadded functions to map Heap and Shared memory space (diff)
downloadyuzu-890c7261d2d6d6a760512ebe93c565ee87220983.tar.gz
yuzu-890c7261d2d6d6a760512ebe93c565ee87220983.tar.xz
yuzu-890c7261d2d6d6a760512ebe93c565ee87220983.zip
- added preliminary support for svc_MapMemoryBlock
- added shared memory region - moarrrr cleanups to memory_map
Diffstat (limited to 'src/core/mem_map.h')
-rw-r--r--src/core/mem_map.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/mem_map.h b/src/core/mem_map.h
index 5346d04ee..ab96e210f 100644
--- a/src/core/mem_map.h
+++ b/src/core/mem_map.h
@@ -21,8 +21,11 @@ enum {
21 SCRATCHPAD_SIZE = 0x00004000, ///< Typical stack size - TODO: Read from exheader 21 SCRATCHPAD_SIZE = 0x00004000, ///< Typical stack size - TODO: Read from exheader
22 HEAP_GSP_SIZE = 0x02000000, ///< GSP heap size... TODO: Define correctly? 22 HEAP_GSP_SIZE = 0x02000000, ///< GSP heap size... TODO: Define correctly?
23 HEAP_SIZE = FCRAM_SIZE, ///< Application heap size 23 HEAP_SIZE = FCRAM_SIZE, ///< Application heap size
24 SHARED_MEMORY_SIZE = 0x04000000, ///< Shared memory size
25 HARDWARE_IO_SIZE = 0x01000000,
24 26
25 SHARED_MEMORY_VADDR = 0x10000000, ///< Shared memory 27 SHARED_MEMORY_VADDR = 0x10000000, ///< Shared memory
28 SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
26 29
27 HEAP_PADDR = HEAP_GSP_SIZE, 30 HEAP_PADDR = HEAP_GSP_SIZE,
28 HEAP_PADDR_END = (HEAP_PADDR + HEAP_SIZE), 31 HEAP_PADDR_END = (HEAP_PADDR + HEAP_SIZE),
@@ -38,12 +41,17 @@ enum {
38 SCRATCHPAD_MASK = (SCRATCHPAD_SIZE - 1), ///< Scratchpad memory mask 41 SCRATCHPAD_MASK = (SCRATCHPAD_SIZE - 1), ///< Scratchpad memory mask
39 HEAP_GSP_MASK = (HEAP_GSP_SIZE - 1), 42 HEAP_GSP_MASK = (HEAP_GSP_SIZE - 1),
40 HEAP_MASK = (HEAP_SIZE - 1), 43 HEAP_MASK = (HEAP_SIZE - 1),
44 SHARED_MEMORY_MASK = (SHARED_MEMORY_SIZE - 1),
41 45
42 FCRAM_PADDR = 0x20000000, ///< FCRAM physical address 46 FCRAM_PADDR = 0x20000000, ///< FCRAM physical address
43 FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space 47 FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space
44 FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address 48 FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address
45 FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space 49 FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space
46 50
51 HARDWARE_IO_VADDR = 0x1EC00000,
52 HARDWARE_IO_VADDR_END = (HARDWARE_IO_VADDR + HARDWARE_IO_SIZE),
53
54
47 VRAM_VADDR = 0x1F000000, 55 VRAM_VADDR = 0x1F000000,
48 SCRATCHPAD_VADDR_END = 0x10000000, 56 SCRATCHPAD_VADDR_END = 0x10000000,
49 SCRATCHPAD_VADDR = (SCRATCHPAD_VADDR_END - SCRATCHPAD_SIZE), ///< Stack space 57 SCRATCHPAD_VADDR = (SCRATCHPAD_VADDR_END - SCRATCHPAD_SIZE), ///< Stack space
@@ -84,6 +92,7 @@ extern u8 *g_base;
84extern u8* g_heap_gsp; ///< GSP heap (main memory) 92extern u8* g_heap_gsp; ///< GSP heap (main memory)
85extern u8* g_heap; ///< Application heap (main memory) 93extern u8* g_heap; ///< Application heap (main memory)
86extern u8* g_vram; ///< Video memory (VRAM) 94extern u8* g_vram; ///< Video memory (VRAM)
95extern u8* g_shared_mem; ///< Shared memory
87 96
88void Init(); 97void Init();
89void Shutdown(); 98void Shutdown();