]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 13 Aug 2019 11:30:53 +0000 (12:30 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2019 16:03:49 +0000 (18:03 +0200)
The ACPI Timer isn't present in a PVH guest, but local APIC works on
both PVH and HVM.

Note that the use of SecPeiDxeTimerLibCpu might be an issue with a
driver of type DXE_RUNTIME_DRIVER. I've attempted to find out which of
the DXE_RUNTIME_DRIVER uses the TimerLib at runtime. I've done that by
replacing the TimerLib evaluation in
[LibraryClasses.common.DXE_RUNTIME_DRIVER] by a different one and
checking every module that uses it (with the --report-file=report
build option).

ResetSystemRuntimeDxe is calling the TimerLib API at runtime to do the
operation "EfiResetCold", so this may never complete if the OS have
disabled the Local APIC Timer.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190813113119.14804-10-anthony.perard@citrix.com>

OvmfPkg/OvmfXen.dsc

index 7619a893828e9fc18ea4d5bcb1ec0c34f3ee5758..b40d39e003b8a3fce6182f9def78cd029514c87a 100644 (file)
 ################################################################################\r
 [LibraryClasses]\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf\r
+  TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf\r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
 \r
 [LibraryClasses.common.SEC]\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf\r
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf\r
 !ifdef $(DEBUG_ON_SERIAL_PORT)\r
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
 \r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
 \r
 [LibraryClasses.common.UEFI_APPLICATION]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
-  TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r