Min, What's the reason of moving this driver to UefiCpuPkg? When the LocalApicTimerDxe is in OvmfPkg, it's clear that this driver is only used by OVMF/QEMU platform. Now since the patch moves the driver to UefiCpuPkg, it's possible that other platforms may choose this driver as the timer driver in DXE phase.
So, we need to make sure the quality of this driver is good enough for a broad scope of platforms. 1. What's the issue when this driver still stays in OvmfPkg? If it's a must that this driver stays in UefiCpuPkg, please help to address following questions: 2. Can SourceLevelDebug (rely on Local APIC timer) work if this driver is chosen as DXE timer driver? 3. Can detailed comments be added for " @bug : This does not handle missed timer interrupts" in TimerInterruptHandler()? 4. Can detailed comments be added for " DisableInterrupts ();" in TimerInterruptHandler()? 5. In general what kinds of platforms are capable of using this driver as Timer driver? Thanks, Ray -----Original Message----- From: Xu, Min M <min.m...@intel.com> Sent: Monday, November 8, 2021 2:08 PM To: devel@edk2.groups.io Cc: Xu, Min M <min.m...@intel.com>; Yao, Jiewen <jiewen....@intel.com>; Gerd Hoffmann <kra...@redhat.com>; Anthony Perard <anthony.per...@citrix.com>; Julien Grall <jul...@xen.org>; Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com> Subject: [PATCH V3 3/3] OvmfPkg: Move LocalApicTimerDxe to UefiCpuPkg BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3711 OvmfPkg.dec is removed from [Packages] because it doesn't depend on OvmfPkg. LocalApicTimerDxe is moved to UefiCpuPkg. Cc: Jiewen Yao <jiewen....@intel.com> Cc: Gerd Hoffmann <kra...@redhat.com> Cc: Anthony Perard <anthony.per...@citrix.com> Cc: Julien Grall <jul...@xen.org> Cc: Eric Dong <eric.d...@intel.com> Cc: Ray Ni <ray...@intel.com> Signed-off-by: Min Xu <min.m...@intel.com> --- OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- OvmfPkg/AmdSev/AmdSevX64.fdf | 2 +- OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- OvmfPkg/Microvm/MicrovmX64.fdf | 2 +- OvmfPkg/OvmfPkgIa32.dsc | 2 +- OvmfPkg/OvmfPkgIa32.fdf | 2 +- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- OvmfPkg/OvmfPkgIa32X64.fdf | 2 +- OvmfPkg/OvmfPkgX64.dsc | 2 +- OvmfPkg/OvmfPkgX64.fdf | 2 +- OvmfPkg/OvmfXen.dsc | 2 +- OvmfPkg/OvmfXen.fdf | 2 +- .../LocalApicTimerDxe/LocalApicTimerDxe.c | 0 .../LocalApicTimerDxe/LocalApicTimerDxe.h | 0 .../LocalApicTimerDxe/LocalApicTimerDxe.inf | 6 ++++-- 15 files changed, 16 insertions(+), 14 deletions(-) rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.c (100%) rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.h (100%) rename {OvmfPkg => UefiCpuPkg}/LocalApicTimerDxe/LocalApicTimerDxe.inf (79%) diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index 88c51dfe8337..888fc24f1b58 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.dsc +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc @@ -674,7 +674,7 @@ MdeModulePkg/Universal/EbcDxe/EbcDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf UefiCpuPkg/CpuDxe/CpuDxe.inf - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf { diff --git a/OvmfPkg/AmdSev/AmdSevX64.fdf b/OvmfPkg/AmdSev/AmdSevX64.fdf index 7489b04198fe..659810f96bec 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.fdf +++ b/OvmfPkg/AmdSev/AmdSevX64.fdf @@ -208,7 +208,7 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf -INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf +INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 1a0e848f8356..fcb8b571a041 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -656,7 +656,7 @@ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf MdeModulePkg/Universal/EbcDxe/EbcDxe.inf - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf UefiCpuPkg/CpuDxe/CpuDxe.inf OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf b/OvmfPkg/Microvm/MicrovmX64.fdf index ac9efba26811..d02e88e2a48e 100644 --- a/OvmfPkg/Microvm/MicrovmX64.fdf +++ b/OvmfPkg/Microvm/MicrovmX64.fdf @@ -215,7 +215,7 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf -INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf +INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index d0e9f3ca05f6..f8c8ef1e58be 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -763,7 +763,7 @@ OvmfPkg/8259InterruptControllerDxe/8259.inf OvmfPkg/8254TimerDxe/8254Timer.inf !else - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index b7b35a3a490a..321d4a871afa 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -218,7 +218,7 @@ INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF OvmfPkg/8259InterruptControllerDxe/8259.inf INF OvmfPkg/8254TimerDxe/8254Timer.inf !else - INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index d3531d388e24..4de4ed21a5ca 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -777,7 +777,7 @@ OvmfPkg/8259InterruptControllerDxe/8259.inf OvmfPkg/8254TimerDxe/8254Timer.inf !else - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 986228a44c78..10e97c35001f 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -222,7 +222,7 @@ INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF OvmfPkg/8259InterruptControllerDxe/8259.inf INF OvmfPkg/8254TimerDxe/8254Timer.inf !else - INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index c6ee624fc738..57b0c3c10826 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -775,7 +775,7 @@ OvmfPkg/8259InterruptControllerDxe/8259.inf OvmfPkg/8254TimerDxe/8254Timer.inf !else - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 99339e73bb51..b52c43127845 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -238,7 +238,7 @@ INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF OvmfPkg/8259InterruptControllerDxe/8259.inf INF OvmfPkg/8254TimerDxe/8254Timer.inf !else - INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf !endif INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 7c4c5412d102..d4a9e8f87def 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -551,7 +551,7 @@ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf MdeModulePkg/Universal/EbcDxe/EbcDxe.inf - OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf + UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf UefiCpuPkg/CpuDxe/CpuDxe.inf OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf index 196853740753..76934d354fa6 100644 --- a/OvmfPkg/OvmfXen.fdf +++ b/OvmfPkg/OvmfXen.fdf @@ -298,7 +298,7 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf -INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf +INF UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c similarity index 100% rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.c rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.c diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.h b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.h similarity index 100% rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.h rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.h diff --git a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf similarity index 79% rename from OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf rename to UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf index 3ad28a148c5b..4f2b4db9e5dc 100644 --- a/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf +++ b/UefiCpuPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf @@ -1,6 +1,9 @@ ## @file # Local APIC timer driver that provides Timer Arch protocol. -# PcdFSBClock is defined in MdePkg and it should be set by the consumer. +# +# This driver is to support fixed frequency. If a real platform happens +# to have fixed frequency, then it can be used. In this case the consumer +# should set PcdFSBClock which is defined in MdePkg. # # Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2019, Citrix Systems, Inc. @@ -21,7 +24,6 @@ [Packages] MdePkg/MdePkg.dec UefiCpuPkg/UefiCpuPkg.dec - OvmfPkg/OvmfPkg.dec [LibraryClasses] UefiBootServicesTableLib -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83905): https://edk2.groups.io/g/devel/message/83905 Mute This Topic: https://groups.io/mt/86900367/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-