]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Not use BaseCpuTimerLib by default.
authorLiu, Zhiguang <Zhiguang.Liu@intel.com>
Fri, 14 Jan 2022 06:15:18 +0000 (23:15 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 17 Jan 2022 19:17:09 +0000 (19:17 +0000)
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>
UefiPayloadPkg/UefiPayloadPkg.dsc

index 3d08edfe3164e259f60257ad8a2114aba53133a2..65c1bd610eca3865bae9c65002d49564086970eb 100644 (file)
   DEFINE SERIAL_DRIVER_ENABLE = TRUE\r
   DEFINE PERFORMANCE_MEASUREMENT_ENABLE  = FALSE\r
 \r
+  # For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Counter.\r
+  # This is recommended way to get the time, and also how BaseCpuTimerLib works.\r
+  # However, some CPU doesn't support this feature, so disable it by default.\r
+  DEFINE CPU_TIMER_LIB_ENABLE  = FALSE\r
+\r
 [BuildOptions]\r
   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES\r
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r
   #\r
   # Platform\r
   #\r
-!if $(UNIVERSAL_PAYLOAD) == TRUE\r
+!if $(CPU_TIMER_LIB_ENABLE) == TRUE\r
   TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf\r
 !else\r
   TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf\r