PDN Registers: Difference between revisions
Credits: nocash for figuring out the instruction overlay →PDN_LGR_CPU_CNT |
|||
Line 469: | Line 469: | ||
|- | |- | ||
| 0 | | 0 | ||
| | | Power request: 0 = power off, 1 = power on | ||
|- | |- | ||
| 1 | | 1 | ||
| | | Handshake bit | ||
Needs to be set before powering on the core. It is meant to be cleared by software on the powered-on core, to signal itself. | |||
|- | |- | ||
| 4 | | 4 | ||
| | | Power status: 0 = off, 1 = on | ||
|- | |- | ||
| 5 | | 5 | ||
| | | Core present? | ||
|} | |} | ||
Only usable for core2 and core3. | Only usable for core2 and core3. Core 0 and 1 have a fixed, read-only value of 0x30 for this register. | ||
* On power-on, software should switch the affected core to Normal Mode on the SCU | |||
* On power-off, software '''must''' switch the affected core to Powered Off mode on the SCU (otherwise the core won't go off) | |||
The normal Arm11 bootrom checks cpuid and hangs if cpuid >= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS. | The normal Arm11 bootrom checks cpuid and hangs if cpuid >= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS. | ||
The overlay should be enabled by setting bit0 in [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]] and configured by setting the entrypoint address to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]. | |||
The overlays overrides all ''instruction'' reads from phyiscal addresses 0xFFFF0000-0xFFFF1000 and 0x10000-0x11000 to the following (figured out by using low exception vectors and configuring the b11 veeners accordingly): | |||
ldr pc, [pc] | ldr pc, [pc, #(0x20 - 8)] | ||
and all ''data'' reads from the same ranges to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]. |