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

Fix initialisation of MTCC register. #17

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Fix initialisation of MTCC register. #17

merged 1 commit into from
Nov 6, 2023

Conversation

rmn30
Copy link
Collaborator

@rmn30 rmn30 commented Nov 6, 2023

The ISA doc says that MTCC should be initialised to the executable root. This makes sense as it needs to be executable to be used as the trap vector. Sail was erroneously setting it to the memory RW root, so fix it here. cheriot-rtos never actually uses this initial value: instead it writes MTCC with a PCC derived capability, hence why this was not noticed before. Spotted by @kliuMsft .

The ISA doc says that MTCC should be initialised to the executable
root. This makes sense as it needs to be executable to be used as the
trap vector. Sail was erroneously setting it to the memory RW root, so
fix it here. cheriot-rtos never actually uses this initial value:
instead it writes MTCC with a PCC derived capability, hence why this
was not noticed before. Spotted by @kliuMsft .
Copy link
Contributor

@nwf-msr nwf-msr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! LGTM.

@rmn30 rmn30 merged commit e0c5663 into main Nov 6, 2023
3 checks passed
@rmn30 rmn30 deleted the fix_mtcc_init branch November 6, 2023 17:28
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.

3 participants