aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api-macros/src
diff options
context:
space:
mode:
authorYong-Xuan Wang <yongxuan.wang@sifive.com>2024-10-04 18:46:47 +0800
committerAlistair Francis <alistair.francis@wdc.com>2024-10-30 11:22:08 +1000
commit2ae6cca1d3389801ee72fc5e58c52573218f3514 (patch)
tree8a369005e1135c6cbb43ca337f6c0e9c6fac65db /rust/qemu-api-macros/src
parentf8c1f36a2e3dab4935e7c5690e578ac71765766b (diff)
downloadqemu-2ae6cca1d3389801ee72fc5e58c52573218f3514.zip
qemu-2ae6cca1d3389801ee72fc5e58c52573218f3514.tar.gz
qemu-2ae6cca1d3389801ee72fc5e58c52573218f3514.tar.bz2
hw/intc/riscv_aplic: Check and update pending when write sourcecfg
The section 4.5.2 of the RISC-V AIA specification says that any write to a sourcecfg register of an APLIC might (or might not) cause the corresponding interrupt-pending bit to be set to one if the rectified input value is high (= 1) under the new source mode. If an interrupt is asserted before the driver configs its interrupt type to APLIC, it's pending bit will not be set except a relevant write to a setip or setipnum register. When we write the interrupt type to sourcecfg register, if the APLIC device doesn't check rectified input value and update the pending bit, this interrupt might never becomes pending. For APLIC.m, we can manully set pending by setip or setipnum registers in driver. But for APLIC.w, the pending status totally depends on the rectified input value, we can't control the pending status via mmio registers. In this case, hw should check and update pending status for us when writing sourcecfg registers. Update QEMU emulation to handle "pre-existing" interrupts. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241004104649.13129-1-yongxuan.wang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'rust/qemu-api-macros/src')
0 files changed, 0 insertions, 0 deletions