Skip to content

services: Add the HW_STATUS and indirect FIFO layouts - #881

Merged
chrysh merged 1 commit into
OpenPRoT:ocp-streaming-recoveryfrom
9elements:ocp-streaming-registers-4
Dec 1, 2026
Merged

chrysh merged 1 commit into
OpenPRoT:ocp-streaming-recoveryfrom
9elements:ocp-streaming-registers-4

Conversation

@chrysh

@chrysh chrysh commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

This PR adds the HW_STATUS, INDIRECT_FIFO_CTRL and
INDIRECT_FIFO_STATUS layouts of OCP Secure Firmware Recovery 1.2 to
services/ocp-recovery/api/src/regs/, on top of the command table and the
register layouts already on ocp-streaming-recovery.

IndirectFifoStatus::code_region refuses a max transfer size of 0, which
lets the Recovery Agent push no byte, and a max transfer size above the
usable capacity of the FIFO, the FIFO size minus 1 entry. The spec only
recommends a FIFO size bigger than the max transfer size, but the Device
NACKs each transfer that would make the Write Index equal the Read Index.
So the FIFO holds at most the usable capacity, and the Device NACKs every
transfer of more bytes than the usable capacity. A Recovery Agent still
parses any FIFO size and max transfer size a Device reports.

IndirectFifoStatus::space_remaining_bytes and occupancy_bytes follow the
FIFO formulas of OCP Recovery 1.2, in which the FIFO keeps 1 entry free.
IndirectFifoStatus::advance_indices wraps both indices at the FIFO size,
as the Caliptra i3c-core does, so the write index the device reports
equals the index a Recovery Agent computes when it counts modulo the
FIFO size. HwStatus::default reports CompositeTemperature::Unavailable,
because a temperature byte of 0 reads as 0 degrees Celsius.

Signed-off-by: Christina Quast <christina.quast@9elements.com>
Assisted-by: Claude Fable 5.2
@chrysh
chrysh merged commit b36f911 into OpenPRoT:ocp-streaming-recovery Dec 1, 2026
4 of 5 checks passed
@chrysh
chrysh deleted the ocp-streaming-registers-4 branch December 1, 2026 13:57
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