aboutsummaryrefslogtreecommitdiff
path: root/riscv/csrs.h
diff options
context:
space:
mode:
authorYenHaoChen <howard25336284@gmail.com>2022-07-13 09:23:18 +0800
committerYenHaoChen <howard25336284@gmail.com>2022-07-13 09:23:18 +0800
commite050da4c27635a22d6dbdab920371012b2ea8b4f (patch)
tree0c6af8f360b8153c8871c38afc802fd4a4efbb84 /riscv/csrs.h
parentc4a5f54094fc925f96b93f3d24b20f79de1dc5fd (diff)
downloadspike-e050da4c27635a22d6dbdab920371012b2ea8b4f.zip
spike-e050da4c27635a22d6dbdab920371012b2ea8b4f.tar.gz
spike-e050da4c27635a22d6dbdab920371012b2ea8b4f.tar.bz2
Add verify_permissions() for mseccfg_csr_t
The mseccfg only exists when enabling the Smepmp extension. If not enabling the Smepmp extension, CSR instructions to the mseccfg raise illegal instruction faults, and the PMP behaviors as hardwiring mseccfg 0 (the reset value of mseccfg).
Diffstat (limited to 'riscv/csrs.h')
-rw-r--r--riscv/csrs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/riscv/csrs.h b/riscv/csrs.h
index bde31da..6c7c47d 100644
--- a/riscv/csrs.h
+++ b/riscv/csrs.h
@@ -130,6 +130,7 @@ class pmpcfg_csr_t: public csr_t {
class mseccfg_csr_t: public basic_csr_t {
public:
mseccfg_csr_t(processor_t* const proc, const reg_t addr);
+ virtual void verify_permissions(insn_t insn, bool write) const override;
bool get_mml() const noexcept;
bool get_mmwp() const noexcept;
bool get_rlb() const noexcept;