CorebootPayloadPkg: Add an option to use HPET timer driver
authorMaurice Ma <maurice.ma@intel.com>
Thu, 27 Oct 2016 16:12:26 +0000 (09:12 -0700)
committerMaurice Ma <maurice.ma@intel.com>
Thu, 27 Oct 2016 16:12:26 +0000 (09:12 -0700)
The current CorebootPayloadPkg will use the legacy 8254 timer
driver as the default. However, on some platforms legacy timer
might not exist anymore. This patch adds HPET timer driver as
a build option.

Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by : Prince Agyeman <prince.agyeman@intel.com>

CorebootPayloadPkg/CorebootPayloadPkg.fdf
CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc

index 3807923..34c8f7f 100644 (file)
@@ -91,7 +91,11 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 INF UefiCpuPkg/CpuDxe/CpuDxe.inf\r
 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
 INF MdeModulePkg/Application/UiApp/UiApp.inf\r
+!if $(USE_HPET_TIMER) == TRUE\r
+INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf\r
+!else\r
 INF PcAtChipsetPkg/8254TimerDxe/8254Timer.inf\r
+!endif\r
 INF MdeModulePkg/Universal/Metronome/Metronome.inf\r
 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
index cc29af5..ad1a6dc 100644 (file)
   #                                           [Vendor]   [Device]  [----ClockRate---]  [------------Offset-----------] [Bar] [Stride] [RxFifo] [TxFifo]   [Rsvd]   [Vendor]\r
   DEFINE PCI_SERIAL_PARAMETERS            = {0xff,0xff, 0x00,0x00, 0x0,0x20,0x1c,0x00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x00,    0x01, 0x0,0x0, 0x0,0x0, 0x0,0x0, 0xff,0xff}\r
 \r
+  #\r
+  # Chipset options\r
+  #\r
+  DEFINE USE_HPET_TIMER                   = FALSE\r
+\r
   #\r
   # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI]\r
   #\r
   SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf\r
   PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf\r
   PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf\r
+  IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf\r
   CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf\r
 \r
   #\r
       NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf\r
       NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf\r
   }\r
+!if $(USE_HPET_TIMER) == TRUE\r
+  PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf\r
+!else\r
   PcAtChipsetPkg/8254TimerDxe/8254Timer.inf\r
+!endif\r
   MdeModulePkg/Universal/Metronome/Metronome.inf\r
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r
index a22e576..c06cccb 100644 (file)
   #                                           [Vendor]   [Device]  [----ClockRate---]  [------------Offset-----------] [Bar] [Stride] [RxFifo] [TxFifo]   [Rsvd]   [Vendor]\r
   DEFINE PCI_SERIAL_PARAMETERS            = {0xff,0xff, 0x00,0x00, 0x0,0x20,0x1c,0x00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x00,    0x01, 0x0,0x0, 0x0,0x0, 0x0,0x0, 0xff,0xff}\r
 \r
+  #\r
+  # Chipset options\r
+  #\r
+  DEFINE USE_HPET_TIMER                   = FALSE\r
+\r
   #\r
   # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI]\r
   #\r
   SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf\r
   PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf\r
   PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf\r
+  IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf\r
   CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf\r
 \r
   #\r
       NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf\r
       NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf\r
   }\r
+!if $(USE_HPET_TIMER) == TRUE\r
+  PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf\r
+!else\r
   PcAtChipsetPkg/8254TimerDxe/8254Timer.inf\r
+!endif\r
   MdeModulePkg/Universal/Metronome/Metronome.inf\r
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf\r