diff mbox series

[1/1] hw/arm/sbsa-ref: switch to 1GHz timer frequency

Message ID 20240531093729.220758-2-marcin.juszkiewicz@linaro.org
State New
Headers show
Series hw/arm/sbsa-ref: switch to 1GHz timer frequency | expand

Commit Message

Marcin Juszkiewicz May 31, 2024, 9:37 a.m. UTC
Updated firmware for QEMU CI is already in merge queue so we can move
platform to be future proof.

All supported cpus work fine with 1GHz timer frequency when firmware is
fresh enough.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 hw/arm/sbsa-ref.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Leif Lindholm June 3, 2024, 1:45 p.m. UTC | #1
On 2024-05-31 10:37, Marcin Juszkiewicz wrote:
> Updated firmware for QEMU CI is already in merge queue so we can move
> platform to be future proof.
> 
> All supported cpus work fine with 1GHz timer frequency when firmware is
> fresh enough.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>

Thanks!

> ---
>   hw/arm/sbsa-ref.c | 12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 57c337fd92..7bd6898edf 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -62,16 +62,12 @@
>   
>   /*
>    * Generic timer frequency in Hz (which drives both the CPU generic timers
> - * and the SBSA watchdog-timer). Older versions of the TF-A firmware
> - * typically used with sbsa-ref (including the binaries in our Avocado test
> - * Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_impdef
> - * assume it is this value.
> + * and the SBSA watchdog-timer). Older (<2.11) versions of the TF-A firmware
> + * assumed 62.5MHz here.
>    *
> - * TODO: this value is not architecturally correct for an Armv8.6 or
> - * better CPU, so we should move to 1GHz once the TF-A fix above has
> - * made it into a release and into our Avocado test.
> + * Starting with Armv8.6 CPU 1GHz timer frequency is mandated.
>    */
> -#define SBSA_GTIMER_HZ 62500000
> +#define SBSA_GTIMER_HZ 1000000000
>   
>   enum {
>       SBSA_FLASH,
diff mbox series

Patch

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 57c337fd92..7bd6898edf 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -62,16 +62,12 @@ 
 
 /*
  * Generic timer frequency in Hz (which drives both the CPU generic timers
- * and the SBSA watchdog-timer). Older versions of the TF-A firmware
- * typically used with sbsa-ref (including the binaries in our Avocado test
- * Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_impdef
- * assume it is this value.
+ * and the SBSA watchdog-timer). Older (<2.11) versions of the TF-A firmware
+ * assumed 62.5MHz here.
  *
- * TODO: this value is not architecturally correct for an Armv8.6 or
- * better CPU, so we should move to 1GHz once the TF-A fix above has
- * made it into a release and into our Avocado test.
+ * Starting with Armv8.6 CPU 1GHz timer frequency is mandated.
  */
-#define SBSA_GTIMER_HZ 62500000
+#define SBSA_GTIMER_HZ 1000000000
 
 enum {
     SBSA_FLASH,