From 1ad53688b9e15b179dbbfe44ee8b86d7e46715a8 Mon Sep 17 00:00:00 2001 From: Lakshmi Bai Raja Subramanian Date: Tue, 20 Jun 2023 19:20:06 +0530 Subject: [PATCH] hw/riscv: virt: Convert fdt_load_addr to uint64_t fdt_load_addr was previously declared as uint32_t which doe not match with the return type of riscv_compute_fdt_addr(). This patch modifies the fdt_load_addr type from a uint32_t to a uint64_t to match the riscv_compute_fdt_addr() return type. This fixes calculating the fdt address when DRAM is mapped to higher 64-bit address. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Lakshmi Bai Raja Subramanian [ Change by AF: - Cleanup commit title and message ] Reviewed-by: Alistair Francis Message-Id: <168872495192.6334.3845988291412774261-1@git.sr.ht> Signed-off-by: Alistair Francis --- 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 96b01703a9..2b380eff73 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1245,7 +1245,7 @@ static void virt_machine_done(Notifier *notifier, void *data) 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;