docs: PLDM/orchestrator IPC design - #458
Open
chrysh wants to merge 2 commits into
Open
Conversation
Sequence diagram covering the two-channel IPC architecture between the PLDM FirmwareDevice service and the orchestrator. Covers the notify channel (pre-transfer veto), intake channel (offer/write/complete/poll), async effect chain with poll_stage, USER signal nudge, and FD-initiated PLDM commands. Includes verified findings: USER signal is level-triggered (no lost wakeups), MCTP server buffers 4 messages independently while PLDM is in a transact, and poll_stage worst case is bounded by flash erase time. Assisted-by: Claude
The HTML is a personal interactive version. The mermaid renders natively on GitHub and is easier for reviewers to comment on inline. Assisted-by: Claude
chrysh
marked this pull request as ready for review
September 7, 2026 15:19
chrysh
requested review from
CourtneyDrant,
FerralCoder,
embediver,
leongross and
rusty1968
September 7, 2026 15:19
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.
Summary
Related project board items (OpenPRoT PFR):
Design decisions (settled):
sequenceDiagram participant UA as UA (BMC)<br/>remote, over MCTP participant PLDM as PLDM FirmwareDevice<br/>single thread: run_terminus participant Orch as Orchestrator<br/>single thread: object_wait loop participant Flash as Shared Storage<br/>ext. SPI flash Note over UA, Orch: NOTIFY CHANNEL (pre-transfer veto) UA->>PLDM: RequestUpdate (MCTP) activate PLDM PLDM->>Orch: channel_transact: Request::UpdateRequested Note right of Orch: check state, policy Orch-->>PLDM: Response::Accepted | Rejected deactivate PLDM Note over UA, Orch: if Accepted: INTAKE CHANNEL activate PLDM PLDM->>Orch: Offer { target: TargetId, total: u64 } Note right of Orch: validate target + length,<br/>reserve staging Orch-->>PLDM: IntakeStatus::Receiving { written: 0, total } deactivate PLDM loop FD pulls chunks from UA via RequestFirmwareData PLDM->>UA: RequestFirmwareData (MCTP) UA-->>PLDM: firmware chunk response PLDM-->>Flash: write firmware bytes (direct, no IPC) activate PLDM PLDM->>Orch: Write { offset: u64, len: u16 } Note right of Orch: track contiguous prefix Orch-->>PLDM: IntakeStatus::Receiving { written, total } deactivate PLDM opt status poll activate PLDM PLDM->>Orch: Poll Orch-->>PLDM: IntakeStatus deactivate PLDM end end activate PLDM PLDM->>Orch: Complete Note right of Orch: check coverage,<br/>queue Pending::UpdateRequest Orch-->>PLDM: IntakeStatus deactivate PLDM Note over UA, Flash: async: orchestrator event loop drains pending PLDM->>UA: TransferComplete (MCTP) Note over PLDM: PLDM FREE:<br/>services UA on MCTP<br/>MCTP responsive Note over Orch, Flash: EFFECT CHAIN (non-blocking steps)<br/>1. poll_pending<br/>2. SM: Ready -> Updating<br/>3. poll_stage (one step)<br/>4. return to object_wait<br/>repeat 3-4 until phase done<br/>IPC responsive between steps Orch-->>Flash: PayloadSource::read_at Flash-->>Orch: payload bytes Orch->>PLDM: object_set_peer_user_signal<br/>(dataless nudge, wakes WaitGroup) loop wake on USER signal, poll status, send *Complete to UA activate PLDM PLDM->>Orch: Poll Note right of Orch: read latched IntakeStatus Orch-->>PLDM: Authenticating | Staging | Activated | Failed deactivate PLDM Note over PLDM, UA: when phase done: PLDM->>UA: VerifyComplete (MCTP) UA->>PLDM: ActivateFirmware (MCTP, explicit) PLDM->>UA: ApplyComplete (MCTP) end Note over PLDM: FD must know phase completion to initiate these.<br/>Activate is on the wire, not implicit after staging. Note over UA, Orch: any time activate PLDM PLDM->>Orch: Abort Orch-->>PLDM: IntakeStatus::Idle deactivate PLDM Note over UA, Flash: Blocking direction: always PLDM -> Orchestrator, never the reverse.<br/>Every IPC response is immediate. Effects run async via poll_stage (one step, return, repeat).<br/>PLDM stays free to service UA on MCTP. USER signal nudge replaces blind polling.<br/>FD initiates TransferComplete, VerifyComplete, ApplyComplete.Test plan
Assisted-by: Claude