Skip to content

docs: Add the OCP Recovery design proposal - #680

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

chrysh wants to merge 2 commits 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 for both roles the eRoT takes, as separate pages, because the eRoT is the Device on one page and the Recovery Agent on the other.

ocp-recovery.md: the eRoT serves the OCP Recovery interface as the Device, and a Recovery Agent on the platform drives the interface. The page covers the mechanism (push, verify, reset, verify at boot, boot) and leaves open where the streamed image lands.

ocp-recovery-agent.md: the eRoT is the Recovery Agent for a downstream device that serves OCP Recovery, for example a CPU or a NIC. The Recovery Agent sequence follows the Recovery Agent in the Caliptra MCU SW BMC emulator, and the eRoT pushes only through the FIFO.

These open questions about the eRoT as the Device need a decision from review:

  • Which component is the Recovery Agent for the eRoT? The eRoT releases the BMC from reset, so the BMC does not run while the eRoT is in recovery mode and cannot push the image.
  • 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. The question applies if the component that becomes the Recovery Agent for the eRoT runs the OpenBMC Recovery Agent.
  • 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, USB, or firmware that stages the answer to each read in the I3C target before the read arrives.
  • How does the eRoT image arrive on a platform with a Caliptra subsystem? Where the eRoT firmware takes the place of the Caliptra MCU runtime, Caliptra core downloads the eRoT image, and the eRoT serves no registers for that download. Whether the eRoT also serves the Device role on that platform is open.
  • 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.

These open questions about the eRoT as Recovery Agent need a decision from review:

  • Does the role sit behind Recovery::restore? On the re-walk, the verifier judges the image that restore wrote, but a downstream device that serves OCP Recovery verifies the pushed image and reports the verdict in RECOVERY_STATUS. Either an implementor of Recovery maps that verdict to the result of restore, or the orchestrator drives the role through a separate capability.
  • How does the eRoT get the images from the BMC or a rack manager: stored in eRoT flash ahead of a recovery, or fetched when the downstream device requests an image?
  • Which transport carries the controller side? A downstream device that carries a Caliptra subsystem serves the registers through an I3C core, so the eRoT needs an I3C controller to recover that downstream device.
  • Which failure paths does the sequence need? The emulator Recovery Agent has no transition for BootFailure, FatalError, a refused image or a downstream device that stops answering, and no poll period, timeout or retry count.
  • What does the eRoT do when the downstream device answers a push with a NACK?

@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.

Comment thread docs/src/design/ocp-recovery.md Outdated
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.

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.

Issue #744 collects the open questions on the I3C block read timing on the AST1060 and on the retries the BMC makes after a NACK, and plans a bench test that measures how long the eRoT firmware takes to queue an answer.

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>
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch from f69ced9 to de1f5b6 Compare November 17, 2026 22:02
@chrysh chrysh changed the title docs: Add the OCP Recovery streaming boot design proposal docs: Add the OCP Recovery design proposal Nov 19, 2026
The new page ocp-recovery-agent.md describes the eRoT as Recovery Agent
for a downstream device. The Recovery Agent sequence on the page
follows the Caliptra MCU SW BMC emulator, and the eRoT pushes only
through the FIFO, the path a Caliptra subsystem serves.

The Device page ocp-recovery.md now says Recovery Agent where it said
BMC. The eRoT starts the BMC, so the BMC does not run while the eRoT is
in recovery mode and cannot push the eRoT image. New open questions
cover which component is the Recovery Agent for the eRoT and how the
eRoT image arrives on a platform with a Caliptra subsystem, and the
reason-code question now covers a chip with no OCP Recovery hardware.

Signed-off-by: Christina Quast <christina.quast@9elements.com>
@chrysh
chrysh force-pushed the ocp-recovery-design-upstream branch from 31df728 to f2565e1 Compare November 23, 2026 21:04

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