Skip to content

Commit

Permalink
OvmfPkg: exclude 8254TimerDxe
Browse files Browse the repository at this point in the history
In the original three OVMF platforms, CSM_ENABLE selects the legacy timer
driver; exclude it. Instead, include LocalApicTimerDxe unconditionally
(which in turn consumes PcdFSBClock).

Background: commits c37cbc0 ("OvmfPkg: Switch timer in build time for
OvmfPkg", 2022-04-02) and 07c0c2e ("OvmfPkg: fix PcdFSBClock",
2022-05-25).

Regression test: verified that the BDS progress bar still advanced at
normal speed in each platform.

Cc: Ard Biesheuvel <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Jiewen Yao <[email protected]>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4588
Signed-off-by: Laszlo Ersek <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Acked-by: Corvin Köhne <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
lersek authored and mergify[bot] committed Dec 7, 2023
1 parent 0e0a0a5 commit 89bd992
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
6 changes: 1 addition & 5 deletions OvmfPkg/OvmfPkgIa32.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,7 @@
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0

!if $(CSM_ENABLE) == FALSE
gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000
!endif

[PcdsDynamicHii]
!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
Expand Down Expand Up @@ -758,10 +756,8 @@
UefiCpuPkg/CpuDxe/CpuDxe.inf
!ifdef $(CSM_ENABLE)
OvmfPkg/8259InterruptControllerDxe/8259.inf
OvmfPkg/8254TimerDxe/8254Timer.inf
!else
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
Expand Down
4 changes: 1 addition & 3 deletions OvmfPkg/OvmfPkgIa32.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,8 @@ INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
!ifdef $(CSM_ENABLE)
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
INF OvmfPkg/8254TimerDxe/8254Timer.inf
!else
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
Expand Down
6 changes: 1 addition & 5 deletions OvmfPkg/OvmfPkgIa32X64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -678,9 +678,7 @@
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0

!if $(CSM_ENABLE) == FALSE
gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000
!endif

[PcdsDynamicDefault.X64]
# IPv4 and IPv6 PXE Boot support.
Expand Down Expand Up @@ -772,10 +770,8 @@
UefiCpuPkg/CpuDxe/CpuDxe.inf
!ifdef $(CSM_ENABLE)
OvmfPkg/8259InterruptControllerDxe/8259.inf
OvmfPkg/8254TimerDxe/8254Timer.inf
!else
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
Expand Down
4 changes: 1 addition & 3 deletions OvmfPkg/OvmfPkgIa32X64.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,8 @@ INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
!ifdef $(CSM_ENABLE)
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
INF OvmfPkg/8254TimerDxe/8254Timer.inf
!else
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
Expand Down
6 changes: 1 addition & 5 deletions OvmfPkg/OvmfPkgX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,7 @@
# Set ConfidentialComputing defaults
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0

!if $(CSM_ENABLE) == FALSE
gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000
!endif

[PcdsDynamicHii]
!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
Expand Down Expand Up @@ -840,10 +838,8 @@

!ifdef $(CSM_ENABLE)
OvmfPkg/8259InterruptControllerDxe/8259.inf
OvmfPkg/8254TimerDxe/8254Timer.inf
!else
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
Expand Down
4 changes: 1 addition & 3 deletions OvmfPkg/OvmfPkgX64.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,8 @@ INF FILE_GUID = $(UP_CPU_DXE_GUID) UefiCpuPkg/CpuDxe/CpuDxe.inf

!ifdef $(CSM_ENABLE)
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
INF OvmfPkg/8254TimerDxe/8254Timer.inf
!else
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
!endif
INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf
INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
Expand Down

0 comments on commit 89bd992

Please sign in to comment.