Skip to content

docs: Add the OCP Recovery streaming boot design proposal - #680

Open
chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:ocp-recovery-design-upstream
Open

chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:ocp-recovery-design-upstream

Conversation

@chrysh

@chrysh chrysh commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

No document states what happens behind the OCP Recovery registers. This PR adds the design proposal: the eRoT serves the OCP Recovery interface as the Device, and the BMC drives the interface as the Recovery Agent. The document covers the mechanism (push, verify, reset, verify at boot, boot) and leaves open where the streamed image lands.

These open questions at the end of the document need a decision from review:

  • Where does the streamed image land: in RAM that keeps its contents across a reset, or in a flash slot? With flash, a trial boot and an SVN floor advance on confirm apply as they do for an update. With RAM, the SVN floor keeps the SVN it has, and a power cycle clears the image.
  • Which push mechanism does the eRoT serve? In the design the eRoT serves the FIFO (0x2d to 0x2f) and refuses the indirect memory window (0x29 to 0x2b). The OpenBMC Recovery Agent proposed under the ocp-fw-recovery topic on gerrit.openbmc.org pushes through the memory window and refuses a Device that advertises only the FIFO. Either the eRoT serves the memory window as well, or the OpenBMC Recovery Agent adds FIFO support.
  • Can firmware answer an I3C block read in time? I3C gives the target no way to stall the clock, so the dispatch function, which runs in firmware, may miss the response window. The alternatives are a hardware I3C target, SMBus or USB.
  • Must streaming boot cover the case where the operational image does not run at all, without physical access? Yes means a second signed image: a recovery copy in a separate flash region, which a hardware boot fallback starts. No means a technician has to come to the board whenever the operational image does not run.
  • May a platform that has latched LockdownLatch serve the interface? The latch is one-way, so a streamed image that runs after the latch undoes the safe state.

@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch from 238f846 to 608c5c4 Compare November 9, 2026 15:39
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch 9 times, most recently from 45980fd to 69da753 Compare November 10, 2026 16:21
@chrysh
chrysh marked this pull request as ready for review November 10, 2026 16:24
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch 3 times, most recently from 03afde5 to 038db46 Compare November 10, 2026 16:33
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch from 038db46 to 9f03678 Compare November 13, 2026 17:03
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch from 9f03678 to f69ced9 Compare November 13, 2026 17:15
@rusty1968
rusty1968 requested a review from swenson November 15, 2026 19:11

@swenson swenson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of the answers to the open questions seem like they will depend a lot on the particular vendor requirements.

heartbeat for as long as the flow runs, so the wire half must not block
on the policy half. Caliptra can spin on the same registers in a
blocking loop because hardware serves them: the I3C core answers the
BMC whatever the firmware does. On the eRoT the firmware is what

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no OCP Recovery hardware at all on the eRoT? For I3C at least, it will be very challenging to respond in time to the OCP Recovery block reads, since you only have a few clock cycles once you know what block is requested to start sending bytes, and there is no way to stall the clock.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, without a concrete scenario, I have trouble understanding what architecture we are going for. In my understanding, OCP was meant to be implemented in software. But I am not sure under which circumstances it should become active. That's why a scenario description would be very useful for me at this point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design assumes an eRoT without OCP Recovery hardware, so dispatch serves the registers in firmware. On the AST1060 the I3C target answers a read with the data that target_tx_write (in target/ast10x0/peripherals/i3c/hardware.rs) put into the target TX FIFO. In the block read of OCP Secure Firmware Recovery 1.1 section 8.4, the PEC byte, the repeated START and the read address follow the command code directly, so, as you say, firmware has only those clock cycles to fill the TX FIFO. We have not measured how long firmware takes to fill the TX FIFO.

The revised document makes the choice of transport an open question, "Can firmware answer an I3C block read in time?", with a hardware I3C target, SMBus and USB as the alternatives.

Section 8.4 does not say whether hardware or firmware answers the reads. The block read figure in section 8.4 shows only a Device that acknowledges the read. We found no text in section 8.4 on a Device that has no data ready when the read arrives, and we have not checked whether a Recovery Agent retries such a read.

No document states how the eRoT serves the OCP Recovery interface as
the Device, with the BMC as the Recovery Agent: who verifies and boots
the streamed image, who runs the serving loop, and who writes the
status registers.

The document describes the mechanism and leaves open where the streamed
image lands: in RAM that keeps its contents across a reset, or in a
flash slot. RAM and flash follow the same order. The recovery flow
verifies the image and resets the eRoT. The stored image can change
between the verify and the boot, so the boot path verifies the image
again before booting the image. Which image reports the outcome after
the reset, and which transports fit, are open questions.

The document points to the seams the recovery flow uses:
IncrementalVerifier for the signature check, the eRoT SvnFloor that
ErotUpdate carries for the rollback check, SelfReset for the reset
before the boot and for the reset the Recovery Agent commands, and
BootControl::hold_in_reset for the downstream devices the eRoT holds in
reset while a stream runs.

Signed-off-by: Christina Quast <christina.quast@9elements.com>

This branch has not been deployed

No deployments
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.

2 participants