aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv
diff options
context:
space:
mode:
authorCheng Yang <yangcheng.work@foxmail.com>2024-04-01 15:51:22 +0800
committerAlistair Francis <alistair.francis@wdc.com>2024-06-03 11:12:11 +1000
commit039003995047b2f7911142c7c5cfb845fda044fd (patch)
treec78a8f4105fd521da7a64af13fd1e307a403a90c /hw/riscv
parenta6b53378f537a51355a49826b7d119698c74ffba (diff)
downloadqemu-039003995047b2f7911142c7c5cfb845fda044fd.zip
qemu-039003995047b2f7911142c7c5cfb845fda044fd.tar.gz
qemu-039003995047b2f7911142c7c5cfb845fda044fd.tar.bz2
hw/riscv/boot.c: Support 64-bit address for initrd
Use qemu_fdt_setprop_u64() instead of qemu_fdt_setprop_cell() to set the address of initrd in FDT to support 64-bit address. Signed-off-by: Cheng Yang <yangcheng.work@foxmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <tencent_A4482251DD0890F312758FA6B33F60815609@qq.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv')
-rw-r--r--hw/riscv/boot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
index 09878e7..47281ca 100644
--- a/hw/riscv/boot.c
+++ b/hw/riscv/boot.c
@@ -209,8 +209,8 @@ static void riscv_load_initrd(MachineState *machine, uint64_t kernel_entry)
/* Some RISC-V machines (e.g. opentitan) don't have a fdt. */
if (fdt) {
end = start + size;
- qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start", start);
- qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end", end);
+ qemu_fdt_setprop_u64(fdt, "/chosen", "linux,initrd-start", start);
+ qemu_fdt_setprop_u64(fdt, "/chosen", "linux,initrd-end", end);
}
}