-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add read-only CSR MCONFIGPTR test #381
base: dev
Are you sure you want to change the base?
Conversation
mconfigptr is a read-only CSR defined in priv spec 1.12. The test attempts a read/write (illegal instruction exception expected)/read. The read data value is implementation dependent so the read data value is ignored. Signed-off-by: Dan Smathers <[email protected]>
Signed-off-by: Dan Smathers <[email protected]>
add mconfigptr csr test Signed-off-by: Dan Smathers <[email protected]>
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.
This needs 2 nops after an op that might trap, because the trap handler always returns to the following double-word aligned instruction (deliberately, so we can write tests that do different things depending on whether a trap occurred or not, in addition to writing a trap signature
This also needs a coverage definition, or this will fail when riscof runs the coverage command |
The {m,s,h}envcfg CSRs have been defined a long time ago. They contain bits that are defined by a the following ISA extensions: Zicbom_Zicboz_Zicsr_Ssdtso_Sstc This patch introduces a test which attempts to write all of the defined bits in menvcfg (similar to riscv-non-isa#381). After the tests, the original value of the CSR will be restored to avoid side-effects with other tests. Future commits could introduce the following additional tests: * write tests for the bits in senvcfg * write tests for the bits in henvcfg * test that {m,s,h}envcfg CSRs are only accessible in the relevant modes Signed-off-by: Christoph Müllner <[email protected]>
The {m,s,h}envcfg CSRs have been defined a long time ago. They contain bits that are defined by a the following ISA extensions: Zicbom_Zicboz_Zicsr_Ssdtso_Sstc This patch introduces a test which attempts to write all of the defined bits in menvcfg (similar to riscv-non-isa#381). After the tests, the original value of the CSR will be restored to avoid side-effects with other tests. This commit is incomplete, as it does not test the illegal exceptions which are triggered on access violations. Signed-off-by: Christoph Müllner <[email protected]>
This PR is on halt since last 3,4 months. @dansmathers please update the test and add coverpoint definitions so that it can be merged. |
Signed-off-by: James Shi <[email protected]>
Signed-off-by: James Shi <[email protected]>
Sorry, removed the |
Description
mconfigptr is a read-only CSR defined in priv spec 1.12. The test attempts a read/write (illegal instruction exception expected)/read. The read data value is implementation dependent so the read data value is ignored.
Related Issues
Requires sail update for signatures to pass: riscv/sail-riscv#293
Ratified/Unratified Extensions
List Extensions
MCONFIGPTR exists in the priv spec 1.12 and used by the discovery task group.
Reference Model Used
Mandatory Checklist:
Optional Checklist: