[PATCH v2 05/13] efi: Use a fixed value for the timer clock

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Feb 23 12:47:55 CET 2023


On 2/22/23 20:12, Simon Glass wrote:
> It is not yet clear how to read the timer via EFI. The current value seems
> much too high on a Framework laptop I tried. Adjust it to a lower
> hard-coded value for now.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>   drivers/timer/tsc_timer.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
> index 192c7b71a5a..1d2a3f20e4e 100644
> --- a/drivers/timer/tsc_timer.c
> +++ b/drivers/timer/tsc_timer.c
> @@ -404,6 +404,10 @@ static void tsc_timer_ensure_setup(bool early)
>   	if (!gd->arch.clock_rate) {
>   		unsigned long fast_calibrate;
>
> +		if (IS_ENABLED(CONFIG_EFI_APP)) {

This needs a code comment telling why you use this 2.75 GHz value.

Why would none of the methods in tsc_timer_ensure_setup() work correctly
in the EFI  app?

Best regards

Heinrich

> +			fast_calibrate = 2750;
> +			goto done;
> +		}
>   		fast_calibrate = native_calibrate_tsc();
>   		if (fast_calibrate)
>   			goto done;



More information about the U-Boot mailing list