[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH qemu v2] change the fdt_load_addr variable datatype to handle

From: Daniel Henrique Barboza
Subject: Re: [PATCH qemu v2] change the fdt_load_addr variable datatype to handle 64-bit DRAM address
Date: Thu, 22 Jun 2023 15:45:40 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

(CC-ing Alistair)

On 6/20/23 14:44, ~rlakshmibai wrote:
From: Lakshmi Bai Raja Subramanian 

fdt_load_addr is getting overflowed when there is no DRAM at lower 32 bit 
address space.
To support pure 64-bit DRAM address, fdt_load_addr variable's data type is 
changed to uint64_t
instead of uint32_t.

It's worth mentioning that fdt_load_addr receives the result of
riscv_compute_fdt_addr(), which is an uint64_t.

Signed-off-by: Lakshmi Bai Raja Subramanian 

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

  hw/riscv/virt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 95708d890e..c348529ac0 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1244,7 +1244,7 @@ static void virt_machine_done(Notifier *notifier, void 
      target_ulong start_addr = memmap[VIRT_DRAM].base;
      target_ulong firmware_end_addr, kernel_start_addr;
      const char *firmware_name = riscv_default_firmware_name(&s->soc[0]);
-    uint32_t fdt_load_addr;
+    uint64_t fdt_load_addr;

      uint64_t kernel_entry = 0;
      BlockBackend *pflash_blk0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]