@samitouri / QOSamiQemu / commits / 602999b581

hw/riscv/sifive_u.c: add a FDT phandle to cpu-intc

We're assigning a 'cpu_phandle' phandle to the cpu-intc phandle field. Make it more in line with the other boards by assigning both a cpu_phandle and a intc phandle. Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260615203734.954428-2-daniel.barboza@oss.qualcomm.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Daniel Henrique Barboza committed Jun 15, 2026 at 17:37 UTC 602999b581fb831e05243bb529e3c5ac8fdf6f00
1 file changed +3 -1
hw/riscv/sifive_u.c
+3 -1
@@ -187,8 +187,10 @@ static void create_fdt(SiFiveUState *s, const MemMapEntry *memmap,
187 qemu_fdt_setprop_string(fdt, nodename, "status", "okay");
188 qemu_fdt_setprop_cell(fdt, nodename, "reg", cpu);
189 qemu_fdt_setprop_string(fdt, nodename, "device_type", "cpu");
190 + qemu_fdt_setprop_cell(fdt, nodename, "phandle", cpu_phandle);
191 +
192 qemu_fdt_add_subnode(fdt, intc);
191 - qemu_fdt_setprop_cell(fdt, intc, "phandle", cpu_phandle);
193 + qemu_fdt_setprop_cell(fdt, intc, "phandle", phandle++);
194 qemu_fdt_setprop_string(fdt, intc, "compatible", "riscv,cpu-intc");
195 qemu_fdt_setprop(fdt, intc, "interrupt-controller", NULL, 0);
196 qemu_fdt_setprop_cell(fdt, intc, "#interrupt-cells", 1);