First, I would like to thank WulfyStylez for making public this incredible hax.
Each morning, I actualize the Recent Changes, and then I see this... wow.
From a dev perspective, it's 10000 times more useful than releasing KARL3DS.
To everyone that don't understand this hax, I will try to explain what I understood.
First, there is a special register, called SYSPROT9, that is set-only (once you set a bit, you can't clear it) and that protect bootrom/OTP registers.
The only way to clear it is a hard reboot.
BUT, in a hard reboot, bootroms are launched again, and will re-enable SYSPROT9.
It's a chicken-and-egg loop that can be only broken by exploiting the bootrom.
The hax exploit two hardware vulnerabilities :
The first is that the RAMs/ARM9 memory are NOT cleared at hard reboots (it should).
The second is that the ARM9 bootrom does not immediatly relocate the ARM9 exception vectors to itself. So, for a (very quick) time, the ARM9 exception vectors point to the ARM9 memory... that we control!
The tricky part : the exception vectors are triggered by a fault. So we must inject a fault. It's easy if we have code execution, but we don't have code execution.
So we can't inject a fault with software means. Let's inject it with hardware means!
If the fault is injected within the short time window that is exploitable, the processor will jump to the RAM and execute our code.
It will execute our code BEFORE any bits of SYSPROT9 are set!
Finally, our code has to dump the parts protected by SYSPROT9.