Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

This book covers the Arm A-profile architecture, Armv8-A and Armv9-A in AArch64 state, starting from the Arm Architecture Reference Manual (Arm DDI0487, “the Arm ARM”). Its aim is to get you from “I use this” to “I can reason about this from the Arm ARM”. That means precise semantics, register-level detail, the reasons behind each rule, and how each rule shows up when you bring up a new SoC or try to show that one is correct.

Status: draft. The text was drafted with AI assistance and checked by separate AI review passes. It has not yet been reviewed against DDI0487 by a human. Treat each claim as something to confirm in the Arm ARM or the relevant companion specification before you rely on it, and report any errors you find.

Who it is for

The reader we have in mind is a systems software engineer with several years of TEE and device-security work: OP-TEE, EL3 code review, and kernel hardening such as PAN, shadow call stacks, KASLR and KASAN. That engineer now works on firmware bring-up (TF-A, an RTOS such as FreeRTOS, pre-silicon platforms, multi-chiplet SoCs) and may move into silicon validation. The book assumes:

  • You already know the exception model, interrupt handling with the GIC, and TrustZone-A with an EL3 monitor. The parts on these topics are marked Review part and are kept concise and register-precise.
  • Your weak spots are the memory system and speculation. The book spends most of its depth on these: what DMB, DSB and ISB actually guarantee, what “observed” and “complete” mean, coherency and the Points of Coherency and Unification, cache and TLB maintenance, Spectre-class attacks and their mitigations, and MTE. These are the deep-dive parts.
  • You are not primarily an embedded-Linux engineer. Firmware (TF-A, bare-metal tests, RTOS ports) is the main idiom. Linux arm64 code appears as a reference mapping (“this is where Linux does it”), not as the thing being taught.

If you are a validation or verification engineer who already knows the memory system well, the silicon-validation reading path skips the introductory material.

What it covers

PartsTopicCharacter
1–2Versions, FEAT_ names and discovery; the AArch64 programmer’s model, system registers and the trap-control mapFoundation
3–4Exceptions, SError, GICv3/v4 and the Generic TimerReview parts
5Translation regimes, descriptors, permissions, faults (ends with a lab)Core
6–10Memory types, the ordering model, caches and coherency, TLB maintenance and break-before-make, atomics (Parts 7 and 8 end with labs and exercises)Deep dive
11EL2, VHE, nested virtualization, stage 2, the SMMUCore
12TrustZone-A, secure boot, PSCI/SMCCC/FF-A, RME and CCA, MECReview part
13PAC, BTI, GCS, translation hardening, the upper address bits, MTECore
14How speculation is modelled, Spectre v1/v2/v4, BHB, Meltdown-class leaks, world-switch isolation (ends with exercises)Deep dive
15Advanced SIMD and FP, SVE/SVE2, SME, and what firmware must do about themCore
16Self-hosted and external debug, CoreSight, PMUv3, AMU, SPE and trace, RASCore
17–18Reset to OS handoff, multi-chiplet bring-up, crash and hang triage, pre-silicon environments, directed tests, BSA/SBSA conformanceApplied

The front matter tells you how to use the book, including four reading paths, how to read the Arm ARM itself, and how to set up the labs on QEMU, the Arm FVP and herdtools7.

Not covered: the AArch32 instruction sets and AArch32 system programming, except where AArch32 state affects AArch64 firmware (for example SCR_EL3.RW or HCR_EL2.RW). Also not covered: the microarchitecture of particular cores, except as clearly labelled examples, and SoC IP that Arm does not specify architecturally. Interconnect protocols (AMBA CHI, ACE) appear only as far as they explain what a maintenance instruction or barrier becomes on the bus.

Architecture versions and the issue of DDI0487 it tracks

The book covers Armv8.0-A to Armv8.9-A (the v8 line ends at v8.9) and Armv9.0-A to Armv9.6-A and later. Up to v9.4, each Armv9.n-A extension pairs with Armv8.(n+5)-A. From v9.5 onward there is no v8 counterpart (1.1).

Every version claim is phrased as “permitted from vX.Y” (the earliest version in which an implementation may include the feature) and, where relevant, “mandatory from vX.Y” (the version from which an implementation that claims compliance must include it). These come from the feature descriptions in DDI0487 chapter A2, not from compiler -march tables. The two often disagree, because a toolchain’s -march=armv8.5-a describes what the compiler may emit, not what the architecture requires. Where a section was not sure of a version, it says “see DDI0487 A2” rather than guessing.

The text tracks DDI0487 issue M.a and the Arm ARM Known Issues document published against it (Arm document 102105). Sections that depend on a Known Issues entry say so (see 7.5). Check the title page of your copy. If yours is a later issue, assume that anything touched by a newer Known Issues entry or a newer extension may have changed. For features newer than the tracked issue, the authoritative sources are Arm’s A-profile architecture extensions pages and the per-release register (DDI0601) and A64 instruction set (DDI0602) documentation (Reading the Arm ARM).

The companion book: Armv8-M for A-profile Engineers

A sibling book, Armv8-M for A-profile Engineers (the armv8m-intro-mdbook directory next to this one), covers the M-profile: the programmer’s model, the NVIC and exception stacking, PMSAv8 and the MPU, M-profile barriers and caches, and TrustZone for Armv8-M with TF-M. It is written the other way round from this book. It starts from A-profile knowledge and explains each M-profile mechanism by contrast.

The two books meet in the same SoC. A modern A-profile system usually contains M-profile cores as well: a system control processor that sequences power and clocks, a manageability controller, and often a root-of-trust or runtime security engine that runs before the first A-profile instruction. In bring-up, the A-profile boot chain in Part 17 usually depends on those cores. Read the M-profile book if you have to port, debug or review that firmware. Read this one for everything that runs on the application cores. The two profiles share instruction names and much vocabulary, but the memory models, exception models and security models behind them differ. Do not carry an intuition about, say, DSB or a Security state from one profile to the other without checking it in that profile’s manual (DDI0553 for Armv8-M).

Typographic conventions

  • Registers, fields, instructions and code are in code font: SCTLR_EL3.M, TLBI VAE1IS, ID_AA64MMFR1_EL1.HAFDBS. Bit ranges are written [n:m].
  • The architecture’s defined terms are used exactly: PE (processing element) rather than “core” when the statement is architectural, observer, complete, Point of Coherency (PoC), context synchronization event. Capitalised terms such as IMPLEMENTATION DEFINED, UNKNOWN and CONSTRAINED UNPREDICTABLE have the meanings given in Reading the Arm ARM.
  • FEAT_ names (FEAT_LSE, FEAT_RME) identify features. Version numbers say only when a feature became permitted or mandatory.
  • Section numbers such as “7.8” refer to this book. References to the Arm ARM use chapter or section titles and register names rather than DDI0487 section numbers, because those numbers move between issues. The one exception is chapter A2, the list of architecture extensions, which is cited by number.