Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-initialize DPE with the RT Journey PCR #1167

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

sree-revoori1
Copy link
Contributor

@sree-revoori1 sree-revoori1 commented Dec 8, 2023

Currently, there is a bug in RT where Drivers::get_dpe_root_context_idx returns the incorrect DPE context index. This function searches for the context whose parent is 0xFF, which indicates that that context is the root. However, DPE is auto-initialized and then DeriveChild is called in order to measure the RT journey PCR into a child context. This means the root context does not contain the RT journey PCR which is incorrect.

With the change in chipsalliance/caliptra-dpe#278, we are able to auto-initialize DPE with a measurement. Using that, we now auto-initialize DPE with the RT journey PCR so that we don't have an extraneous default measurement in DPE.

This PR also updates tagging behavior to allow GET_TAGGED_TCI on retired contexts and disallow TAG_TCI on retired contexts. The test has been updated accordingly.

This PR also adds a test that checks that measurements are stored in DPE when STASH_MEASUREMENT is called.

Fixes #1118
Fixes #1169

@sree-revoori1 sree-revoori1 marked this pull request as draft December 8, 2023 15:18
@sree-revoori1 sree-revoori1 force-pushed the auto_init branch 3 times, most recently from 5dee000 to 220218b Compare December 8, 2023 21:30
@sree-revoori1 sree-revoori1 marked this pull request as ready for review December 8, 2023 21:30
runtime/src/invoke_dpe.rs Outdated Show resolved Hide resolved
dpe Outdated Show resolved Hide resolved
@jhand2 jhand2 enabled auto-merge (rebase) December 8, 2023 23:06
@jhand2 jhand2 merged commit d58cb26 into chipsalliance:main Dec 8, 2023
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
2 participants