battery: Add get-bix and set-btp support - #94
Open
kurtjd wants to merge 1 commit into
Open
Conversation
kurtjd
requested review from
kat-perez,
maxperga-msft,
philgweber and
rogurr
September 4, 2026 20:10
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Implements the required commands with explicit serialization/dispatch tests and a minimal relay-side buffer adjustment to support the larger response size.
Pull request overview
This PR adds the missing battery relay functionality required by the EC test apps by extending the Battery FFA service to support GetBix and SetBtp in addition to the existing GetBst path.
Changes:
- Introduces a typed
BatteryCommandenum and addsget_bix/set_btprelay methods with fixed-size decoding/encoding. - Extends the FFA direct-request handler to dispatch
GetBix,GetBst, andSetBtp. - Adds wire-format compatibility tests for
GetBixandSetBtp, and increases the EC relay RX packet buffer to accommodate larger replies.
File summaries
| File | Description |
|---|---|
| ec-service-lib/src/services/ec_relay.rs | Enlarges the per-call RX packet buffer to handle larger framed responses (needed for BIX-sized payloads). |
| ec-service-lib/src/services/battery.rs | Adds GetBix/SetBtp command support end-to-end (relay + FFA dispatch) with gate tests to lock the wire format. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
RobertZ2011
approved these changes
Sep 4, 2026
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.
Need to support get-bix and set-btp since these are required by our EC test apps. Tested with the test-cli app within th WinVOS image running on QEMU.
Resolves #93