WIP - Measure the SP on SP_RESET signal interrupt #1946
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.
This is a work in progress. Measurement currently takes 12.8s and we'd like to improve that or accommodate that delay before merging.
That's in addition to any feedback that people may have.
Testing SP measurement
Checkout hubris branch
attest-sp
Measure on SP Reset:
Hit the reset button on the SP or use the SpCtrl.db_reset_sp function:
humility --archive=$ARCHIVE hiffy -c SpCtrl.db_reset_sp -a delay_ms=10 sleep 13
See traces
The ringbuf trace in
swd
andattest
tasks have the interesting information including the time expended:humility --archive=$ARCHIVE ringbuf
Dump the attestation log:
humility --archive=$ARCHIVE hiffy -c Attest.log -a offset=0 -n 256 -o out hexdump -C out
Run the measurement without resetting the SP:
humility --archive=$ARCHIVE hiffy -T20 -c SpCtrl.db_measure_sp
Notes
attest
task needs areset_log_and_record
function usable only by theswd
task.attest
task. Is that the right thing to do? TBD.db_measure_sp
anddb_reset_sp
are there for development and will be removed before merge. It should be sufficient to reset the SP if attestation needs to be refreshed.