Skip to content

dev-qemu: Incorporate HID time-alarm - #53

Merged
kurtjd merged 2 commits into
OpenDevicePartnership:mainfrom
kurtjd:dev-qemu-hidi2c
Oct 9, 2026
Merged

kurtjd merged 2 commits into
OpenDevicePartnership:mainfrom
kurtjd:dev-qemu-hidi2c

Conversation

@kurtjd

@kurtjd kurtjd commented Oct 9, 2026

Copy link
Copy Markdown
Member

This incorporates the latest hid-i2c-target service and the latest HID relay support for time-alarm into the dev-qemu platform.

I kept mctp/uart support for battery and thermal (since they do not have HID drivers or HID relay support yet), but simultaneously support both uart/mcp AND hid for time-alarm (so it can receive requests from both transports during runtime). Just removed the old HID stub just to complete the handshake and replaced it with the HID time-alarm setup.

Moved the uart/mctp setup code to its own module as well.

Tested end-to-end in qemu with ec-test-cli.exe --source windows rtc get-real-time (and other rtc commands) in WinVOS. Though this exposed a bug in my QEMU i2c controller where continuous reads of more than 256 bytes behaved incorrectly, so will have PRs up to fix that shortly.

@kurtjd kurtjd self-assigned this Oct 9, 2026
Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:06
@kurtjd
kurtjd requested a review from a team as a code owner October 9, 2026 18:06
@kurtjd kurtjd added this to EC Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The 361-byte HID descriptor exceeds the known-broken 256-byte QEMU continuous-read boundary.

2 open findings
What changed in this PR

Adds HID-over-I2C time-alarm support to dev-qemu while retaining UART/MCTP access.

Changes:

  • Shares the time-alarm service across HID and MCTP relays.
  • Replaces the HID stub with hidi2c-target-service.
  • Updates service dependencies and lockfiles.
File Description
platform/​platform-common/​src/​mock/​mod.rs Exposes the shared time-alarm handle.
platform/​platform-common/​src/​lib.rs Uses the namespaced MCTP relay.
platform/​platform-common/​Cargo.lock Updates service dependencies.
platform/​dev-qemu/​src/​mctp.rs Extracts UART/MCTP setup.
platform/​dev-qemu/​src/​main.rs Starts both transports.
platform/​dev-qemu/​src/​hid.rs Configures HID time-alarm relay.
platform/​dev-qemu/​Cargo.toml Adds HID and time-alarm dependencies.
platform/​dev-qemu/​Cargo.lock Resolves updated dependencies.
platform/​dev-npcx/​Cargo.lock Updates shared dependency resolution.
platform/​dev-mec/​Cargo.lock Updates shared dependency resolution.
platform/​dev-mcxa/​Cargo.lock Updates shared dependency resolution.
platform/​dev-imxrt/​Cargo.lock Updates shared dependency resolution.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread platform/dev-qemu/src/hid.rs
Comment thread platform/dev-qemu/src/main.rs Outdated
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

williampMSFT
williampMSFT previously approved these changes Oct 9, 2026

@williampMSFT williampMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

tullom
tullom previously approved these changes Oct 9, 2026
@kurtjd
kurtjd dismissed stale reviews from tullom and williampMSFT via de22288 October 9, 2026 18:45
@kurtjd
kurtjd requested review from tullom and williampMSFT October 9, 2026 18:47
@kurtjd

kurtjd commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@tullom @williampMSFT Apologize for churn, just had to update cargo vet imports :(

@kurtjd
kurtjd merged commit 458962a into OpenDevicePartnership:main Oct 9, 2026
40 checks passed
@kurtjd
kurtjd deleted the dev-qemu-hidi2c branch October 9, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants