Skip to content

ast10x0: Wire SGPIOM pin 42 to the bl1 boot checkpoint - #472

Draft
chrysh wants to merge 2 commits into
OpenPRoT:mainfrom
9elements:wire-bl1-gpio42
Draft

chrysh wants to merge 2 commits into
OpenPRoT:mainfrom
9elements:wire-bl1-gpio42

Conversation

@chrysh

@chrysh chrysh commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds target/ast10x0/boot_evidence/: the first concrete board-level
    EvidenceReader impl, wiring the BMC's bl1 checkpoint to SGPIOM pin 42
    (bank EH, bit 10, active-high) via GpioBootMonitor.
  • BmcSignal enum is the board's boot-signal vocabulary (one variant for now).
  • BMC_DEVICE constant holds the device table entry: one checkpoint, 500 ms
    window.
  • BmcBootReader dispatches signal to monitor; the platform driver constructs
    it at bring-up.
  • Pin offset and polarity exported as production consts (BL1_PIN_OFFSET,
    BL1_POLARITY); the typed SgpiomMask binding lands with the platform
    driver.

Stacked on #471, review the last commit only.

Open questions

  1. reset_signal: 0 in BMC_DEVICE is a placeholder, nothing consumes it
    yet. Real value lands with the reset-controller wiring.
  2. Active-high polarity is assumed pending schematic confirmation.
  3. Reader construction (the BmcBootReader::new call with a real
    SgpiomBankPort) lands with the platform-driver PR.

Test plan

  • bazel test //target/ast10x0/boot_evidence:ast10x0_boot_evidence_test (3 host tests: Booted/Booting dispatch, table shape)

CheckpointWalk<R, G> walks a device's BootCheckpoints in declaration
order, polling an EvidenceReader at each step and judging per-checkpoint
windows against caller-injected now_millis. Read errors are treated as
silence (Booting), lapsed windows are timeouts with no last-chance read.

The QEMU runtime itest (scenarios 1-2) now uses CheckpointWalk directly
instead of the hand-rolled checkpoint loop, separating walk judgment from
BootWatchdogs scheduling. Scenarios 3-5 (BootWatchdogs multiplexing and
commit watchdog) are unchanged.

The config crate's BootCheckpoint type gets a wiring example showing
three GPIO checkpoints with pin bindings.

Assisted-by: Claude (anthropic.com)
BmcBootReader dispatches BmcSignal::Bl1 to a GpioBootMonitor bound at
bring-up to pin 42 (bank EH, bit 10, active-high). BMC_DEVICE holds the
device table constant: one checkpoint, 500 ms window.

The crate is host-testable against a mock GPIO port; 3 tests cover
Booted/Booting dispatch and the device-table shape. The platform driver
constructs the reader and hands it to CheckpointWalk at wiring time.

Depends on OpenPRoT#471 (CheckpointWalk).

Assisted-by: Claude (anthropic.com)
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