summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu, Zhiguang <Zhiguang.Liu@intel.com>2022-01-13 23:15:18 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-01-17 19:17:09 +0000
commit5801910013757bd626f67ed77eea6c16a176eebf (patch)
tree64df72fe3fb7b6393aa6e83292cdf11971ffbad1
parent59c48c9314111e41550cac7875c5e9235809c3ef (diff)
downloadedk2-5801910013757bd626f67ed77eea6c16a176eebf.zip
edk2-5801910013757bd626f67ed77eea6c16a176eebf.tar.gz
edk2-5801910013757bd626f67ed77eea6c16a176eebf.tar.bz2
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 <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.dsc7
1 files changed, 6 insertions, 1 deletions
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 3d08edf..65c1bd6 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