hw/riscv/server_platform_ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The RISC-V server reference platform requires a 1 GHz timer frequency.
Although the timer frequency is advertised as 1 GHz in the device tree,
the mtimer device is still created with a 10 MHz frequency. This mismatch
causes the OS to boot very slowly.
Use the correct 1 GHz frequency when creating the mtimer device.
Fixes: c2fa4320803b ("hw/riscv: server platform reference machine")
Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
---
hw/riscv/server_platform_ref.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/riscv/server_platform_ref.c b/hw/riscv/server_platform_ref.c
index 5f485b1c79cb..fec967f708c2 100644
--- a/hw/riscv/server_platform_ref.c
+++ b/hw/riscv/server_platform_ref.c
@@ -556,7 +556,7 @@ static void rvserver_ref_machine_init(MachineState *machine)
base_hartid, hart_count,
RISCV_ACLINT_DEFAULT_MTIMECMP,
RISCV_ACLINT_DEFAULT_MTIME,
- RISCV_ACLINT_DEFAULT_TIMEBASE_FREQ, true);
+ RVSERVER_ACLINT_TIMEBASE_FREQ, true);
/* Per-socket interrupt controller */
s->irqchip[i] = riscv_create_aia(system_memory, true, s->aia_guests,
--
2.43.0
On Wed, 2026-11-11 at 15:46 +0530, Sunil V L wrote:
> The RISC-V server reference platform requires a 1 GHz timer
> frequency.
> Although the timer frequency is advertised as 1 GHz in the device
> tree,
> the mtimer device is still created with a 10 MHz frequency. This
> mismatch
> causes the OS to boot very slowly.
>
> Use the correct 1 GHz frequency when creating the mtimer device.
>
> Fixes: c2fa4320803b ("hw/riscv: server platform reference machine")
> Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
Thanks!
Applied to riscv-to-apply.next
Alistair
> ---
> hw/riscv/server_platform_ref.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/server_platform_ref.c
> b/hw/riscv/server_platform_ref.c
> index 5f485b1c79cb..fec967f708c2 100644
> --- a/hw/riscv/server_platform_ref.c
> +++ b/hw/riscv/server_platform_ref.c
> @@ -556,7 +556,7 @@ static void
> rvserver_ref_machine_init(MachineState *machine)
> base_hartid, hart_count,
> RISCV_ACLINT_DEFAULT_MTIMECMP,
> RISCV_ACLINT_DEFAULT_MTIME,
> - RISCV_ACLINT_DEFAULT_TIMEBASE_FREQ, true);
> + RVSERVER_ACLINT_TIMEBASE_FREQ, true);
>
> /* Per-socket interrupt controller */
> s->irqchip[i] = riscv_create_aia(system_memory, true, s-
> >aia_guests,
On Wed, 2026-11-11 at 15:46 +0530, Sunil V L wrote:
> The RISC-V server reference platform requires a 1 GHz timer
> frequency.
> Although the timer frequency is advertised as 1 GHz in the device
> tree,
> the mtimer device is still created with a 10 MHz frequency. This
> mismatch
> causes the OS to boot very slowly.
>
> Use the correct 1 GHz frequency when creating the mtimer device.
>
> Fixes: c2fa4320803b ("hw/riscv: server platform reference machine")
> Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> hw/riscv/server_platform_ref.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/server_platform_ref.c
> b/hw/riscv/server_platform_ref.c
> index 5f485b1c79cb..fec967f708c2 100644
> --- a/hw/riscv/server_platform_ref.c
> +++ b/hw/riscv/server_platform_ref.c
> @@ -556,7 +556,7 @@ static void
> rvserver_ref_machine_init(MachineState *machine)
> base_hartid, hart_count,
> RISCV_ACLINT_DEFAULT_MTIMECMP,
> RISCV_ACLINT_DEFAULT_MTIME,
> - RISCV_ACLINT_DEFAULT_TIMEBASE_FREQ, true);
> + RVSERVER_ACLINT_TIMEBASE_FREQ, true);
>
> /* Per-socket interrupt controller */
> s->irqchip[i] = riscv_create_aia(system_memory, true, s-
> >aia_guests,
On 11/11/2026 7:16 AM, Sunil V L wrote:
> The RISC-V server reference platform requires a 1 GHz timer frequency.
> Although the timer frequency is advertised as 1 GHz in the device tree,
> the mtimer device is still created with a 10 MHz frequency. This mismatch
> causes the OS to boot very slowly.
>
> Use the correct 1 GHz frequency when creating the mtimer device.
>
> Fixes: c2fa4320803b ("hw/riscv: server platform reference machine")
> Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
> ---
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
I believe this is suitable for a freeze PR. Thanks,
Daniel
> hw/riscv/server_platform_ref.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/server_platform_ref.c b/hw/riscv/server_platform_ref.c
> index 5f485b1c79cb..fec967f708c2 100644
> --- a/hw/riscv/server_platform_ref.c
> +++ b/hw/riscv/server_platform_ref.c
> @@ -556,7 +556,7 @@ static void rvserver_ref_machine_init(MachineState *machine)
> base_hartid, hart_count,
> RISCV_ACLINT_DEFAULT_MTIMECMP,
> RISCV_ACLINT_DEFAULT_MTIME,
> - RISCV_ACLINT_DEFAULT_TIMEBASE_FREQ, true);
> + RVSERVER_ACLINT_TIMEBASE_FREQ, true);
>
> /* Per-socket interrupt controller */
> s->irqchip[i] = riscv_create_aia(system_memory, true, s->aia_guests,
© 2016 - 2026 Red Hat, Inc.