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

17.5 Multi-chiplet bring-up

A multi-chiplet SoC (several dies in one package, joined by a die-to-die link) is architecturally still one system: one physical address space, one coherency domain if you build it that way, one set of Shareability domains. The Arm ARM has nothing to say about dies. Everything that is die-specific is IMPLEMENTATION DEFINED, in the interconnect, the GIC, the power controllers and the boot firmware. The architecture does fix the end state firmware must reach before the OS runs: every PE that will be in the Inner Shareable domain must be coherent and must receive broadcast maintenance (17.6). This section is the ordered list of steps that gets you there, and the places where a multi-die system behaves differently from a single die in ways software can see. The interconnect background (CHI, snoop filters, DVM) is in 8.3.

Examples below use Arm CMN-class meshes (CMN-700 and similar) and GIC-600/700 because their documentation and TF-A/SCP-firmware drivers are public. Other interconnects have equivalent steps under different names.

Reset release and boot-core election

At power-on, each die typically has its own system control processor (SCP, or an RSE/MCP-style security and management processor) that comes out of reset before any application PE. The order is decided by that layer, not by the Arm ARM:

  1. Each die’s SCP brings up its own clocks, power and local interconnect. One die, usually chosen by a package strap or a fuse, is the primary die.
  2. The die-to-die link is trained, and the SCPs agree on the chip count and chip IDs.
  3. Only the primary die releases its boot PE from reset. Application PEs on other dies stay in reset or powered off until the OS issues CPU_ON for them (17.4). The power request then travels from the primary die’s PSCI implementation to the remote die’s power controller, usually as an SCMI message to the local SCP that is forwarded across dies, or as a direct write into the remote power controller over the link.

Firmware must make the election deterministic. TF-A’s plat_is_my_cpu_primary() compares the full MPIDR, including the chip field, against one fixed value. If two dies both release a core whose MPIDR.Aff0–Aff2 matches “primary”, and the check ignores the chip field, two BL1s initialise shared memory concurrently. On silicon this shows up as a different hang on every boot.

Bring-up note: cold-boot all dies with only the primary die’s boot PE released, until the full system is coherent. Releasing remote-die PEs early “to save time” means they execute from a memory map that is not programmed yet, and their speculative fetches reach address ranges that the link or the remote SAM may fault. This is a typical source of an SError at boot that no instruction can explain (3.4).

Program the address map before any coherent access

In a CHI mesh, every request is steered by system address maps (SAMs):

  • An RN SAM at each requesting node (a CPU cluster port, an I/O port) maps each physical address to a target. Memory goes to a home node (HN-F, which contains the snoop filter and a slice of the system-level cache), device space to an HN-I or HN-D, and remote addresses to the gateway that carries traffic to another die (CCG on CMN-700, the CXL/CCIX gateway).
  • Memory ranges are usually hashed across a group of HN-Fs, so that consecutive cache lines go to different home nodes. The hash function and the set of HN-Fs in each group are programmed in the SAM.
  • An HN-F SAM maps each home node’s addresses to a memory controller (SN-F).

Two rules follow.

  • The maps must be consistent on every die. If die 0 hashes a range across its eight HN-Fs but die 1 sends the same range to die 0 through a different hash, two home nodes each believe they own the same line. Coherency then fails silently: two dirty copies, lost writes. Every requester must agree on exactly one home node per line.
  • No cacheable access to a range before its SAM entry is valid. That includes the PE’s own speculative and prefetch accesses once its MMU and caches are on. TF-A runs with the MMU on, so the platform code that programs remote ranges (on Arm reference designs it runs in the SCP firmware, before the application PEs are released) must finish before BL31 maps those ranges. An access with no SAM entry typically returns an error response, which arrives as an External abort or SError (18.3).

Join the coherency and DVM domains, in order

A cluster’s port has two separate memberships in the interconnect:

  • the snoop (coherency) domain: the home nodes’ snoop filters may hold its lines and will send it snoops;
  • the DVM domain: it receives broadcast TLB, branch-predictor and instruction-cache maintenance (TLBI ...IS, IC IVAU, …) and answers DVM Sync (9.1).

