Browse Source

Fix hedeleg to match Privileged Spec requirements (#669)

Table 5.2 requires certain bits to be writable in hedeleg:
0453d462a1/src/hypervisor.tex (L386-L409)
pull/670/head
Scott Johnson 6 years ago
committed by GitHub
parent
commit
323a93e3e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      riscv/processor.cc

2
riscv/processor.cc

@ -1147,6 +1147,8 @@ void processor_t::set_csr(int which, reg_t val)
case CSR_HEDELEG: {
reg_t mask =
(1 << CAUSE_MISALIGNED_FETCH) |
(1 << CAUSE_FETCH_ACCESS) |
(1 << CAUSE_ILLEGAL_INSTRUCTION) |
(1 << CAUSE_BREAKPOINT) |
(1 << CAUSE_MISALIGNED_LOAD) |
(1 << CAUSE_LOAD_ACCESS) |

Loading…
Cancel
Save