Skip to content

fwmanager: Add per-device slot layout to the device-table schema - #394

Open
chrysh wants to merge 3 commits into
OpenPRoT:mainfrom
9elements:slot-layout-schema
Open

fwmanager: Add per-device slot layout to the device-table schema#394
chrysh wants to merge 3 commits into
OpenPRoT:mainfrom
9elements:slot-layout-schema

Conversation

@chrysh

@chrysh chrysh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Slot topology becomes data on DeviceConfig: each device declares a table of SlotDesc entries (writable/bootable/optional Recovery role) plus a RecoveryPolicy. No layout shape is named anywhere — plain A/B, A/B+golden, or single+golden fall out of what the board table declares; "golden" is the recovery role plus writable: false, not a name. There is no cap on the number of slots. An empty layout is legal for devices that own their boot selection (the PLDM archetype) but forces EscalateOnly, since it has no ladder rungs.

validate() gains the layout rules: unique slot ids, at most one recovery-role slot (which must be bootable), a non-empty layout needs a bootable slot, and a Ladder policy needs a second bootable rung.

The second commit admits passive devices: a symbiont whose flash the eRoT fronts (e.g. a CPLD on SPI) produces no boot evidence, so CommitPolicy gains None — released blind, a staged image is committed once readback verification passes. An empty checkpoint list is legal only under this policy. The mock board now exercises all three archetypes: bmc (direct-flash, A/B, Ladder), nic (self-updating, no slots, EscalateOnly), and cpld (passive, A/B+golden, Ladder walked on verification failures only).

Part of 9elements#1 (partitioning schemes; verification keys remain open there).

chrysh added 2 commits August 5, 2026 14:01
Slot topology becomes data on DeviceConfig: a table of SlotDesc entries
(writable/bootable/optional Recovery role) plus a RecoveryPolicy. No
layout shape is named anywhere — plain A/B, A/B+golden, or single+golden
fall out of what the board table declares, and "golden" is the recovery
role plus writable:false rather than a name. An empty layout is legal
for devices that own their boot selection (the PLDM archetype) but
forces EscalateOnly, since it has no ladder rungs. There is no cap on
the number of slots a device may declare.

validate() gains the layout rules: unique slot ids, at most one
recovery-role slot (which must be bootable), a non-empty layout needs a
bootable slot, and a Ladder policy needs a second bootable rung.

The mock board exercises both shapes: the bmc declares plain A/B with
Ladder, the nic an empty layout with EscalateOnly.

Signed-off-by: Christina Quast <christina.quast@9elements.com>
A passive downstream device (a symbiont whose flash the eRoT fronts,
e.g. a CPLD on SPI) produces no boot evidence: no liveness signal
exists, so neither existing commit gate is declarable honestly, and it
has no boot checkpoints to wait on. CommitPolicy gains None — the
device is released blind and a staged image is committed once readback
verification passes.

validate() ties the ends together: an empty checkpoint list is legal
only under CommitPolicy::None. The converse stays legal — a device may
signal boot progress for recovery purposes while committing
unconditionally.

The mock board gains the archetype: a cpld with no checkpoints and
CommitPolicy::None whose flash still carries a full layout — A/B plus
a golden slot, with Ladder recovery walked on verification failures
only, since no boot signal exists.

Signed-off-by: Christina Quast <christina.quast@9elements.com>
Review on the slot-layout PR asked whether slot ids are indices or
arbitrary tokens. They are tokens: unique within one device's table,
with no contiguity or ordering requirement — ladder order comes from
table declaration order. The doc comment said "position", which
suggested index semantics; say token explicitly instead.

Refs: #1
Signed-off-by: Christina Quast <christina.quast@9elements.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant