Browse Source
Merge pull request #1735 from chihminchao/deleg-hw-excp
excp: support hardware_error_exception delegation
pull/1741/head
Andrew Waterman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
1 deletions
-
riscv/csrs.cc
-
riscv/processor.cc
|
|
|
@ -930,6 +930,7 @@ bool medeleg_csr_t::unlogged_write(const reg_t val) noexcept { |
|
|
|
| (1 << CAUSE_STORE_PAGE_FAULT) |
|
|
|
| (proc->extension_enabled('H') ? hypervisor_exceptions : 0) |
|
|
|
| (1 << CAUSE_SOFTWARE_CHECK_FAULT) |
|
|
|
| (1 << CAUSE_HARDWARE_ERROR_FAULT) |
|
|
|
; |
|
|
|
return basic_csr_t::unlogged_write((read() & ~mask) | (val & mask)); |
|
|
|
} |
|
|
|
|
|
|
|
@ -318,7 +318,8 @@ void state_t::reset(processor_t* const proc, reg_t max_isa) |
|
|
|
(1 << CAUSE_FETCH_PAGE_FAULT) | |
|
|
|
(1 << CAUSE_LOAD_PAGE_FAULT) | |
|
|
|
(1 << CAUSE_STORE_PAGE_FAULT) | |
|
|
|
(1 << CAUSE_SOFTWARE_CHECK_FAULT); |
|
|
|
(1 << CAUSE_SOFTWARE_CHECK_FAULT) | |
|
|
|
(1 << CAUSE_HARDWARE_ERROR_FAULT); |
|
|
|
csrmap[CSR_HEDELEG] = hedeleg = std::make_shared<masked_csr_t>(proc, CSR_HEDELEG, hedeleg_mask, 0); |
|
|
|
csrmap[CSR_HCOUNTEREN] = hcounteren = std::make_shared<masked_csr_t>(proc, CSR_HCOUNTEREN, counteren_mask, 0); |
|
|
|
htimedelta = std::make_shared<basic_csr_t>(proc, CSR_HTIMEDELTA, 0); |
|
|
|
|