In CHI, a requester enters and leaves these domains with a hardware handshake (the SYSCOREQ/SYSCOACK coherency-connect signals). A DSU drives this automatically. Older interconnects needed explicit software writes, such as the CCI-400 snoop and DVM enables that TF-A sets with cci_enable_snoop_dvm_reqs(). Across dies, the gateways must also be configured to forward snoops and DVM messages to the remote die. That configuration is IMPLEMENTATION DEFINED and is part of link bring-up.

The required order, for each die or cluster that joins:

  1. Address maps programmed and the link up (previous step).
  2. Join the snoop domain before the cluster enables its caches. Otherwise it allocates lines the rest of the system will never snoop.
  3. Join the DVM domain before any other PE relies on broadcast maintenance reaching it, which in practice means before the OS brings the first PE of that cluster online.
  4. On the joining PEs: local TLBI ALLE3/ALLE2/VMALLE1 and, if required by the TRM, cache invalidation, after joining and before enabling the MMU. Anything they cached before joining missed every broadcast (8.8).

Leaving is the exact reverse, and it must complete before a die or cluster is powered down.

MPIDR affinity versus physical topology

The architecture does not tie MPIDR_EL1 to physical placement (17.4). On multi-die DynamIQ systems, Aff3 often carries the chip ID and Aff2 the cluster, but this is a convention set by the core’s configuration inputs. Three consumers depend on the choice:

  • The GIC. Affinity routing uses MPIDR values. GICR_TYPER.Affinity_Value of each Redistributor must equal its PE’s MPIDR_EL1 affinity, and GICD_IROUTER<n> names one PE by Aff3.Aff2.Aff1.Aff0 (or selects 1-of-N), and ICC_SGI1R_EL1 names Aff3.Aff2.Aff1 plus a 16-bit target list of Aff0 values. With DynamIQ’s Aff0=0, every core sits under its own Aff1 value, so an SGI to all cores on a die is one ICC_SGI1R_EL1 write per core (IRM=1 broadcasts to every PE in the system except the sender, not to one die).
  • Firmware indexing: plat_core_pos_by_mpidr() must include the chip field.
  • The OS scheduler. Linux arm64 does not derive topology from MPIDR. It uses the device-tree cpu-map or the ACPI PPTT. These tables, not MPIDR, have to describe dies, clusters and shared caches correctly (18.6).

GIC and SMMU across dies

GIC-600 and GIC-700 support a multichip configuration in which each die has its own Distributor instance and the instances keep their state consistent over the link. The firmware-visible pieces (driven by TF-A’s gic600_multichip driver) are as follows:

  • GICD_CHIPR<n> describes each chip: its address on the link and the SPI ID range it owns.
  • One chip is the routing-table owner. Configuration changes are made through it and propagated, and GICD_DCHIPR reports whether an update is still in progress (poll it before the next write). GICD_CHIPSR reports this chip’s routing-table (connection) status.
  • SPIs are owned by the die where the wire enters. They can still be routed (GICD_IROUTER) to any PE in the package, and the delivery crosses the link.

The rule is the same as for the address map: configure the multichip routing table, and see every chip report connected, before enabling any Distributor interrupt group. Configuration made while a remote chip is not yet connected may not reach it, and nothing at the CPU reports that.

For SMMUs, each die’s I/O subsystem typically has its own SMMU instances, and for each one the cross-die questions are:

  • Table walks. A walk for a device on die 1 may reach page tables homed on die 0. The SMMU must be a coherent requester (SMMU_IDR0.COHACC, with the walk attributes set accordingly), and its RN SAM must cover the remote range.
  • Broadcast TLB maintenance. If SMMU_IDR0.BTM is implemented and the SMMU is configured to use it, TLBI ...IS from any PE must reach it, so the SMMU must be in the DVM domain across dies. Otherwise the SMMU must ignore broadcast invalidation (SMMU_CR2.PTM=1, which is what Linux sets unless it uses BTM) and the OS must use command-queue invalidation (CMD_TLBI_*) (11.5).
  • MSIs. A device’s MSI targets an ITS (GITS_TRANSLATER) that may be on another die. That is an ordinary write crossing the link, and it is ordered behind the device’s earlier DMA writes only if the path preserves that order (4.4).

