summaryrefslogtreecommitdiffstats
path: root/src/core/mem_map.h
diff options
context:
space:
mode:
authorpurpasmart96 <kanzoconfigz@hotmail.com>2014-12-04 06:36:32 +0100
committerpurpasmart96 <kanzoconfigz@hotmail.com>2014-12-14 03:29:57 +0100
commit23ae8aa4d344fb5661b5801ae3dcdd709469a718 (patch)
tree503300ab215295d51be3093eed2592b349bcd8cc /src/core/mem_map.h
parentMerge pull request #274 from lioncash/kernel (diff)
downloadyuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar.gz
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar.bz2
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar.lz
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar.xz
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.tar.zst
yuzu-23ae8aa4d344fb5661b5801ae3dcdd709469a718.zip
Diffstat (limited to '')
-rw-r--r--src/core/mem_map.h135
1 files changed, 76 insertions, 59 deletions
diff --git a/src/core/mem_map.h b/src/core/mem_map.h
index 7b750f848..4d47fc171 100644
--- a/src/core/mem_map.h
+++ b/src/core/mem_map.h
@@ -17,67 +17,84 @@ typedef u32 PAddr; ///< Represents a pointer in the physical address space.
////////////////////////////////////////////////////////////////////////////////////////////////////
enum : u32 {
- BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size
- MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size
- AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size
-
- FCRAM_SIZE = 0x08000000, ///< FCRAM size
- FCRAM_PADDR = 0x20000000, ///< FCRAM physical address
- FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space
- FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address
- FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space
-
- SHARED_MEMORY_SIZE = 0x04000000, ///< Shared memory size
- SHARED_MEMORY_VADDR = 0x10000000, ///< Shared memory
- SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
-
- DSP_MEMORY_SIZE = 0x00080000, ///< DSP memory size
- DSP_MEMORY_VADDR = 0x1FF00000, ///< DSP memory virtual address
-
- CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
- CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
- CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),
-
- KERNEL_MEMORY_SIZE = 0x00001000, ///< Kernel memory size
- KERNEL_MEMORY_VADDR = 0xFFFF0000, ///< Kernel memory where the kthread objects etc are
- KERNEL_MEMORY_VADDR_END = (KERNEL_MEMORY_VADDR + KERNEL_MEMORY_SIZE),
-
- EXEFS_CODE_SIZE = 0x03F00000,
- EXEFS_CODE_VADDR = 0x00100000, ///< ExeFS:/.code is loaded here
- EXEFS_CODE_VADDR_END = (EXEFS_CODE_VADDR + EXEFS_CODE_SIZE),
+ BOOTROM_SIZE = 0x00010000, ///< Bootrom (super secret code/data @ 0x8000) size
+ BOOTROM_PADDR = 0x00000000, ///< Bootrom physical address
+ BOOTROM_PADDR_END = (BOOTROM_PADDR + BOOTROM_SIZE),
+
+ BOOTROM_MIRROR_SIZE = 0x00010000, ///< Bootrom Mirror size
+ BOOTROM_MIRROR_PADDR = 0x00010000, ///< Bootrom Mirror physical address
+ BOOTROM_MIRROR_PADDR_END = (BOOTROM_MIRROR_PADDR + BOOTROM_MIRROR_SIZE),
+
+ MPCORE_PRIV_SIZE = 0x00002000, ///< MPCore private memory region size
+ MPCORE_PRIV_PADDR = 0x17E00000, ///< MPCore private memory region physical address
+ MPCORE_PRIV_PADDR_END = (MPCORE_PRIV_PADDR + MPCORE_PRIV_SIZE),
+
+ FCRAM_SIZE = 0x08000000, ///< FCRAM size
+ FCRAM_PADDR = 0x20000000, ///< FCRAM physical address
+ FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space
+ FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address
+ FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space
+
+ AXI_WRAM_SIZE = 0x00080000, ///< AXI WRAM size
+ AXI_WRAM_PADDR = 0x1FF80000, ///< AXI WRAM physical address
+ AXI_WRAM_PADDR_END = (AXI_WRAM_PADDR + AXI_WRAM_SIZE),
+
+ SHARED_MEMORY_SIZE = 0x04000000, ///< Shared memory size
+ SHARED_MEMORY_VADDR = 0x10000000, ///< Shared memory
+ SHARED_MEMORY_VADDR_END = (SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE),
+
+ DSP_MEMORY_SIZE = 0x00080000, ///< DSP memory size
+ DSP_MEMORY_VADDR = 0x1FF00000, ///< DSP memory virtual address
+ DSP_MEMORY_VADDR_END = (DSP_MEMORY_VADDR + DSP_MEMORY_SIZE),
+
+ CONFIG_MEMORY_SIZE = 0x00001000, ///< Configuration memory size
+ CONFIG_MEMORY_VADDR = 0x1FF80000, ///< Configuration memory virtual address
+ CONFIG_MEMORY_VADDR_END = (CONFIG_MEMORY_VADDR + CONFIG_MEMORY_SIZE),
+
+ SHARED_PAGE_SIZE = 0x00001000, ///< Shared page size
+ SHARED_PAGE_VADDR = 0x1FF81000, ///< Shared page virtual address
+ SHARED_PAGE_VADDR_END = (SHARED_PAGE_VADDR + SHARED_PAGE_SIZE),
+
+ KERNEL_MEMORY_SIZE = 0x00001000, ///< Kernel memory size
+ KERNEL_MEMORY_VADDR = 0xFFFF0000, ///< Kernel memory where the kthread objects etc are
+ KERNEL_MEMORY_VADDR_END = (KERNEL_MEMORY_VADDR + KERNEL_MEMORY_SIZE),
+
+ EXEFS_CODE_SIZE = 0x03F00000,
+ EXEFS_CODE_VADDR = 0x00100000, ///< ExeFS:/.code is loaded here
+ EXEFS_CODE_VADDR_END = (EXEFS_CODE_VADDR + EXEFS_CODE_SIZE),
// Region of FCRAM used by system
- SYSTEM_MEMORY_SIZE = 0x02C00000, ///< 44MB
- SYSTEM_MEMORY_VADDR = 0x04000000,
- SYSTEM_MEMORY_VADDR_END = (SYSTEM_MEMORY_VADDR + SYSTEM_MEMORY_SIZE),
-
- HEAP_SIZE = FCRAM_SIZE, ///< Application heap size
- //HEAP_PADDR = HEAP_GSP_SIZE,
- //HEAP_PADDR_END = (HEAP_PADDR + HEAP_SIZE),
- HEAP_VADDR = 0x08000000,
- HEAP_VADDR_END = (HEAP_VADDR + HEAP_SIZE),
-
- HEAP_LINEAR_SIZE = 0x08000000, ///< Linear heap size... TODO: Define correctly?
- HEAP_LINEAR_VADDR = 0x14000000,
- HEAP_LINEAR_VADDR_END = (HEAP_LINEAR_VADDR + HEAP_LINEAR_SIZE),
- HEAP_LINEAR_PADDR = 0x00000000,
- HEAP_LINEAR_PADDR_END = (HEAP_LINEAR_PADDR + HEAP_LINEAR_SIZE),
-
- HARDWARE_IO_SIZE = 0x01000000,
- HARDWARE_IO_PADDR = 0x10000000, ///< IO physical address start
- HARDWARE_IO_VADDR = 0x1EC00000, ///< IO virtual address start
- HARDWARE_IO_PADDR_END = (HARDWARE_IO_PADDR + HARDWARE_IO_SIZE),
- HARDWARE_IO_VADDR_END = (HARDWARE_IO_VADDR + HARDWARE_IO_SIZE),
-
- VRAM_SIZE = 0x00600000,
- VRAM_PADDR = 0x18000000,
- VRAM_VADDR = 0x1F000000,
- VRAM_PADDR_END = (VRAM_PADDR + VRAM_SIZE),
- VRAM_VADDR_END = (VRAM_VADDR + VRAM_SIZE),
-
- SCRATCHPAD_SIZE = 0x00004000, ///< Typical stack size - TODO: Read from exheader
- SCRATCHPAD_VADDR_END = 0x10000000,
- SCRATCHPAD_VADDR = (SCRATCHPAD_VADDR_END - SCRATCHPAD_SIZE), ///< Stack space
+ SYSTEM_MEMORY_SIZE = 0x02C00000, ///< 44MB
+ SYSTEM_MEMORY_VADDR = 0x04000000,
+ SYSTEM_MEMORY_VADDR_END = (SYSTEM_MEMORY_VADDR + SYSTEM_MEMORY_SIZE),
+
+ HEAP_SIZE = FCRAM_SIZE, ///< Application heap size
+ //HEAP_PADDR = HEAP_GSP_SIZE,
+ //HEAP_PADDR_END = (HEAP_PADDR + HEAP_SIZE),
+ HEAP_VADDR = 0x08000000,
+ HEAP_VADDR_END = (HEAP_VADDR + HEAP_SIZE),
+
+ HEAP_LINEAR_SIZE = 0x08000000, ///< Linear heap size... TODO: Define correctly?
+ HEAP_LINEAR_VADDR = 0x14000000,
+ HEAP_LINEAR_VADDR_END = (HEAP_LINEAR_VADDR + HEAP_LINEAR_SIZE),
+ HEAP_LINEAR_PADDR = 0x00000000,
+ HEAP_LINEAR_PADDR_END = (HEAP_LINEAR_PADDR + HEAP_LINEAR_SIZE),
+
+ HARDWARE_IO_SIZE = 0x01000000,
+ HARDWARE_IO_PADDR = 0x10000000, ///< IO physical address start
+ HARDWARE_IO_VADDR = 0x1EC00000, ///< IO virtual address start
+ HARDWARE_IO_PADDR_END = (HARDWARE_IO_PADDR + HARDWARE_IO_SIZE),
+ HARDWARE_IO_VADDR_END = (HARDWARE_IO_VADDR + HARDWARE_IO_SIZE),
+
+ VRAM_SIZE = 0x00600000,
+ VRAM_PADDR = 0x18000000,
+ VRAM_VADDR = 0x1F000000,
+ VRAM_PADDR_END = (VRAM_PADDR + VRAM_SIZE),
+ VRAM_VADDR_END = (VRAM_VADDR + VRAM_SIZE),
+
+ SCRATCHPAD_SIZE = 0x00004000, ///< Typical stack size - TODO: Read from exheader
+ SCRATCHPAD_VADDR_END = 0x10000000,
+ SCRATCHPAD_VADDR = (SCRATCHPAD_VADDR_END - SCRATCHPAD_SIZE), ///< Stack space
};
////////////////////////////////////////////////////////////////////////////////////////////////////