Skip to content

services: Add the OCP recovery register layouts - #35

Open
chrysh wants to merge 1 commit into
ocp-global-demo-wipfrom
ocp-recovery-registers
Open

chrysh wants to merge 1 commit into
ocp-global-demo-wipfrom
ocp-recovery-registers

Conversation

@chrysh

@chrysh chrysh commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

First of three. The eRoT serves the OCP Recovery interface as the device and the BMC drives it as the Recovery Agent. This holds the half that does not depend on the transport: the command codes 0x22 to 0x2f, the byte layouts, the field encodings and the rules for which accesses the device refuses.

The AST1030 has no OCP recovery silicon, so firmware keeps the access semantics the agent expects from hardware. "Write 1, Device Clears" means the agent writes the command value and the device zeroes the field once it has acted, not a bitwise clear of the written bits.

Stack, review in order:

  1. this PR, the register layouts
  2. the device dispatch, based on this branch
  3. the Recovery Agent sequence test, based on the dispatch

The same work is upstream as OpenPRoT#628, where both branches share one base and the diffs overlap. This stack exists so each PR shows one commit.

The eRoT serves the OCP Recovery interface as the device and the BMC
drives it as the Recovery Agent. This crate holds the half that does not
depend on the transport: the command codes 0x22 to 0x2f, the byte
layouts, the field encodings and the rules for which accesses the device
refuses. The SMBus framing, the PEC and the register file the
server-runtime owns come later, so the crate stays host-testable and
free of kernel dependencies.

The AST1030 has no OCP recovery silicon, so firmware has to keep the
access semantics the agent expects from hardware. "Write 1, Device
Clears" means the agent writes the command value and the device zeroes
the field once it has acted, not a bitwise clear of the written bits:
each of the three fields that work that way has an apply_agent_write and
a clear_*, and writing 0x1 to the activate field is refused rather than
leaving 0xe behind.

The writes take a fixed-size array so the length is settled by the type,
and RecoveryCommand::check_write resolves it where the bytes arrive off
the wire.

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

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant