Memory layout: Difference between revisions

No edit summary
Line 143: Line 143:
|}
|}


==NATIVE_FIRM ARM9 kernel MPU regions==
==ARM9 MPU regions==
For the below instruction permissions: RO = memory is executable, while None = not-executable.
 
===NATIVE_FIRM ARM9 kernel===
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 220: Line 223:


The above is the MPU region settings setup by the ARM9-kernel in the crt0.
The above is the MPU region settings setup by the ARM9-kernel in the crt0.
Instruction permissions RO = memory is executable, while None = not-executable.


The New3DS ARM9-kernel MPU region settings are the same as the Old3DS MPU region settings for >=[[8.0.0-18|8.0.0-X]].
The New3DS ARM9-kernel MPU region settings are the same as the Old3DS MPU region settings for >=[[8.0.0-18|8.0.0-X]].


At the start of the Process9 function executed in kernel-mode via svc7b during firm-launching, it changes some MPU region settings. At the end of that function, before it uses the ARM9/ARM11 entrypoint fields, it disables MPU.
At the start of the Process9 function executed in kernel-mode via svc7b during firm-launching, it changes some MPU region settings. At the end of that function, before it uses the ARM9/ARM11 entrypoint fields, it disables MPU.
===New3DS [[FIRM|ARM9-loader]]===
{| class="wikitable" border="1"
|-
!  Region
!  Address
!  Size
!  Privileged-mode data permissions
!  User-mode data permissions
!  Privileged-mode instruction permissions
!  User-mode instruction permissions
|-
| 0
| 0xFFFF0000
| 32KB/0x8000
| RO
| None
| RO
| None
|-
| 1
| 0x01FF8000
| 32KB/0x8000
| RW
| None
| RO
| None
|-
| 2
| 0x08000000
| 2MB/0x200000
| RW
| None
| RO
| None
|-
| 3
| 0x10000000
| 128KB/0x20000
| RW
| None
| None
| None
|}
MPU regions 4-7 are disabled. Note that the entire ARM9-loader runs in SVC-mode.


==ARM9 ITCM==
==ARM9 ITCM==