|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Secure-side fault handler for NS -> S violations. More...
Go to the source code of this file.
Functions | |
| void | SecureFault_Handler (void) |
| Cortex-M85 SecureFault handler (vector table slot 7). | |
Secure-side fault handler for NS -> S violations.
When a Non-Secure caller tries to read a Secure address (or call a Secure function that has not been exposed via a NSC veneer), the Cortex-M85 raises a SecureFault. The strong handler in this file overrides the weak SecureFault_Handler alias every per-app vector_table.c declares, so the whole tree decodes the fault the same way the HardFault / MemManage / BusFault / UsageFault trampolines do:
SystemInit() sets SHCSR.SECUREFAULTENA, so security violations arrive here with their true class instead of escalating to an anonymous HardFault. The handler runs in the Secure world; NS code cannot reach the SFSR register at 0xE000EDE4 because it lives in the Secure-only system control region (RAZ from NS).
Definition in file secure_exception.c.
| void SecureFault_Handler | ( | void | ) |
Cortex-M85 SecureFault handler (vector table slot 7).
Strong definition overriding the weak SecureFault_Handler alias in every per-app vector_table.c. Naked trampoline in the exact shape of the HardFault/MemManage/BusFault/UsageFault trampolines: tst lr, #4 selects the faulting stack (MSP when EXC_RETURN[2] = 0, else PSP), r1 carries the architectural exception number 7, and control tail-branches into ra8_exception_report(), which snapshots the frame
Definition at line 76 of file secure_exception.c.