Introduction
This book is a guided tour of the Armv8-M architecture (the M-profile: Cortex-M23, M33, M35P, M52, M55, M85). It is written for engineers who already know A-profile well: AArch64 exception levels, the GIC, TrustZone-A with an EL3 monitor, and translation tables. Rather than starting from zero, each section explains the M-profile mechanism and then contrasts it with what you already know.
Draft. The content was drafted with AI assistance and cross-checked by a separate AI review pass. It has not yet been reviewed line by line against the Armv8-M Architecture Reference Manual (Arm DDI0553). Treat every claim as something to confirm in the manual before relying on it, and please report errors.
Chapters
| Chapter | What it covers |
|---|---|
| 1. Programmer’s model & reset | Baseline vs Mainline vs v8.1-M, core and special registers, modes and privilege, MSP/PSP and stack limits, reset and the system address map |
| 2. Exception & interrupt model | Exception numbers and priorities, the NVIC, hardware stacking and EXC_RETURN, tail-chaining, lazy FP, faults, SVC/PendSV in an RTOS |
| 3. Memory model, MPU & barriers | Default memory map and memory types, PMSAv8 regions, DMB/DSB/ISB, exclusives and monitors, cache maintenance |
| 4. TrustZone for Armv8-M & TF-M | Address-based security state, SAU/IDAU, SG/BXNS/FNC_RETURN, banked state, CMSE, stack sealing, TF-M vs OP-TEE + TF-A |
One register to orient you
On exception entry the core writes a magic value, EXC_RETURN, into LR. A handler returns by branching to it; there is no ERET. Chapter 2 explains each field.
| Bits | 31:24 | 23:7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|
| Field | PREFIX 0xFF | RES1 | S | DCRS | FType | Mode | SPSEL | RES0 | ES |