Skip to content

TPM Service Update for Spec v1.1 - #102

Merged
Raymond-MS merged 5 commits into
OpenDevicePartnership:mainfrom
Raymond-MS:personal/rdiaz/TpmService1.1
Oct 21, 2026
Merged

Raymond-MS merged 5 commits into
OpenDevicePartnership:mainfrom
Raymond-MS:personal/rdiaz/TpmService1.1

Conversation

@Raymond-MS

Copy link
Copy Markdown
Collaborator

Description

Updated the TPM service to include changes from the most recent v1.1 CRB Over FF-A specification. This includes the changes to manage_locality and the addition of get_crb_info. Updated the TPM service to allow for all registers to be accessible. This was needed for get_crb_info. Added tests for get_crb_info and updated the tests for manage_locality. The changes to only allow opening/closing locality2/3 required changes to other tests as well which were opening and closing locality0. Updated the mod.rs file to expose the TPM SST which will allow other developers including the TPM service to provide their own implementation of the TPM SST. Updated Safety comments. Fixed Clippy issues.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Ran all UnitTests

Integration Instructions

N/A

…CRB Over FF-A specification. This includes the changes to manage_locality and the addition of get_crb_info. Updated the TPM service to allow for all registers to be accessible. This was needed for get_crb_info. Added tests for get_crb_info and updated the tests for manage_locality. The changes to only allow opening/closing locality2/3 required changes to other tests as well which were opening and closing locality0. Updated the mod.rs file to expose the TPM SST which will allow other developers including the TPM service to provide their own implementation of the TPM SST. Updated Safety comments. Fixed Clippy issues.
@Raymond-MS
Raymond-MS requested a review from kuqin12 October 7, 2026 18:52
@Raymond-MS
Raymond-MS requested a review from a team as a code owner October 7, 2026 18:52
@Raymond-MS
Raymond-MS requested review from dymk, maxperga-msft, philgweber and rogurr and a balanced review from Copilot October 7, 2026 18:52

Copilot AI 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.

🟡 Changes recommended

The reported interface version and CRB control address are incorrect for v1.1 clients.

5 open findings
What changed in this PR

Updates the TPM service for CRB over FF-A v1.1 and enables custom SST implementations.

Changes:

  • Adds GetCrbInfo and revised locality management.
  • Expands response payloads to all FF-A registers.
  • Exposes SST interfaces and updates safety documentation/tests.
File Description
ec-service-lib/​src/​services/​tpm.rs Implements v1.1 operations and tests.
ec-service-lib/​src/​services/​tpm_sst.rs Strengthens SST safety contracts.
ec-service-lib/​src/​services/​mod.rs Exports SST extension types.

🧠 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 ec-service-lib/src/services/tpm.rs Resolved
Comment thread ec-service-lib/src/services/tpm.rs Resolved
Comment thread ec-service-lib/src/services/tpm.rs Resolved
Comment thread ec-service-lib/src/services/tpm.rs Resolved
Comment thread ec-service-lib/src/services/tpm.rs Resolved
@Raymond-MS
Raymond-MS force-pushed the personal/rdiaz/TpmService1.1 branch from ef01b86 to 970db51 Compare October 7, 2026 19:17

Copilot AI 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.

🔵 Needs a closer look

The invalid-operation test now passes through locality validation without testing its intended branch.

0 open findings

5 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Update test locality to reach invalid-operation validation

ec-service-lib/​src/​services/​tpm.rs:620

The new early locality check means test_manage_locality_invalid_function (which sends locality 0) now returns InvArg here, before reaching the invalid-operation branch. Change that test to use locality 2 or 3 so it still verifies operation validation rather than passing for the wrong reason.

🧠 Review effort: Balanced

…ality and not the function. Test was passing but not for the correct reasons. Fixed.
kurtjd
kurtjd previously approved these changes Oct 7, 2026
@Raymond-MS

Copy link
Copy Markdown
Collaborator Author

@dymk @philgweber Could I get a review on this please? It has been up for a couple weeks now.

@kuqin12 If you have time, I would like you to take a quick look as well.

Thanks!

Comment thread ec-service-lib/src/services/tpm.rs Resolved
Comment thread ec-service-lib/src/services/tpm_sst.rs Resolved
kurtjd
kurtjd previously approved these changes Oct 20, 2026
@Raymond-MS
Raymond-MS merged commit 1422b1c into OpenDevicePartnership:main Oct 21, 2026
10 checks passed
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.

4 participants