riscv / riscv-fast-interrupt

Proposal for a RISC-V Core-Local Interrupt Controller (CLIC)
https://jira.riscv.org/browse/RVG-63
Creative Commons Attribution 4.0 International
237 stars 49 forks source link

Accessing mscratchcsw and mscratchcswl #267

Closed silabs-oysteink closed 1 year ago

silabs-oysteink commented 2 years ago

The specification states the following in chapter 13.2: Though designed to be used with csrrw instructions, these CSRs can be accessed with any CSR instruction.

And a few lines below the following: The implementation of the non-CSRRW variants (when either rd or rs1 is x0 or when rs1 is an immediate operand) on xscratchcsw is not defined/reserved.

How should this be interpreted, are non-CSRRW accesses reserved or how should they behave?

dansmathers commented 2 years ago

linking issue #51 I think we meant that the behavior of non-CSRRW accesses are implementation-defined. That phrasing seems to be used several times in the privilege spec so I'll create a pull to update the CLIC text.

silabs-oysteink commented 1 year ago

Thanks for the answer, this made it more clear.