diff options
author | Hua Ma <hua.ma@intel.com> | 2024-01-05 10:45:30 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-08 07:48:46 +0000 |
commit | c3d865a4c21d91f2e338a91d0c8b1eaf205575b5 (patch) | |
tree | b2682987739bd6289f05c04c7475ca112f6ca679 | |
parent | ff1305c9fb171ad51bfc149c544e3ab5a0edf521 (diff) | |
download | edk2-c3d865a4c21d91f2e338a91d0c8b1eaf205575b5.zip edk2-c3d865a4c21d91f2e338a91d0c8b1eaf205575b5.tar.gz edk2-c3d865a4c21d91f2e338a91d0c8b1eaf205575b5.tar.bz2 |
UefiPayloadPkg: Add macro to enable selection of timer
Add macro to enable selection of timer
- HPET: UEFI Payload will use HPET timer
- LAPIC: UEFI Payload will use local APIC timer
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: Hua Ma <hua.ma@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
-rw-r--r-- | UefiPayloadPkg/UefiPayloadPkg.dsc | 16 | ||||
-rw-r--r-- | UefiPayloadPkg/UefiPayloadPkg.fdf | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index b8b13ad..4f195c1 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -139,6 +139,12 @@ # Note: for emulation platform such as QEMU, this may not work and should set it as FALSE
DEFINE CPU_TIMER_LIB_ENABLE = TRUE
+ #
+ # HPET: UEFI Payload will use HPET timer
+ # LAPIC: UEFI Payload will use local APIC timer
+ #
+ DEFINE TIMER_SUPPORT = HPET
+
DEFINE MULTIPLE_DEBUG_PORT_SUPPORT = FALSE
[BuildOptions]
@@ -676,7 +682,17 @@ MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
+!if $(TIMER_SUPPORT) == "HPET"
PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
+!elseif $(TIMER_SUPPORT) == "LAPIC"
+ OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf {
+ <LibraryClasses>
+ NestedInterruptTplLib|OvmfPkg/Library/NestedInterruptTplLib/NestedInterruptTplLib.inf
+ }
+!else
+ !error "Invalid TIMER_SUPPORT"
+!endif
+
MdeModulePkg/Universal/Metronome/Metronome.inf
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf index 835798b..7d04a8c 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -161,7 +161,11 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(TIMER_SUPPORT) == "HPET"
INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
+!elseif $(TIMER_SUPPORT) == "LAPIC"
+INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
+!endif
INF MdeModulePkg/Universal/Metronome/Metronome.inf
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|