Skip to content

Commit 6e60901

Browse files
committed
Update the STM32L5 secure app docs for the NSC, clock and GTZC changes
1 parent ee7a700 commit 6e60901

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎docs/Targets.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,16 @@ All partitions are at the Secure flash alias:
299299

300300
| Region | Address | Size |
301301
| --- | --- | --- |
302-
| wolfBoot (with an empty NSC) | `0x0C000000` | 48 KB |
302+
| wolfBoot | `0x0C000000` | 48 KB |
303303
| Boot partition (secure application) | `0x0C00C000` | 128 KB |
304304
| Secure application NVM (not touched by wolfBoot) | `0x0C038000` | 24 KB |
305305
| Swap page | `0x0C03E000` | 2 KB |
306306
| Update partition (start of bank 2) | `0x0C040000` | 128 KB |
307307
| Non-secure guests | `0x08060000` | 128 KB |
308308

309-
wolfBoot keeps SRAM1 and SRAM2 Secure across the jump, opens no Non-secure
310-
flash, RAM or peripheral window in the SAU, and
309+
wolfBoot keeps SRAM1 and SRAM2 Secure across the jump (the GTZC reset value),
310+
enables no SAU region and builds no Non-secure callable entries, keeps the
311+
110 MHz PLL clock running (`WOLFBOOT_RESTORE_CLOCK=0`), and
311312
links its own RAM at `0x30030000` so that `0x30000000-0x3002FFFF` (the record
312313
and the secure application's RAM) is left untouched. The PSA lifecycle in the
313314
record comes from the RDP level in `FLASH_OPTR` (`hal/stm32l5_lifecycle.h`).

‎docs/secure_app_handoff.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,16 @@ boot, update and rollback on the m33mu MCXN947 model.
102102
and the partitions at the Secure flash alias (`0x0C00C000` boot, `0x0C040000`
103103
update, both 128 KB). wolfBoot links its RAM at `0x30030000`
104104
(`hal/stm32l5-secure-app.ld`) to stay clear of the record and the secure app's
105-
RAM. `hal/stm32_tz.c` keeps SRAM1 and SRAM2 Secure and opens no Non-secure
106-
flash, RAM or peripheral window in the SAU (only the NSC region),
107-
`hal/stm32l5.c` skips the GTZC peripheral unsecuring and keeps the 110 MHz
108-
PLL clock running, and
105+
RAM. SRAM1 and SRAM2 stay Secure at their GTZC reset value, the SAU has no
106+
region enabled, and without `WOLFCRYPT_TZ` wolfBoot links no `wolfBoot_nsc_*`
107+
entries, so Non-secure code has no path into the update partition.
108+
`hal/stm32l5.c` skips the GTZC peripheral unsecuring, the config sets
109+
`WOLFBOOT_RESTORE_CLOCK=0` so the 110 MHz PLL keeps running, and
109110
`hal_attestation_get_lifecycle()` maps the RDP level to a PSA lifecycle
110111
(`hal/stm32l5_lifecycle.h`; it reports unknown when TZEN is off). The
111112
`trustzone-emulator-tests` workflow runs boot, update and rollback on the m33mu
112-
STM32L552 model and checks on every boot the record and that no
113-
Non-secure SAU window is open.
113+
STM32L552 model and checks on every boot the record and that no SAU region
114+
is enabled.
114115

115116
## Tests
116117

0 commit comments

Comments
 (0)