hw/riscv/server_platform_ref: Fix mtimer frequency
PATCH 1/1 hw/riscv/server_platform_ref: Fix mtimer frequency
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.
--- hw/riscv/server_platform_ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/server_platform_ref.c +1 -1
@@ -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,
Signature · 1 line
2.43.0
Quoted 10 lines · Sunil V L
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 <[email protected]>---
I believe this is suitable for a freeze PR. Thanks,
Daniel
Quoted 16 lines
hw/riscv/server_platform_ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/server_platform_ref.c +1
-1@@ -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,
Quoted 8 lines · Sunil V L
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.
Quoted 4 lines
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 <[email protected]>
Alistair
Quoted 20 lines
---
hw/riscv/server_platform_ref.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/server_platform_ref.c +1
-1@@ -556,7 +556,7 @@ static voidrvserver_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-Quoted 1 line
aia_guests,
Alistair Francis
AppliedQuoted 8 lines · Sunil V L
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.
Quoted 4 lines
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 <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 20 lines
---
hw/riscv/server_platform_ref.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/server_platform_ref.c +1
-1@@ -556,7 +556,7 @@ static voidrvserver_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-Quoted 1 line
aia_guests,