mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
hw/riscv: virt: Fix the value of "riscv, ndev" in the dtb
Commit28d8c28120("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") changed the value of VIRT_IRQCHIP_NUM_SOURCES from 127 to 53, which is VIRTIO_NDEV and also used as the value of "riscv,ndev" property in the dtb. Unfortunately this is wrong as VIRT_IRQCHIP_NUM_SOURCES should include interrupt source 0 but "riscv,ndev" does not. While we are here, we also fix the comments of platform bus irq range which is now "64 to 96", but should be "64 to 95", introduced since commit1832b7cb3f("hw/riscv: virt: Create a platform bus"). Fixes:28d8c28120("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20221211030829.802437-13-bmeng@tinylab.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
724d80c8a6
commit
59f74489cf
2 changed files with 4 additions and 4 deletions
|
|
@ -468,7 +468,8 @@ static void create_fdt_socket_plic(RISCVVirtState *s,
|
|||
plic_cells, s->soc[socket].num_harts * sizeof(uint32_t) * 4);
|
||||
qemu_fdt_setprop_cells(mc->fdt, plic_name, "reg",
|
||||
0x0, plic_addr, 0x0, memmap[VIRT_PLIC].size);
|
||||
qemu_fdt_setprop_cell(mc->fdt, plic_name, "riscv,ndev", VIRTIO_NDEV);
|
||||
qemu_fdt_setprop_cell(mc->fdt, plic_name, "riscv,ndev",
|
||||
VIRT_IRQCHIP_NUM_SOURCES - 1);
|
||||
riscv_socket_fdt_write_id(mc, mc->fdt, plic_name, socket);
|
||||
qemu_fdt_setprop_cell(mc->fdt, plic_name, "phandle",
|
||||
plic_phandles[socket]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue