-
Notifications
You must be signed in to change notification settings - Fork 29
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
Make CRE not a WARL field #332
Conversation
Change the CRE bits so they are always writable, but the effective CRE depends on multiple values. This is significantly simpler to specify, avoids an entire cross-CSR WARL field (WARL fields are a pain), and removes some undefined behaviour (do the bits retain their values when they are read-only zero). Fixes riscv#331
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.
As noted in #332, I'm fine with this change but I'd wait for others to comment before merging.
A few small comments inline.
Agree this makes implementation simpler (at least in Qemu), and addresses the undefined behaviour regarding if bits are cleared. But there still isn't a way for S/U mode code to know what the effective CRE is as it is dependent on registers they cannot read. Unless they try an instruction and catch the resulting exception. |
Co-authored-by: Alexander Richardson <[email protected]> Signed-off-by: Tariq Kurd <[email protected]>
Co-authored-by: Alexander Richardson <[email protected]> Signed-off-by: Tariq Kurd <[email protected]>
Co-authored-by: Alexander Richardson <[email protected]> Signed-off-by: Tariq Kurd <[email protected]>
That’s what the device tree or ACPI whatever is for. |
Signed-off-by: Tariq Kurd <[email protected]>
|
I've updated it so now the text talks about "CHERI register access" being enabled/disabled rather than the |
Co-authored-by: Andres Amaya Garcia <[email protected]> Signed-off-by: Tim Hutt <[email protected]>
Co-authored-by: Andres Amaya Garcia <[email protected]> Signed-off-by: Tim Hutt <[email protected]>
Change the CRE bits so they are always writable, but the effective CRE depends on multiple values. This is significantly simpler to specify, avoids an entire cross-CSR WARL field (WARL fields are a pain), and removes some undefined behaviour (do the bits retain their values when they are read-only zero). Fixes riscv#331 Note, I deleted the text about SXLEN/UXLEN. Those didn't seem fully specified tbh, but I'll need to add them back somehow. --------- Signed-off-by: Tariq Kurd <[email protected]> Signed-off-by: Tim Hutt <[email protected]> Co-authored-by: Tariq Kurd <[email protected]> Co-authored-by: Alexander Richardson <[email protected]> Co-authored-by: Andres Amaya Garcia <[email protected]>
Change the CRE bits so they are always writable, but the effective CRE depends on multiple values. This is significantly simpler to specify, avoids an entire cross-CSR WARL field (WARL fields are a pain), and removes some undefined behaviour (do the bits retain their values when they are read-only zero).
Fixes #331
Note, I deleted the text about SXLEN/UXLEN. Those didn't seem fully specified tbh, but I'll need to add them back somehow.