Repository navigation
Conversation
238f846 to
608c5c4
Compare
45980fd to
69da753
Compare
03afde5 to
038db46
Compare
038db46 to
9f03678
Compare
9f03678 to
f69ced9
Compare
swenson
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
f69ced9 to
de1f5b6
Compare
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:
0x2dto0x2f) and refuses the indirect memory window (0x29to0x2b). The OpenBMC Recovery Agent proposed under theocp-fw-recoverytopic 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.dispatchfunction, which runs in firmware, may miss the response window. The alternatives are a hardware I3C target, SMBus or USB.LockdownLatchserve the interface? The latch is one-way, so a streamed image that runs after the latch undoes the safe state.