-
Notifications
You must be signed in to change notification settings - Fork 187
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
WIP - Measure the SP on SP_RESET signal interrupt #1946
Draft
lzrd
wants to merge
14
commits into
master
Choose a base branch
from
attest-sp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 554 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
552 | 2 | 0 | 0 |
Click to see the invalid file list
- lib/endoscope/src/main.rs
- lib/endoscope/src/shared.rs
Add interrupt-related API calls to the LPC55 `gpio_driver`. A task on an LPC55 can now configue and use GPIO interrupts. app.toml example shows Pin Interrupt configuration: [tasks.foo] ... interrupts = { "pint.irq0" = "button-irq" } ... task-slots = ["gpio_driver", ...] [tasks.foo.config] pins = [ { name="BUTTON', pin={ port=1, pin=9}, alt=0, pint=0, direction="input", opendrain="normal" } ]
…API. The functions: fn {clear,detected,disable,enable}_{rising,falling,status}(PintSlot) and fn read_pint_status(...) become fn pint_op(PintSlot, PintOp, PintCondition) This leaves a couple permutations not covered (enable/disable interrupt at the NVIC level). Those can are left as no-ops for the time being. Future: The unimplemented combinations could return an error/fault if called.
…EADME.md Feedback response: Fix idl/lpc55-pins.idol to use Option<PintSlot>. Feedback response: Collapse the many PINT calls in lpc55-pins.idol to one `pint_op`
Co-authored-by: Eliza Weisman <[email protected]>
Co-authored-by: Eliza Weisman <[email protected]>
Generate separate GPIO pin setup functions for named pins. This allows easier switching between pin configurations at runtime. Note: Hiffy commands db_measure_sp and db_reset_sp are there temporarily for testing.
…task. endoscope: An injectable clode blob covered by the RoT signature. - Configure STM32H7 clocks in endoscope for best performance. - Use ITCM/DTCM for better performance. - Build injected SP measurement blob as a cargo bindep artifact. attest: - Add `reset`, and `reset_and_record` to the attest task. - Only tasks listed in `[tasks.attest.config]` are allowed to reset the log. - Unauthorized tasks get Err(ClientError::AccessViolation. swd: Owns JTAG and SP_RESET detection and measures the SP. - On JTAG dongle present or other failure, don't record a bogus FWID, just reset the log.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
af0adde
to
bb29475
Compare
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.
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.