Re: [edk2] [PATCH 7/7] CorebootPayloadPkg: Add BdsDxe support

2016-05-11 Thread Ma, Maurice
Any reason that we have to support both?
I think we can just use MdeModulePkg/Universal/BdsDxe and remove 
IntelFrameworkModulePkg/Universal/BdsDxe reference from DSC/FDF.

Thanks
Maurice
-Original Message-
From: Leahy, Leroy P 
Sent: Tuesday, May 10, 2016 3:35 PM
To: edk2-devel@lists.01.org; Leahy, Leroy P; Agyeman, Prince; Ma, Maurice
Subject: [PATCH 7/7] CorebootPayloadPkg: Add BdsDxe support

Add define to select the MdeModulePkg/Universal/BdsDxe instead of 
IntelFrameworkModulePkg/Universal/BdsDxe.

Change-Id: I0930b375e46fd72a199567efc422df5bb535798c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy 
---
 CorebootPayloadPkg/CorebootPayloadPkg.fdf  |  14 +-
 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc  |  22 +-
 CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc   |  22 +-
 .../PlatformBootManagerLib/PlatformBootManager.c   | 339 +
 .../PlatformBootManagerLib/PlatformBootManager.h   |  50 +++
 .../PlatformBootManagerLib.inf |  73 +
 .../Library/PlatformBootManagerLib/PlatformData.c  | 281 +
 7 files changed, 794 insertions(+), 7 deletions(-)  create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c

diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.fdf 
b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
index 432155f..df771ef 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkg.fdf
+++ b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
@@ -86,7 +86,11 @@ INF 
IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe
 
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+!else
+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
 INF PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
 INF MdeModulePkg/Universal/Metronome/Metronome.inf
 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
@@ -112,12 +116,16 @@ INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
 #
 INF 
CorebootModulePkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
 INF CorebootModulePkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
-INF CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
 
 #
-# ISA Support
+# Serial Support
 #
-INF CorebootModulePkg/SerialDxe/SerialDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
+
+  INF CorebootModulePkg/SerialDxe/SerialDxe.inf
+!else
+  INF CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
+!endif
 
 #
 # Console Support
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc 
b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
index a9e78a5..57c2dce 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
@@ -34,6 +34,11 @@
   DEFINE SOURCE_DEBUG_ENABLE = FALSE
 
   #
+  # BDS Options: [IntelFrameworkModulePkg, MdeModulePkg]  #
+  DEFINE BDS_TYPE= IntelFrameworkModulePkg
+
+  #
   # CPU options
   #
   DEFINE MAX_LOGICAL_PROCESSORS  = 64
@@ -162,7 +167,13 @@
   ResetSystemLib|CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf
   
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
   
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   PlatformBdsLib|CorebootPayloadPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+!else
+  
+PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLi
+b/PlatformBootManagerLib.inf
+  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  
+UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootMana
+gerLib.inf
+!endif
 
   #
   # Misc
@@ -353,7 +364,11 @@
   #
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+!else
+  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
   PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
   MdeModulePkg/Universal/Metronome/Metronome.inf
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
@@ -398,7 +413,6 @@
   #
   
CorebootModulePkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
   CorebootModulePkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
-  CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
 
   #
   # SCSI/ATA/IDE/DISK Support
@@ -436,9 +450,13 @@
   CorebootModulePkg/OhciDxe/OhciDxe.inf
 
   #
-  # ISA Support
+  # Serial Support
   #
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   CorebootModulePkg/SerialDxe/SerialDxe.inf
+!else
+  

[edk2] [PATCH 7/7] CorebootPayloadPkg: Add BdsDxe support

2016-05-10 Thread Lee Leahy
Add define to select the MdeModulePkg/Universal/BdsDxe instead of
IntelFrameworkModulePkg/Universal/BdsDxe.

Change-Id: I0930b375e46fd72a199567efc422df5bb535798c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy 
---
 CorebootPayloadPkg/CorebootPayloadPkg.fdf  |  14 +-
 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc  |  22 +-
 CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc   |  22 +-
 .../PlatformBootManagerLib/PlatformBootManager.c   | 339 +
 .../PlatformBootManagerLib/PlatformBootManager.h   |  50 +++
 .../PlatformBootManagerLib.inf |  73 +
 .../Library/PlatformBootManagerLib/PlatformData.c  | 281 +
 7 files changed, 794 insertions(+), 7 deletions(-)
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
 create mode 100644 
CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c

diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.fdf 
b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
index 432155f..df771ef 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkg.fdf
+++ b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
@@ -86,7 +86,11 @@ INF 
IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe
 
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+!else
+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
 INF PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
 INF MdeModulePkg/Universal/Metronome/Metronome.inf
 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
@@ -112,12 +116,16 @@ INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
 #
 INF 
CorebootModulePkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
 INF CorebootModulePkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
-INF CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
 
 #
-# ISA Support
+# Serial Support
 #
-INF CorebootModulePkg/SerialDxe/SerialDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
+
+  INF CorebootModulePkg/SerialDxe/SerialDxe.inf
+!else
+  INF CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
+!endif
 
 #
 # Console Support
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc 
b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
index a9e78a5..57c2dce 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
@@ -34,6 +34,11 @@
   DEFINE SOURCE_DEBUG_ENABLE = FALSE
 
   #
+  # BDS Options: [IntelFrameworkModulePkg, MdeModulePkg]
+  #
+  DEFINE BDS_TYPE= IntelFrameworkModulePkg
+
+  #
   # CPU options
   #
   DEFINE MAX_LOGICAL_PROCESSORS  = 64
@@ -162,7 +167,13 @@
   ResetSystemLib|CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf
   
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
   
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   PlatformBdsLib|CorebootPayloadPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+!else
+  
PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+!endif
 
   #
   # Misc
@@ -353,7 +364,11 @@
   #
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
+!else
+  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
   PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
   MdeModulePkg/Universal/Metronome/Metronome.inf
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
@@ -398,7 +413,6 @@
   #
   
CorebootModulePkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
   CorebootModulePkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
-  CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
 
   #
   # SCSI/ATA/IDE/DISK Support
@@ -436,9 +450,13 @@
   CorebootModulePkg/OhciDxe/OhciDxe.inf
 
   #
-  # ISA Support
+  # Serial Support
   #
+!if $(BDS_TYPE) == IntelFrameworkModulePkg
   CorebootModulePkg/SerialDxe/SerialDxe.inf
+!else
+  CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
+!endif
 
   #
   # Console Support
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc 
b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
index 5dd17cb..d377535 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
@@ -34,6 +34,11 @@
   DEFINE SOURCE_DEBUG_ENABLE = FALSE
 
   #
+