aboutsummaryrefslogtreecommitdiff
path: root/hw/avr/arduino.c
diff options
context:
space:
mode:
authorJay Chang <jay.chang@sifive.com>2025-07-01 11:00:20 +0800
committerAlistair Francis <alistair.francis@wdc.com>2025-07-30 10:59:26 +1000
commite443ba03361b63218e6c3aa4f73d2cb5b9b1d372 (patch)
tree8a90479d09933f651b9c8cddfbbdf4acc3a1642d /hw/avr/arduino.c
parent30ef718423e8018723087cd17be0fd9c6dfa2e53 (diff)
downloadqemu-e443ba03361b63218e6c3aa4f73d2cb5b9b1d372.zip
qemu-e443ba03361b63218e6c3aa4f73d2cb5b9b1d372.tar.gz
qemu-e443ba03361b63218e6c3aa4f73d2cb5b9b1d372.tar.bz2
target/riscv: Restrict mideleg/medeleg/medelegh access to S-mode harts
RISC-V Privileged Spec states: "In harts with S-mode, the medeleg and mideleg registers must exist, and setting a bit in medeleg or mideleg will delegate the corresponding trap , when occurring in S-mode or U-mode, to the S-mode trap handler. In harts without S-mode, the medeleg and mideleg registers should not exist." Add smode predicate to ensure these CSRs are only accessible when S-mode is supported. Reviewed-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Jay Chang <jay.chang@sifive.com> Reviewed-by: Nutty Liu<liujingqi@lanxincomputing.com> Message-ID: <20250701030021.99218-2-jay.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/avr/arduino.c')
0 files changed, 0 insertions, 0 deletions