-
Notifications
You must be signed in to change notification settings - Fork 18
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
Hardware revoker control re-mastered #358
Conversation
Update code from upstream repository https://github.com/microsoft/cheriot-safe.git to revision 5fd7f427a65da675bd214e752c3e30fc1d19a54a * Factor tbre_go logic into write operations (Marno van der Maas) * Fix interrupt status when interrupts are disabled (Marno van der Maas) * Remove go and interrupt from read registers (Marno van der Maas) Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
Including: - Start address - End address - Go (hardware extended) - Epoch - Interrupt status (hardware extended) - Interrupt enable
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.
Thanks @marnovandermaas
We can address the potential testing extension in a follow up PR. For sunburst-chip we'll need to do a more in-depth test anyway so perhaps not worth spending time on this now.
bnez t2, fail | ||
li t2, 1 | ||
csw t2, 20(ct1) // Enable interrupts | ||
csw t2, 8(ct1) // Start sweep |
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.
Shouldn't we extend the test to ensure the revoker finishes and setup something for it to revoke? As is we're testing it doesn't report it's running if we haven't started it and that we're not immediately deadlocking the CPU by starting it off.
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.
Yes, at the moment I am running this test in simulation and checking the waveform to see if it does what I expect. Let me see if I can extend this a bit so that it at least tests something in case no-one looks at the waveform.
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.
I've at least checked the interrupt status now, but I agree we should probably add an actual revocation in here.
Implements the core logic of revocation control, mimicking the one found in CHERIoT Safe but then using the registers generated by reggen.
86a30e4
to
03d7962
Compare
I've fixed the revocation control interrupt output, it wasn't working properly before. The CHERIoT RTOS test suite passes with these latest changes as well. |
The hardware revoker was controlled by a memory mapped register from the CHERIoT Safe repository. This PR ports this to use reggen registers. This will make the IP more portable, specifically for the Sunburst chip repository.