Switch all platforms to the MctpSerial uart-service#36
Merged
dymk merged 1 commit intoJul 2, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates all embedded controller platforms to drive uart-service using DSP0253 serial framing by switching from uart_service::DefaultService::default_smbusespi to uart_service::MctpSerialService::default_mctp_serial, aligning the EC link with the rest of the stack’s MCTP serial medium. It also bumps the pinned ec-test-cli revision used by the dev-qemu integration test workflow so CI exercises the new framing end-to-end.
Changes:
- Switch
uart-serviceinitialization across all five platforms toMctpSerialService::default_mctp_serial(...)and update the correspondingStaticCelltype. - Replace
unwrap()with a descriptiveexpect(...)on uart-service initialization failure paths. - Update the GitHub Actions integration-test workflow to use a newer pinned
ec-test-clirevision.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| platform/dev-qemu/src/main.rs | Switch QEMU platform uart-service initialization to MctpSerialService::default_mctp_serial. |
| platform/dev-npcx/src/main.rs | Switch NPCX platform uart-service initialization to MctpSerialService::default_mctp_serial. |
| platform/dev-mec/src/main.rs | Switch MEC platform uart-service initialization to MctpSerialService::default_mctp_serial. |
| platform/dev-mcxa/src/main.rs | Switch MCXA platform uart-service initialization to MctpSerialService::default_mctp_serial. |
| platform/dev-imxrt/src/main.rs | Switch i.MXRT platform uart-service initialization to MctpSerialService::default_mctp_serial. |
| .github/workflows/check.yml | Update the pinned ec-test-cli revision used by the dev-qemu integration-test job. |
Every platform drove its uart-service through `DefaultService::default_smbusespi` (SMBus/eSPI framing). Switch all five to `MctpSerialService::default_mctp_serial` so the EC link speaks DSP0253 serial (`MctpSerialMedium`) — the same framing the rest of the stack now uses — and retire the SMBus/eSPI path. `ec-test-cli` was updated to speak DSP0253 in odp-platform-common; bump `EC_TEST_CLI_REV` to that revision so the dev-qemu integration test exercises the unified wire format end to end. Assisted-by: GitHub Copilot:claude-opus-4.8
a2941cd to
d1ec9f0
Compare
philgweber
approved these changes
Jul 2, 2026
kurtjd
approved these changes
Jul 2, 2026
philgweber
approved these changes
Jul 2, 2026
dymk
added a commit
to OpenDevicePartnership/embedded-services
that referenced
this pull request
Jul 6, 2026
Final step of the DSP0253 serial-framing unification: the SMBus/eSPI uart-service convenience path has no remaining callers, so this removes it. ## Context This completes the cascade that moved the EC ↔ SP UART relay off the hand-rolled SMBus/eSPI framing and onto DSP0253 serial (`MctpSerialMedium`): - OpenDevicePartnership/odp-platform-common#132 — `ec-test-lib` → DSP0253 - OpenDevicePartnership/odp-embedded-controller#36 — all 5 EC platforms → `default_mctp_serial` - #906 — added the `default_mctp_serial` constructor With every consumer now on `MctpSerialService::default_mctp_serial`, `default_smbusespi` and the `DefaultService` alias are dead code. ## Change `uart-service/src/lib.rs` only: - Remove the `DefaultService<R>` alias and its `default_smbusespi` constructor. - Drop the now-unused `SmbusEspiMedium` / `SmbusEspiReplyContext` imports. - Update the module doc to point at `MctpSerialService`. `SmbusEspiMedium` itself is untouched — it stays in `mctp-rs` and remains in use by `espi-service` and the relay layer. Only the uart-service convenience wrapper is retired; the generic `Service<R, M>` can still be built with any medium via `Service::new`. ## Verification - `cargo build` / `cargo clippy --all-targets` — clean - `cargo test` — 245 passed / 5 ignored - `cargo deny check advisories` + `cargo vet` — pass - Confirmed zero remaining `default_smbusespi` / `DefaultService` references (incl. examples) Assisted-by: GitHub Copilot:claude-opus-4.8
dymk
added a commit
to dymk/odp-platform-qemu-sbsa
that referenced
this pull request
Jul 7, 2026
Point mod/ec at the upstream EC that builds every platform on MctpSerialMedium unconditionally (OpenDevicePartnership/odp-embedded-controller#36), so the harness builds dev-qemu with the SP DSP0253 serial framing by default -- no sp-serial feature flag needed. Restore the mod/ec .gitmodules url to OpenDevicePartnership now that the EC change is upstream, so the check-submodules guard passes. Assisted-by: GitHub Copilot:claude-opus-4.8
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
Every platform drove its uart-service through
DefaultService::default_smbusespi(SMBus/eSPI framing). This switches all five —dev-imxrt,dev-mcxa,dev-mec,dev-npcx,dev-qemu— toMctpSerialService::default_mctp_serial, so the EC link speaks DSP0253 serial (MctpSerialMedium), the same framing the rest of the stack now uses, and retires the SMBus/eSPI path.This is the EC step of unifying the EC link on DSP0253 serial:
odp-platform-common—ec-test-lib/ec-test-cli→ DSP0253 (OpenDevicePartnership/odp-platform-common#132, merged).default_mctp_serial, and bump theec-test-clipin to that merge.embedded-services: retire the now-unuseduart_service::default_smbusespi.What changed
platform/*/src/main.rs(all 5):uart_service::DefaultService::default_smbusespi(relay).unwrap()→uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service"), and the matchingStaticCelltype. The diff is identical across all five platforms..github/workflows/check.yml:EC_TEST_CLI_REV→2034778(the merged DSP0253ec-test-cli), so thedev-qemuintegration-test job exercises the unified wire format end to end.Testing
cargo build --locked --release,cargo clippy --locked -- -D warnings, andcargo fmt --checkpass for all five platforms.scripts/integration-test.sh(buildsdev-qemuand drives it with the bumpedec-test-cli) passes — all thermal/battery/RTC commands round-trip over DSP0253, including the multi-packetbattery get-bixresponse.Note
dev-mecis switched here for consistency (and so it doesn't break whendefault_smbusespiis later removed), but note it is not currently part of the CI matrix incheck.yml— its build/lint are not exercised by CI.