The Point of Coherency with per-die system caches

Each die’s HN-Fs contain a slice of the system-level cache (SLC), which caches lines homed on that die. Every coherent access to a line goes to its home HN-F, wherever the requester is. Two consequences need to be checked against the design, because the architecture only defines the PoC as the point where all observers, including non-coherent ones, see the same copy (8.4):

  • If every agent, including non-coherent DMA masters, reaches memory through the home HN-F, the PoC can be at the SLC (the SLC is transparent to every observer), and a DC CVAC to the PoC need not write data out of it. If any agent can reach DRAM directly, bypassing the home node (for example a die-local accelerator attached at the memory controller), the SLC is before the PoC for that agent. CMOs must then push data out of the SLC, and the interconnect must be configured to do so.
  • If a die can cache remote-homed lines locally (some gateways have a cache for remote data), that cache must be snooped by the home node, and it must honour CMOs. Otherwise a DC CIVAC on die 0 leaves a stale copy in die 1’s gateway cache.

Validation note: test CMOs across every pair of (die where the CPU runs, die where the line is homed, die where the observer sits). For each combination: write a pattern with the D-cache on, DC CVAC to the PoC, DSB SY, then have a non-coherent observer (a DMA engine configured non-snooping, or a debugger MEM-AP access to the physical address, 16.2) read memory. Repeat with invalidation in the other direction. A failure only for remote-homed lines points to the gateway or the CMO forwarding configuration. Interconnect PMU events (the HN-F and CCG counters exposed by CMN’s PMU) confirm whether the CMO reached the home node and the SN.

RAS reporting across dies

Each die has its own error records (cores, DSU, HN-Fs, memory controllers, the link controller), discovered through ACPI AEST or platform data (16.7). Multi-die systems add three problems:

  • Interrupt and record locality. The fault-handling interrupt for a remote die’s memory controller is an SPI on that die’s GIC. It can be routed to an EL3 handler on any PE, but the handler must then read error records through the link, which is the failing component if the link is the fault.
  • Link errors (CRC failures, retrains, an unresponsive remote die) have their own error records at the gateway. A dead link turns every outstanding remote access into an error response, which arrives as a burst of SErrors on many PEs at once. Firmware-first handling has to recognise this as one event.
  • Poison across dies. CHI carries poison with the data, so a poisoned line read by a die-0 PE from die-1 memory must arrive still marked as poison and be reported when it is consumed (typically as a synchronous External abort, though this is IMPLEMENTATION DEFINED), not used as silent bad data. That is a link and gateway property to test, using the pseudo-fault generators of the remote memory controller (16.8).

Barrier and TLBI broadcast latency

A DSB after a broadcast TLBI or IC IVAU completes only when every member of the DVM domain has answered the DVM Sync (7.6). Across a die-to-die link, that round trip is much longer than on a single die, so the cost of a TLB shootdown grows with both the number of PEs and the number of dies. A DSB that orders stores to remote Device memory similarly waits for completion responses from the other side of the link. The practical consequences are:

  • Measure, don’t assume: time TLBI VAE1IS + DSB ISH with all dies in the DVM domain, versus one die, using CNTPCT_EL0 or the PMU cycle counter. Expect a large difference.
  • OS-level mitigations (range invalidation with FEAT_TLBIRANGE, batching, keeping ASIDs live to avoid global invalidations) matter more on such systems (9.1).
  • A die that stops answering DVM messages (stuck in a power transition, or with its link down) makes every DSB after a broadcast maintenance operation hang on every die. In a hung-system dump, many cores stopped at a DSB after a TLBI point straight to a DVM participant (18.2).

NUMA

