[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 24/30] RISC-V: Fix PLIC pending bitfield read
From: |
Alistair Francis |
Subject: |
Re: [Qemu-devel] [PATCH v1 24/30] RISC-V: Fix PLIC pending bitfield reads |
Date: |
Fri, 25 May 2018 15:38:25 -0700 |
On Tue, May 22, 2018 at 5:15 PM, Michael Clark <address@hidden> wrote:
> The address calculation for the pending bitfield had
> a copy paste bug. This bug went unnoticed because the Linux
> PLIC driver does not read the pending bitfield, rather it
> reads pending interrupt numbers from the claim register
> and writes acknowledgements back to the claim register.
>
> Cc: Palmer Dabbelt <address@hidden>
> Cc: Sagar Karandikar <address@hidden>
> Cc: Bastian Koppelmann <address@hidden>
> Cc: Alistair Francis <address@hidden>
> Reported-by: Vincent Siles <address@hidden>
> Signed-off-by: Michael Clark <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> hw/riscv/sifive_plic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/sifive_plic.c b/hw/riscv/sifive_plic.c
> index 28e28d932f7c..b81d29faff99 100644
> --- a/hw/riscv/sifive_plic.c
> +++ b/hw/riscv/sifive_plic.c
> @@ -215,7 +215,7 @@ static uint64_t sifive_plic_read(void *opaque, hwaddr
> addr, unsigned size)
> } else if (addr >= plic->pending_base && /* 1 bit per source */
> addr < plic->pending_base + (plic->num_sources >> 3))
> {
> - uint32_t word = (addr - plic->priority_base) >> 2;
> + uint32_t word = (addr - plic->pending_base) >> 2;
> if (RISCV_DEBUG_PLIC) {
> qemu_log("plic: read pending: word=%d value=%d\n",
> word, plic->pending[word]);
> --
> 2.7.0
>
>
- Re: [Qemu-devel] [PATCH v1 18/30] RISC-V: Add missing free for plic_hart_config, (continued)
- [Qemu-devel] [PATCH v1 19/30] RISC-V: Allow interrupt controllers to claim interrupts, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 20/30] RISC-V: Add misa to DisasContext, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 21/30] RISC-V: Add misa.MAFD checks to translate, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 22/30] RISC-V: Add misa runtime write support, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 23/30] RISC-V: Fix CLINT timecmp low 32-bit writes, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 24/30] RISC-V: Fix PLIC pending bitfield reads, Michael Clark, 2018/05/22
- Re: [Qemu-devel] [PATCH v1 24/30] RISC-V: Fix PLIC pending bitfield reads,
Alistair Francis <=
- [Qemu-devel] [PATCH v1 25/30] RISC-V: Enable second UART on sifive_e and sifive_u, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 26/30] RISC-V: Remove unnecessary disassembler constraints, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 27/30] elf: Add RISC-V PSABI ELF header defines, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 28/30] RISC-V: linux-user support for RVE ABI, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 29/30] RISC-V: Don't add NULL bootargs to device-tree, Michael Clark, 2018/05/22
- [Qemu-devel] [PATCH v1 30/30] RISC-V: Support separate firmware and kernel payload, Michael Clark, 2018/05/22