projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6ec196
)
Make IRQ_COP read-only/undelegable unless coprocessor is present
author
Andrew Waterman
<andrew@sifive.com>
Wed, 22 Aug 2018 21:07:45 +0000
(14:07 -0700)
committer
Andrew Waterman
<andrew@sifive.com>
Wed, 22 Aug 2018 21:07:45 +0000
(14:07 -0700)
riscv/processor.cc
patch
|
blob
|
history
diff --git
a/riscv/processor.cc
b/riscv/processor.cc
index 8bcd8e2cc9dfcf4e0cca5c4fe2d0c5f093815083..4a7d0ec6147a8c58be756faf914b4b4ab6732fbe 100644
(file)
--- a/
riscv/processor.cc
+++ b/
riscv/processor.cc
@@
-330,7
+330,8
@@
int processor_t::paddr_bits()
void processor_t::set_csr(int which, reg_t val)
{
val = zext_xlen(val);
- reg_t delegable_ints = MIP_SSIP | MIP_STIP | MIP_SEIP | (1 << IRQ_COP);
+ reg_t delegable_ints = MIP_SSIP | MIP_STIP | MIP_SEIP
+ | ((ext != NULL) << IRQ_COP);
reg_t all_ints = delegable_ints | MIP_MSIP | MIP_MTIP;
switch (which)
{