|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Secure TrustZone bring-up contract for the BLXNS RoT proof (#172). More...
#include <stdint.h>Go to the source code of this file.
Enumerations | |
| enum | sbns_ns_image_t : uintptr_t { k_sbns_ns_load_base = 0x02080000U , k_sbns_ns_run_base = 0x32100000U , k_sbns_ns_copy_size = 0x00010000U } |
| Fixed Non-Secure image load / run / copy-window addresses. More... | |
Functions | |
| void | ra8_trustzone_init (void) |
| Programme the SAU + SRAM NS boundary and copy the NS image (no BLXNS). | |
Secure TrustZone bring-up contract for the BLXNS RoT proof (#172).
Declares ra8_trustzone_init (called from SystemInit before the C runtime is live) and the fixed Non-Secure image addresses shared between trustzone_init.c (which copies the NS image MRAM->SRAM) and main.c (which authenticates it and BLXNS-es to it). The values MUST match ns_image.ld's NS_LOAD / NS_SRAM_RUN origins.
Definition in file trustzone_init.h.
| enum sbns_ns_image_t : uintptr_t |
Fixed Non-Secure image load / run / copy-window addresses.
The NS image is a SEPARATE ELF, so the Secure side has none of its linker symbols and must hard-code these (they mirror ns_image.ld). It is flashed at the MRAM LMA and copied to the SRAM2 Non-secure alias before BLXNS.
| Enumerator | |
|---|---|
| k_sbns_ns_load_base | NS image LMA (Secure MRAM). |
| k_sbns_ns_run_base | NS image VMA (SRAM2 NS alias). |
| k_sbns_ns_copy_size | Bytes copied LMA->VMA (64 KiB). |
Definition at line 38 of file trustzone_init.h.
| void ra8_trustzone_init | ( | void | ) |
Programme the SAU + SRAM NS boundary and copy the NS image (no BLXNS).
Carves the SRAM2 Non-secure aperture via SRAMSABARn, programmes the bit[28] SAU (the IDAU-NS ranges Non-secure, ALLNS = 0 default-deny), and copies the NS image from its MRAM LMA to the SRAM run base. It deliberately does NOT jump: main() performs the root-of-trust verify + BLXNS after the C runtime (and the crypto heap) is live. On a host build (RA8_OFF_TARGET or no RA8_TRUSTZONE_ENABLE) it is a no-op.
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 161 of file trustzone_init.c.