Skip to content

Add secure-world UCSI test stub - #90

Draft
dymk wants to merge 3 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/ucsi-test-stub
Draft

Add secure-world UCSI test stub#90
dymk wants to merge 3 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/ucsi-test-stub

Conversation

@dymk

@dymk dymk commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a deterministic UCSI 1.2 FF-A service for the QEMU secure partition
  • support capability, connector-capability, and connector-status reads for one fake connected sink
  • register the service in the repository QEMU SP and advertise its UUID
  • validate hand-encoded fixtures against current embedded-usb-pd in host-only tests

Scope

The stub is synchronous and secure-world-only. It does not add EC relay, PD hardware, notifications, or native Windows UCSI class-driver integration.

Validation

Related

dymk added 3 commits July 31, 2026 22:00
Add a deterministic, secure-world-only UCSI PPM stub so the OS side can
exercise the UCSI-over-FF-A path against QEMU. The `Ucsi` FF-A service
(UUID 65467f50-...) reads the doorbell tag at payload byte 0 and the
48-byte UCSI mailbox inline from bytes 1..49, parses the CONTROL opcode
at mailbox offset 8, and returns the updated mailbox at response offset 0.

Implements GET_CAPABILITY (0x06), GET_CONNECTOR_CAPABILITY (0x07,
connector 1) and GET_CONNECTOR_STATUS (0x12, connector 1) with fixed
fake data for a single connected USB-PD sink; unknown opcodes and
invalid connectors return CCI not_supported with a zeroed MESSAGE IN.

MESSAGE IN payloads and CCI are hand-encoded (embedded-usb-pd does not
compile for aarch64-unknown-none), and a host-only wire-format gate test
round-trips each fixture through the upstream embedded-usb-pd encoder to
prove the const bytes are valid UCSI 1.2 wire data. embedded-usb-pd is
added as a dev-dependency-only oracle, mirroring battery.rs.

Assisted-by: GitHub Copilot:claude-opus-4.8
Copilot-Session: 6cb7060d-6d47-49ad-a710-428fe4c2f3dc
Pin the host-only embedded-usb-pd oracle to current main, where the
obsolete macro dependency chain has been removed. Enable its explicit UCSI
v1.2 feature and update the test imports for the versioned module.

Document the remaining test-only bincode advisory and cargo-vet
exemptions. None of these dependencies are linked into secure-partition
builds.

Assisted-by: GitHub Copilot:gpt-5.6-sol
Copilot-Session: 6cb7060d-6d47-49ad-a710-428fe4c2f3dc
Append the deterministic UCSI service to the repository QEMU secure
partition and advertise its UUID in the partition manifest. This keeps the
standalone QEMU SP coherent with the new service library.

Assisted-by: GitHub Copilot:gpt-5.6-sol
Copilot-Session: 6cb7060d-6d47-49ad-a710-428fe4c2f3dc
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