summaryrefslogtreecommitdiff
path: root/src/core/mem_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/mem_map.cpp')
-rw-r--r--src/core/mem_map.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/core/mem_map.cpp b/src/core/mem_map.cpp
index cf12f24d9..74a93b1d9 100644
--- a/src/core/mem_map.cpp
+++ b/src/core/mem_map.cpp
@@ -11,38 +11,38 @@
11 11
12namespace Memory { 12namespace Memory {
13 13
14u8* g_base = NULL; ///< The base pointer to the auto-mirrored arena. 14u8* g_base = nullptr; ///< The base pointer to the auto-mirrored arena.
15 15
16MemArena g_arena; ///< The MemArena class 16static MemArena arena; ///< The MemArena class
17 17
18u8* g_exefs_code = NULL; ///< ExeFS:/.code is loaded here 18u8* g_exefs_code = nullptr; ///< ExeFS:/.code is loaded here
19u8* g_system_mem = NULL; ///< System memory 19u8* g_system_mem = nullptr; ///< System memory
20u8* g_heap = NULL; ///< Application heap (main memory) 20u8* g_heap = nullptr; ///< Application heap (main memory)
21u8* g_heap_gsp = NULL; ///< GSP heap (main memory) 21u8* g_heap_gsp = nullptr; ///< GSP heap (main memory)
22u8* g_vram = NULL; ///< Video memory (VRAM) pointer 22u8* g_vram = nullptr; ///< Video memory (VRAM) pointer
23u8* g_shared_mem = NULL; ///< Shared memory 23u8* g_shared_mem = nullptr; ///< Shared memory
24u8* g_kernel_mem; ///< Kernel memory 24u8* g_kernel_mem; ///< Kernel memory
25 25
26u8* g_physical_bootrom = NULL; ///< Bootrom physical memory 26static u8* physical_bootrom = nullptr; ///< Bootrom physical memory
27u8* g_uncached_bootrom = NULL; 27static u8* uncached_bootrom = nullptr;
28 28
29u8* g_physical_exefs_code = NULL; ///< Phsical ExeFS:/.code is loaded here 29static u8* physical_exefs_code = nullptr; ///< Phsical ExeFS:/.code is loaded here
30u8* g_physical_system_mem = NULL; ///< System physical memory 30static u8* physical_system_mem = nullptr; ///< System physical memory
31u8* g_physical_fcram = NULL; ///< Main physical memory (FCRAM) 31static u8* physical_fcram = nullptr; ///< Main physical memory (FCRAM)
32u8* g_physical_heap_gsp = NULL; ///< GSP heap physical memory 32static u8* physical_heap_gsp = nullptr; ///< GSP heap physical memory
33u8* g_physical_vram = NULL; ///< Video physical memory (VRAM) 33static u8* physical_vram = nullptr; ///< Video physical memory (VRAM)
34u8* g_physical_shared_mem = NULL; ///< Physical shared memory 34static u8* physical_shared_mem = nullptr; ///< Physical shared memory
35u8* g_physical_kernel_mem; ///< Kernel memory 35static u8* physical_kernel_mem; ///< Kernel memory
36 36
37// We don't declare the IO region in here since its handled by other means. 37// We don't declare the IO region in here since its handled by other means.
38static MemoryView g_views[] = { 38static MemoryView g_views[] = {
39 {&g_exefs_code, &g_physical_exefs_code, EXEFS_CODE_VADDR, EXEFS_CODE_SIZE, 0}, 39 {&g_exefs_code, &physical_exefs_code, EXEFS_CODE_VADDR, EXEFS_CODE_SIZE, 0},
40 {&g_vram, &g_physical_vram, VRAM_VADDR, VRAM_SIZE, 0}, 40 {&g_vram, &physical_vram, VRAM_VADDR, VRAM_SIZE, 0},
41 {&g_heap, &g_physical_fcram, HEAP_VADDR, HEAP_SIZE, MV_IS_PRIMARY_RAM}, 41 {&g_heap, &physical_fcram, HEAP_VADDR, HEAP_SIZE, MV_IS_PRIMARY_RAM},
42 {&g_shared_mem, &g_physical_shared_mem, SHARED_MEMORY_VADDR, SHARED_MEMORY_SIZE, 0}, 42 {&g_shared_mem, &physical_shared_mem, SHARED_MEMORY_VADDR, SHARED_MEMORY_SIZE, 0},
43 {&g_system_mem, &g_physical_system_mem, SYSTEM_MEMORY_VADDR, SYSTEM_MEMORY_SIZE, 0}, 43 {&g_system_mem, &physical_system_mem, SYSTEM_MEMORY_VADDR, SYSTEM_MEMORY_SIZE, 0},
44 {&g_kernel_mem, &g_physical_kernel_mem, KERNEL_MEMORY_VADDR, KERNEL_MEMORY_SIZE, 0}, 44 {&g_kernel_mem, &physical_kernel_mem, KERNEL_MEMORY_VADDR, KERNEL_MEMORY_SIZE, 0},
45 {&g_heap_gsp, &g_physical_heap_gsp, HEAP_GSP_VADDR, HEAP_GSP_SIZE, 0}, 45 {&g_heap_gsp, &physical_heap_gsp, HEAP_GSP_VADDR, HEAP_GSP_SIZE, 0},
46}; 46};
47 47
48/*static MemoryView views[] = 48/*static MemoryView views[] =
@@ -69,18 +69,18 @@ void Init() {
69 g_views[i].size = FCRAM_SIZE; 69 g_views[i].size = FCRAM_SIZE;
70 } 70 }
71 71
72 g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &g_arena); 72 g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &arena);
73 73
74 NOTICE_LOG(MEMMAP, "initialized OK, RAM at %p (mirror at 0 @ %p)", g_heap, 74 NOTICE_LOG(MEMMAP, "initialized OK, RAM at %p (mirror at 0 @ %p)", g_heap,
75 g_physical_fcram); 75 physical_fcram);
76} 76}
77 77
78void Shutdown() { 78void Shutdown() {
79 u32 flags = 0; 79 u32 flags = 0;
80 MemoryMap_Shutdown(g_views, kNumMemViews, flags, &g_arena); 80 MemoryMap_Shutdown(g_views, kNumMemViews, flags, &arena);
81 81
82 g_arena.ReleaseSpace(); 82 arena.ReleaseSpace();
83 g_base = NULL; 83 g_base = nullptr;
84 84
85 NOTICE_LOG(MEMMAP, "shutdown OK"); 85 NOTICE_LOG(MEMMAP, "shutdown OK");
86} 86}