qemu-riscv.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] hw/riscv/boot.c: Support 64-bit address for initrd
@ 2024-04-01  7:51 Cheng Yang
  2024-04-29  2:26 ` Alistair Francis
  0 siblings, 1 reply; 2+ messages in thread
From: Cheng Yang @ 2024-04-01  7:51 UTC (permalink / raw)
  To: qemu-riscv
  Cc: Cheng Yang, Palmer Dabbelt, Alistair Francis, Bin Meng,
	Weiwei Li, Daniel Henrique Barboza, Liu Zhiwei,
	open list:All patches CC here

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>
---
 hw/riscv/boot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
index 09878e722c..47281ca853 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);
     }
 }
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] hw/riscv/boot.c: Support 64-bit address for initrd
  2024-04-01  7:51 [PATCH v1 1/1] hw/riscv/boot.c: Support 64-bit address for initrd Cheng Yang
@ 2024-04-29  2:26 ` Alistair Francis
  0 siblings, 0 replies; 2+ messages in thread
From: Alistair Francis @ 2024-04-29  2:26 UTC (permalink / raw)
  To: Cheng Yang
  Cc: qemu-riscv, Palmer Dabbelt, Alistair Francis, Bin Meng,
	Weiwei Li, Daniel Henrique Barboza, Liu Zhiwei,
	open list:All patches CC here

On Mon, Apr 1, 2024 at 10:44 PM Cheng Yang <yangcheng.work@foxmail.com> wrote:
>
> 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>

Alistair

> ---
>  hw/riscv/boot.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
> index 09878e722c..47281ca853 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);
>      }
>  }
>
> --
> 2.34.1
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-29  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01  7:51 [PATCH v1 1/1] hw/riscv/boot.c: Support 64-bit address for initrd Cheng Yang
2024-04-29  2:26 ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).