]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/riscv_aplic: Fix in_clrip[x] read emulation
authorAnup Patel <apatel@ventanamicro.com>
Wed, 6 Mar 2024 09:57:22 +0000 (15:27 +0530)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Nov 2024 08:10:00 +0000 (11:10 +0300)
commit6e46caa91f84d9c8c73bf46a69e935fb7f541a68
treeaa96e66a6c26c2fe4e61c2fa05c64843443a9cf2
parentdc89b2b30077496d5e77cda47215dee5aeae02ce
hw/intc/riscv_aplic: Fix in_clrip[x] read emulation

The reads to in_clrip[x] registers return rectified input values of the
interrupt sources.

A rectified input value of an interrupt source is defined by the section
"4.5.2 Source configurations (sourcecfg[1]–sourcecfg[1023])" of the RISC-V
AIA specification as:
"rectified input value = (incoming wire value) XOR (source is inverted)"

Update the riscv_aplic_read_input_word() implementation to match the above.

Fixes: e8f79343cfc8 ("hw/intc: Add RISC-V AIA APLIC device emulation")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20240306095722.463296-3-apatel@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 0678e9f29c2301d0a1afc8d01a78cdfa7ad2ddbd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/intc/riscv_aplic.c