aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2025-06-04 12:24:37 +0930
committerAlistair Francis <alistair.francis@wdc.com>2025-07-04 21:09:49 +1000
commit81a245091fff2651f14004d1820f7ee77dd4f0fc (patch)
treed435755a04aadfc7a1fe2105e9d6ee1bf7ac7b05
parent61240e3a06dc622d249b530557d5ce03c5854592 (diff)
downloadqemu-81a245091fff2651f14004d1820f7ee77dd4f0fc.zip
qemu-81a245091fff2651f14004d1820f7ee77dd4f0fc.tar.gz
qemu-81a245091fff2651f14004d1820f7ee77dd4f0fc.tar.bz2
hw/riscv/virt: Fix clint base address type
The address is a hardware address, so use hwaddr for consistency with the rest of the machine. Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Message-ID: <20250604025450.85327-2-joel@jms.id.au> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r--hw/riscv/virt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index cf280a9..875eb71 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -324,7 +324,7 @@ static void create_fdt_socket_clint(RISCVVirtState *s,
int cpu;
g_autofree char *clint_name = NULL;
g_autofree uint32_t *clint_cells = NULL;
- unsigned long clint_addr;
+ hwaddr clint_addr;
MachineState *ms = MACHINE(s);
static const char * const clint_compat[2] = {
"sifive,clint0", "riscv,clint0"
@@ -340,8 +340,8 @@ static void create_fdt_socket_clint(RISCVVirtState *s,
}
clint_addr = s->memmap[VIRT_CLINT].base +
- (s->memmap[VIRT_CLINT].size * socket);
- clint_name = g_strdup_printf("/soc/clint@%lx", clint_addr);
+ s->memmap[VIRT_CLINT].size * socket;
+ clint_name = g_strdup_printf("/soc/clint@%"HWADDR_PRIx, clint_addr);
qemu_fdt_add_subnode(ms->fdt, clint_name);
qemu_fdt_setprop_string_array(ms->fdt, clint_name, "compatible",
(char **)&clint_compat,