Memory placement is a firmware choice that the OS then has to be told about:

  • Die-local regions. Each die’s DRAM is a separate PA range, homed on that die. Local accesses are fast and remote ones cross the link. The OS is told through ACPI SRAT (proximity domains), SLIT/HMAT (distances, latency and bandwidth) or device-tree numa-node-id and distance-map.
  • Package-wide interleaving. The SAM hashes lines across the HN-Fs of all dies. Latency is uniform, but on average half of all traffic crosses the link (for two dies), and a link failure affects every address.

Many systems offer both as boot options. Whichever is chosen, the SRAT/HMAT or DT description must match the SAM programming. A mismatch makes the OS place memory badly. It does not cause a functional failure, so it only shows up in performance validation. MPAM partitioning of the SLC and memory bandwidth (8.9) must also be configured consistently on every die.

Checkpoint

Q17.5.1 On a two-die system, the remote die’s clusters are powered up and their PEs enable caches and the MMU. Later, the primary die’s OS remaps a page with break-before-make (TLBI VAE1IS, DSB ISH). A thread running on the remote die keeps using the old mapping. Which bring-up step was most likely skipped or misordered?

  • A. The remote die’s PEs did not set SCTLR_EL1.C
  • B. The SAMs hash the page’s PA to different HN-Fs on the two dies
  • C. The remote clusters were never added to the package-wide DVM domain (or the gateway does not forward DVM messages), so the broadcast TLBI never reached them
  • D. The remote die’s GIC multichip routing table was not programmed
Answer

C. TLB invalidation crosses dies as DVM messages. If the remote clusters are outside the DVM domain, the DSB can complete without them, and their TLBs keep the stale entry. If they were in the domain but the gateway dropped the Sync, the DSB would usually hang instead. Inconsistent SAMs (B) break data coherency, not TLB invalidation. The cache enable (A) and GIC routing (D) are not involved in TLB maintenance.

Read more: Arm ARM (DDI0487), TLB maintenance instructions, broadcast to the Inner Shareable domain; AMBA CHI specification, DVM operations

Q17.5.2 Why must the address maps of all dies be programmed consistently before any PE enables its D-cache for memory homed on another die?

  • A. Coherency relies on exactly one home node per cache line. If requesters disagree about which home node owns a line, two snoop filters each track their own copies, and writes can be lost with no error reported
  • B. The Arm ARM requires the SAM to be programmed before SCTLR_EL3.C is set
  • C. Otherwise DC CIVAC is UNDEFINED
  • D. The SLC is disabled until the SAM is valid, so caches would be bypassed anyway
Answer

A. The SAM is an interconnect structure the Arm ARM doesn’t know about (B, C). The danger is silent: a misprogrammed hash may still complete every transaction, but with two homes for one line, the “one coherent copy” property is lost. A missing SAM entry is the comparatively benign case, because it gives an error response. D invents a dependency that doesn’t exist.

Read more: AMBA CHI specification, Home Node and system address map; CMN TRM, RN SAM and HN-F SAM programming

Q17.5.3 After a link failure, every core of a two-die system takes an SError within a few microseconds, and many have been stuck in DSB instructions. What is the best first triage step?

  • A. Mask PSTATE.A on all cores and continue booting
  • B. Assume a memory ECC failure and offline the affected pages
  • C. Read each core’s DISR_EL1, since the SError was deferred by an ESB
  • D. Read the error records of the die-to-die gateway or link controller first. One link failure explains many SErrors (error responses to outstanding remote accesses) and DSB hangs (missing DVM Sync or completion responses), so per-core records are secondary
Answer

D. Many simultaneous SErrors on all cores point to a shared component. The link’s own records say whether it failed and why. Masking SError (A) hides the evidence. Offlining pages (B) addresses a different, local fault. DISR_EL1 (C) is relevant only when the error was deferred by an ESB, which these asynchronous aborts were not necessarily, and it is not the first record to read.

Read more: RAS (DDI0587), error records and error nodes; Arm ARM (DDI0487), SError exceptions, DISR_EL1