Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Populate mtval with instruction bytes on illegal instruction traps #141

Open
michaeljclark opened this issue May 8, 2018 · 0 comments
Open

Comments

@michaeljclark
Copy link
Collaborator

Populating mtval/stval with instruction bytes on illegal instruction traps is an optional feature.

We should add RISCV_FEATURE_MTVAL_INST to target/riscv/cpu.h and let cpus set this in their init functions so that we can model CPUs that don't support setting mtval/stval on illegal instructions.

Currently, mtval/stval is set to zero on all synchronous exceptions that don't have address info (load/store/amo/fetch access faults and page faults). This is for privileged isa v1.10 compliance. In privileged isa v1.9.1 mbadaddr/sbadaddr was only populated on exceptions with address info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant