|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Single-core TrustZone bring-up for a RAM-resident NS image (#172). More...
Go to the source code of this file.
Functions | |
| void | ra8_trustzone_init (void) |
| Programme + enable the SAU per the partition. | |
Single-core TrustZone bring-up for a RAM-resident NS image (#172).
The RA8 IDAU is FIXED by address bit[28] (HUM section 51.3.3.1, p3265): bit[28]=0 is Secure/NSC and the SAU cannot downgrade it, so an "NS" image at the 0x02.. / 0x22.. (bit[28]=0) aliases always executes Secure. Real NS lives at the bit[28]=1 aliases (0x12.. code, 0x32.. SRAM, 0x5.. peripherals).
Code MRAM's secure/NS split needs persistent (brick-risky) option bytes, but SRAM's split is the RUNTIME SRAMSABARn register, so the NS image is RAM-resident: flashed into Secure MRAM (the LMA) and copied by this code into the SRAM Non-secure alias 0x3210_0000 (physical SRAM2) after SRAMSABAR2 marks SRAM2 Non-secure. No option bytes, no brick.
Boot sequence (this file, all in Secure state, called from SystemInit):
It deliberately does NOT BLXNS: main() runs the root-of-trust verify (which needs the crypto heap the C runtime sets up) and then jumps. On a host build (RA8_OFF_TARGET or no RA8_TRUSTZONE_ENABLE) this is a no-op.
Definition in file trustzone_init.c.
| void ra8_trustzone_init | ( | void | ) |
Programme + enable the SAU per the partition.
No-op TrustZone init for the secure-only USB experiment.
Programme the SAU + SRAM NS boundary and copy the NS image (no BLXNS).
Called from SystemInit after the cache + MPU are up but before any application code runs. When the firmware is built without RA8_TRUSTZONE_ENABLE defined this function is a no-op so the single-world build is unaffected.
Definition at line 302 of file trustzone_init.c.
References k_ra8_ok.