Memory layout: Difference between revisions
mNo edit summary |
|||
| Line 125: | Line 125: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Virtual Address | ! Virtual Address Base | ||
! Physical Address Base | |||
! Region Max Size | ! Region Max Size | ||
! Description | ! Description | ||
|- | |- | ||
| 0x00100000 / 0x14000000 | | 0x00100000 / 0x14000000 | ||
| | |||
| 0x03F00000 | | 0x03F00000 | ||
| The [[ExeFS]]:/.code is loaded here, executables must be loaded to the 0x00100000 region when the exheader "special memory" flag is clear. The 0x03F00000-byte size restriction only applies when this flag is clear. Executables are usually loaded to 0x14000000 when the exheader "special memory" flag is set, however this address can be arbitrary. | | The [[ExeFS]]:/.code is loaded here, executables must be loaded to the 0x00100000 region when the exheader "special memory" flag is clear. The 0x03F00000-byte size restriction only applies when this flag is clear. Executables are usually loaded to 0x14000000 when the exheader "special memory" flag is set, however this address can be arbitrary. | ||
|- | |- | ||
| 0x08000000 | | 0x08000000 | ||
| | |||
| 0x08000000 | | 0x08000000 | ||
| Heap mapped by [[SVC|ControlMemory]] | | Heap mapped by [[SVC|ControlMemory]] | ||
|- | |- | ||
| 0x10000000-StackSize | | 0x10000000-StackSize | ||
| | |||
| StackSize from process exheader | | StackSize from process exheader | ||
| Stack for the main-thread, initialized by the ARM11 kernel. The StackSize from the exheader is usually 0x4000, therefore the stack-bottom is usually 0x0FFFC000. The stack for the other threads is normally located in the process .data section however this can be arbitrary. | | Stack for the main-thread, initialized by the ARM11 kernel. The StackSize from the exheader is usually 0x4000, therefore the stack-bottom is usually 0x0FFFC000. The stack for the other threads is normally located in the process .data section however this can be arbitrary. | ||
|- | |- | ||
| 0x10000000 | | 0x10000000 | ||
| | |||
| 0x04000000 | | 0x04000000 | ||
| Applications usually map this region for HID | | Applications usually map this region for HID | ||
|- | |- | ||
| 0x14000000 | | 0x14000000 | ||
| | |||
| 0x08000000 | | 0x08000000 | ||
| Can be mapped by [[SVC|ControlMemory]] | | Can be mapped by [[SVC|ControlMemory]] | ||
|- | |- | ||
| 0x1EC00000 | | 0x1EC00000 | ||
| 0x10100000 | |||
| | | | ||
| [[IO]] registers, the mapped IO pages which each process can access is specified in the [[NCCH#CXI|CXI]] exheader.(Applications normally don't have access to registers in this range) | | [[IO]] registers, the mapped IO pages which each process can access is specified in the [[NCCH#CXI|CXI]] exheader.(Applications normally don't have access to registers in this range) | ||
|- | |- | ||
| 0x1FF80000 | | 0x1FF80000 | ||
| | |||
| 0x1000 | | 0x1000 | ||
| [[Configuration Memory]], all processes have access to this however write-permission to this page is specified by the exheader "Shared page writing" kernel flag. | | [[Configuration Memory]], all processes have access to this however write-permission to this page is specified by the exheader "Shared page writing" kernel flag. | ||
|- | |- | ||
| 0x1FF81000 | | 0x1FF81000 | ||
| | |||
| 0x1000 | | 0x1000 | ||
| Shared page, access to this is the same as 0x1FF80000. | | Shared page, access to this is the same as 0x1FF80000. | ||