We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50c89ea commit 0a4f0b3Copy full SHA for 0a4f0b3
riscv/csrs.cc
@@ -322,6 +322,11 @@ bool mseccfg_csr_t::unlogged_write(const reg_t val) noexcept {
322
new_val |= (val & MSECCFG_MMWP); //MMWP is sticky
323
new_val |= (val & MSECCFG_MML); //MML is sticky
324
325
+ if (proc->extension_enabled(EXT_ZKR)) {
326
+ uint64_t mask = MSECCFG_USEED | MSECCFG_SSEED;
327
+ new_val = (new_val & ~mask) | (val & mask);
328
+ }
329
+
330
proc->get_mmu()->flush_tlb();
331
332
if (proc->extension_enabled(EXT_ZICFILP)) {
0 commit comments