mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
hw/riscv/virt: Use setprop_sized_cells for plic
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Message-ID: <20250604025450.85327-7-joel@jms.id.au> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
dd3d4fd992
commit
507161b5f5
1 changed files with 2 additions and 2 deletions
|
|
@ -493,8 +493,8 @@ static void create_fdt_socket_plic(RISCVVirtState *s,
|
||||||
s->soc[socket].num_harts * sizeof(uint32_t) * 4);
|
s->soc[socket].num_harts * sizeof(uint32_t) * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
qemu_fdt_setprop_cells(ms->fdt, plic_name, "reg",
|
qemu_fdt_setprop_sized_cells(ms->fdt, plic_name, "reg",
|
||||||
0x0, plic_addr, 0x0, s->memmap[VIRT_PLIC].size);
|
2, plic_addr, 2, s->memmap[VIRT_PLIC].size);
|
||||||
qemu_fdt_setprop_cell(ms->fdt, plic_name, "riscv,ndev",
|
qemu_fdt_setprop_cell(ms->fdt, plic_name, "riscv,ndev",
|
||||||
VIRT_IRQCHIP_NUM_SOURCES - 1);
|
VIRT_IRQCHIP_NUM_SOURCES - 1);
|
||||||
riscv_socket_fdt_write_id(ms, plic_name, socket);
|
riscv_socket_fdt_write_id(ms, plic_name, socket);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue