Repository navigation
Conversation
This was referenced Oct 29, 2026
chrysh
force-pushed
the
ocp-recovery-server
branch
from
November 3, 2026 09:53
cdbdded to
488a06d
Compare
chrysh
force-pushed
the
ocp-recovery-registers
branch
from
November 3, 2026 19:30
6167ef7 to
e695b3f
Compare
chrysh
force-pushed
the
ocp-recovery-server
branch
from
November 3, 2026 19:30
488a06d to
9500192
Compare
chrysh
force-pushed
the
ocp-recovery-server
branch
3 times, most recently
from
November 9, 2026 10:46
da4081c to
7243d9e
Compare
RecoveryInterface holds the registers the eRoT serves to the Recovery Agent, and the dispatch answers one access. The dispatch serves the register bytes on a read, latches the protocol error of a refused access into DEVICE_STATUS byte 1, and drains INDIRECT_FIFO_DATA payloads into a FifoSink. The DEVICE_STATUS read is the only read that clears a value, the protocol error. Policy stays with the caller. An accepted RECOVERY_CTRL or DEVICE_RESET write only sets the register, and the caller reads the command with take_activation and take_reset_request, which clear the field under the "Write 1, Device Clears" contract. RamStaging backs the FIFO and implements ByteSource, the trait VerifySession::poll reads a candidate through, so the verifier reads a staged image with no adapter. ByteSource lives in util/io, a leaf crate, so services/ocp-recovery/server takes no dependency on the orchestrator driver. The inherent methods are staged_len and staged_is_empty, because they answer for the bytes pushed so far, while the ByteSource methods answer for the announced image. services/ocp-recovery/server is host-testable with no kernel dependencies, like services/i2c/server next to services/i2c/server-runtime. The interface instance is meant to live in the i2c server-runtime loop, because only that loop can answer an SMBus read before the clock-stretch budget runs out. Signed-off-by: Christina Quast <christina.quast@9elements.com>
chrysh
force-pushed
the
ocp-recovery-registers
branch
from
November 13, 2026 17:01
e695b3f to
09c6544
Compare
chrysh
force-pushed
the
ocp-recovery-server
branch
from
November 13, 2026 17:01
7243d9e to
46611d2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#35 holds the register layouts, and no code in the tree answers an access from the Recovery Agent.
dispatchanswers one access: it takes a command byte, an optional write payload and a response buffer, serves the register bytes and drainsINDIRECT_FIFO_DATAinto aFifoSink.dispatchlatches the protocol error of a refused access into DEVICE_STATUS byte 1, and the DEVICE_STATUS read clears it.The dispatch decides no policy. An accepted RECOVERY_CTRL or DEVICE_RESET write sets the register, and the caller reads the command with
take_activationandtake_reset_request, which clear the field the device acted on.RecoveryInterfaceholds one instance of every recovery register. The name follows Caliptra, which calls the same block the secure firmware recovery interface (sec_fw_recovery_if) in hardware. The instance is meant to live in the i2c server-runtime loop, because only that loop can answer a read within the clock-stretch budget.RamStagingimplementsByteSourcefromutil/io, the traitVerifySession::pollreads a candidate through, so the verifier reads a staged image with no adapter.Stack, review in order:
The same commit is upstream as OpenPRoT#629.