Reviewed-by: Maurice Ma <[email protected]>

> -----Original Message-----
> From: Liu, Zhiguang <[email protected]>
> Sent: Thursday, January 13, 2022 22:15
> To: [email protected]
> Cc: Dong, Guo <[email protected]>; Ni, Ray <[email protected]>; Ma,
> Maurice <[email protected]>; You, Benjamin
> <[email protected]>
> Subject: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default.
> 
> For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Counter.
> This is recommended way to get the time, and also how BaseCpuTimerLib
> works However, some CPU doesn't support this feature, so disable it by
> default.
> 
> Cc: Guo Dong <[email protected]>
> Cc: Ray Ni <[email protected]>
> Cc: Maurice Ma <[email protected]>
> Cc: Benjamin You <[email protected]>
> Signed-off-by: Zhiguang Liu <[email protected]>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 3d08edfe31..65c1bd610e 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -111,6 +111,11 @@
>    DEFINE SERIAL_DRIVER_ENABLE = TRUE   DEFINE
> PERFORMANCE_MEASUREMENT_ENABLE  = FALSE +  # For recent X86 CPU,
> 0x15 CPUID instruction will return Time Stamp Counter.+  # This is
> recommended way to get the time, and also how BaseCpuTimerLib works.+
> # However, some CPU doesn't support this feature, so disable it by default.+
> DEFINE CPU_TIMER_LIB_ENABLE  = FALSE+ [BuildOptions]
> *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
> GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG@@ -217,7 +222,7
> @@
>    #   # Platform   #-!if $(UNIVERSAL_PAYLOAD) == TRUE+!if
> $(CPU_TIMER_LIB_ENABLE) == TRUE
> TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf !else
> TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf--
> 2.32.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85715): https://edk2.groups.io/g/devel/message/85715
Mute This Topic: https://groups.io/mt/88415742/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to