summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg
diff options
context:
space:
mode:
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.dsc16
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.fdf4
2 files changed, 20 insertions, 0 deletions
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index b8b13ad201..4f195c1e52 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 835798be1c..7d04a8cffd 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