Skip to content

Commit

Permalink
UefiPayloadPkg: Not use BaseCpuTimerLib by default.
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Guo Dong <[email protected]>
Reviewed-by: Maurice Ma <[email protected]>
  • Loading branch information
LiuZhiguang001 authored and mergify[bot] committed Jan 17, 2022
1 parent 59c48c9 commit 5801910
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion UefiPayloadPkg/UefiPayloadPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5801910

Please sign in to comment.