From 80e1ef9a92cfc3d3992131f42fa94f3177ca4215 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Fri, 5 Mar 2021 13:30:26 +0800 Subject: [PATCH 1/2] Reboot fails with "efi_reset_system() buggy!" Include RuntimeDxeReportStatusCodeLib in ResetSystemRuntimeDxe Signed-off-by: Qi Zhang --- TdvfPkg/TdvfPkg.dsc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TdvfPkg/TdvfPkg.dsc b/TdvfPkg/TdvfPkg.dsc index ee42e13ed09..a5898f029a6 100644 --- a/TdvfPkg/TdvfPkg.dsc +++ b/TdvfPkg/TdvfPkg.dsc @@ -279,6 +279,8 @@ PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf [LibraryClasses.common.DXE_RUNTIME_DRIVER] + ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf + ResetSystemLib|OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf @@ -515,10 +517,7 @@ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } TdvfPkg/UefiPayload/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf - MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf { - - ResetSystemLib|OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf - } + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf MdeModulePkg/Universal/Metronome/Metronome.inf PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf From 5431c595a885451c0fbfc4c5e94ec8adc9d90631 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Fri, 12 Mar 2021 16:02:55 +0800 Subject: [PATCH 2/2] UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c(67): InitCount != 0 include proper TimerLib Signed-off-by: Qi Zhang --- TdvfPkg/TdvfPkg.dsc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TdvfPkg/TdvfPkg.dsc b/TdvfPkg/TdvfPkg.dsc index a5898f029a6..0685c7c9a94 100644 --- a/TdvfPkg/TdvfPkg.dsc +++ b/TdvfPkg/TdvfPkg.dsc @@ -112,7 +112,7 @@ # ################################################################################ [LibraryClasses] - TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf + TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf @@ -239,6 +239,7 @@ TdxLib|TdvfPkg/Library/TdxLib/TdxLib.inf [LibraryClasses.common.SEC] + TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf !if $(QEMU_PLATFORM) == TRUE QemuFwCfgLib|TdvfPkg/Library/QemuFwCfgLibTdx/QemuFwCfgSecLibTdx.inf @@ -279,13 +280,18 @@ PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf [LibraryClasses.common.DXE_RUNTIME_DRIVER] + TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf ResetSystemLib|OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf +[LibraryClasses.common.UEFI_DRIVER] + TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf + [LibraryClasses.common.DXE_DRIVER] + TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf QemuLoadImageLib|OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.inf