[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Benson FAB B

zwei4 posted 1 patch 7 years, 1 month ago
Failed in applying to current master (apply log)
.../BensonGlacier/BoardInitPostMem/BoardGpios.h    |   6 +-
.../BensonGlacier/BoardInitPostMem/BoardInit.c     |   2 -
.../BensonGlacier/BoardInitPreMem/BoardInit.c      |  15 ++-
.../BensonGlacier/BoardInitPreMem/PlatformId.c     | 136 ++++-----------------
.../BensonGlacier/BoardInitPreMem/PlatformId.h     |  16 +--
.../Board/LeafHill/BoardInitPostMem/BoardInit.c    |   2 -
.../Board/LeafHill/BoardInitPreMem/BoardInit.c     |   5 +-
.../MinnowBoard3/BoardInitPostMem/BoardInit.c      |   2 -
.../Board/MinnowBoard3/BoardInitPreMem/BoardInit.c |   6 +-
Platform/BroxtonPlatformPkg/BuildBxtBios.bat       |   6 +-
.../Common/Tools/Stitch/IFWIStitch_Simple.bat      |  12 +-
11 files changed, 55 insertions(+), 153 deletions(-)
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Benson FAB B
Posted by zwei4 7 years, 1 month ago
Add code for Benson Glacier FAB B.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: zwei4 <david.wei@intel.com>
---
 .../BensonGlacier/BoardInitPostMem/BoardGpios.h    |   6 +-
 .../BensonGlacier/BoardInitPostMem/BoardInit.c     |   2 -
 .../BensonGlacier/BoardInitPreMem/BoardInit.c      |  15 ++-
 .../BensonGlacier/BoardInitPreMem/PlatformId.c     | 136 ++++-----------------
 .../BensonGlacier/BoardInitPreMem/PlatformId.h     |  16 +--
 .../Board/LeafHill/BoardInitPostMem/BoardInit.c    |   2 -
 .../Board/LeafHill/BoardInitPreMem/BoardInit.c     |   5 +-
 .../MinnowBoard3/BoardInitPostMem/BoardInit.c      |   2 -
 .../Board/MinnowBoard3/BoardInitPreMem/BoardInit.c |   6 +-
 Platform/BroxtonPlatformPkg/BuildBxtBios.bat       |   6 +-
 .../Common/Tools/Stitch/IFWIStitch_Simple.bat      |  12 +-
 11 files changed, 55 insertions(+), 153 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.h
index d72cd80c9..d5accbc17 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.h
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.h
@@ -90,10 +90,10 @@ BXT_GPIO_PAD_INIT  mBenson_GpioInitData_N[] =
   BXT_GPIO_PAD_CONF(L"GPIO_24",                  M0   ,    GPO   ,GPIO_D ,  NA    ,   NA       , Wake_Disabled, P_20K_H,   NA    ,    NA,     NA   ,     NA, GPIO_PADBAR+0x00C0,  NORTH),//SATA_DEVSLP0
   BXT_GPIO_PAD_CONF(L"GPIO_25",                  M0   ,    GPO   ,GPIO_D ,  NA    ,   Level    , Wake_Disabled, P_20K_H, Inverted,   SCI,     NA   ,     NA, GPIO_PADBAR+0x00C8,  NORTH),//Feature:ODD MD/DA SCI          Net in Sch: SATA_ODD_DA_IN
   BXT_GPIO_PAD_CONF(L"GPIO_26",                  M0   ,    GPIO  ,GPIO_D ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,     NA   ,     NA, GPIO_PADBAR+0x00D0,  NORTH),//SATA_LEDN
-  BXT_GPIO_PAD_CONF(L"GPIO_27",                  M0   ,    GPO   , GPIO_D,  HI    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,     NA   ,     NA, GPIO_PADBAR+0x00D8,  NORTH),//Feature:DFU                    Net in Sch: NFC_DFU
+  BXT_GPIO_PAD_CONF(L"GPIO_27",                  M0   ,    GPO   ,GPIO_D ,  HI    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,     NA   ,     NA, GPIO_PADBAR+0x00D8,  NORTH),//Feature:DFU                    Net in Sch: NFC_DFU
   BXT_GPIO_PAD_CONF(L"GPIO_28",                  M2   ,    NA    ,  NA   ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x00E0,  NORTH),//                               Net in Sch: ISH_GPIO10
-  BXT_GPIO_PAD_CONF(L"GPIO_29",                  M2   ,    NA    ,  NA   ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x00E8,  NORTH),//                               Net in Sch: ISH_GPIO11
-  BXT_GPIO_PAD_CONF(L"GPIO_30",                  M1   ,    NA    ,  NA   ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x00F0,  NORTH),//                               Net in Sch: ISH_GPIO12
+  BXT_GPIO_PAD_CONF(L"GPIO_29",                  M0   ,    GPO   ,GPIO_D ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,     NA   ,     NA, GPIO_PADBAR+0x00E8,  NORTH),// SOC_M2_RST                               Net in Sch: ISH_GPIO11
+  //BXT_GPIO_PAD_CONF(L"GPIO_30",                  M1   ,    NA    ,  NA   ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x00F0,  NORTH),// FAB ID                              Net in Sch: ISH_GPIO12
   BXT_GPIO_PAD_CONF(L"GPIO_31",                  M5   ,    NA    , NA    ,  NA    ,   NA       , Wake_Disabled, P_20K_L,    NA   ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x00F8,  NORTH),//Feature: SUSCLK1
   BXT_GPIO_PAD_CONF(L"GPIO_32",                  M5   ,    NA    ,  NA   ,  NA    ,   NA       , Wake_Disabled, P_20K_L,   NA    ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x0100,  NORTH),//                               Net in Sch: SUSCLK2
   BXT_GPIO_PAD_CONF(L"GPIO_33",                  M5   ,    NA    , NA    ,  NA    ,   NA       , Wake_Disabled, P_20K_L,    NA   ,    NA,IOS_Masked,   SAME, GPIO_PADBAR+0x0108,  NORTH),//Feature: SUSCLK3
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
index ab11aaafd..07246c155 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
@@ -59,7 +59,6 @@ BensonGlacierPostMemInitCallback (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-    DEBUG ((EFI_D_INFO,  "Benson Glacier Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
@@ -67,7 +66,6 @@ BensonGlacierPostMemInitCallback (
   FabId = (UINT8) PcdGet8 (PcdFabId);
   DEBUG ((EFI_D_INFO,  "PostMemInit: BoardId == 0x%X, FabId == 0x%X\n", BoardId, FabId));
   if (BoardId != (UINT8) BOARD_ID_BENSON) {
-    DEBUG ((EFI_D_INFO,  "Benson Glacier Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
index 24cfaf3a7..6c75f7594 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
@@ -59,22 +59,27 @@ BensonGlacierPreMemInit (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-     DEBUG ((EFI_D_INFO,  "Benson Glacier Pre Mem Init: Skip\n"));
     return EFI_SUCCESS;
   }
 
-  DEBUG ((EFI_D_INFO,  "Benson Glacier Pre Mem Init\n"));
-
   //
   // Pre Mem Board Init
   //
-  Status = BensonGetEmbeddedBoardIdFabId (PeiServices, &BoardId, &FabId);
+  Status = BensonGetBoardId (PeiServices, &BoardId);
 
   if (BoardId != (UINT8) BOARD_ID_BENSON) {
-    DEBUG ((EFI_D_INFO,  "Not a Benson Glacier - skip\n"));
     return EFI_SUCCESS;
   }
 
+  DEBUG ((EFI_D_INFO,  "This is Benson Glacier board.\n"));
+  
+  Status = BensonGetFabId (PeiServices, &FabId);
+  if (FabId == 1) {
+    DEBUG ((EFI_D_INFO,  "This is Benson Glacier FAB B.\n"));
+  } else if (FabId == 0) {
+    DEBUG ((EFI_D_INFO,  "This is Benson Glacier FAB A.\n"));
+  }
+  
   PcdSet8 (PcdBoardId, BoardId);
   PcdSet8 (PcdFabId, FabId);
 
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.c
index e164cfda7..70369248d 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.c
@@ -22,17 +22,16 @@
 
 EFI_STATUS
 EFIAPI
-BensonGetEmbeddedBoardIdFabId(
+BensonGetBoardId(
   IN CONST EFI_PEI_SERVICES     **PeiServices,
-  OUT UINT8                     *BoardId,
-  OUT UINT8                     *FabId
+  OUT UINT8                     *BoardId
   )
 {
   BXT_CONF_PAD0   padConfg0;
   BXT_CONF_PAD1   padConfg1;
-  IN UINT32       CommAndOffset;
+  UINT32          CommAndOffset;
 
-  DEBUG ((DEBUG_INFO, "GetEmbeddedBoardIdFabId++\n"));
+  DEBUG ((DEBUG_INFO, "GetBoardId.\n"));
 
   //
   // Board_ID0: PMIC_STDBY
@@ -91,136 +90,43 @@ BensonGetEmbeddedBoardIdFabId(
 
   DEBUG ((DEBUG_INFO,  "BoardId: %02X\n", *BoardId));
 
-  //
-  // Fab_ID0: PMIC_I2C_SDA
-  //
-  CommAndOffset = GetCommOffset (NORTHWEST, 0x0108);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  //
-  // Set to Pull Up 20K
-  //
-  padConfg1.r.Term = 0xC;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Fab_ID1: PMIC_I2C_SCL
-  //
-  CommAndOffset = GetCommOffset (NORTHWEST, 0x0100);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  //Set to Pull Up 20K
-  padConfg1.r.Term = 0xC;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Fab_ID2: PMIC_BCUDISW2
-  //
-  CommAndOffset = GetCommOffset (NORTHWEST, 0x00D8);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  //
-  // Set to Pull Up 20K
-  //
-  padConfg1.r.Term = 0xC;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Fab_ID3: PMIC_BCUDISCRIT
-  //
-  CommAndOffset = GetCommOffset (NORTHWEST, 0x00E0);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  //
-  // Set to Pull Up 20K
-  //
-  padConfg1.r.Term = 0xC;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-
-  *FabId = (UINT8) (((GpioPadRead (GetCommOffset (NORTHWEST, 0x0108) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) | \
-                   (((GpioPadRead (GetCommOffset (NORTHWEST, 0x0100) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 1) | \
-                   (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00D8) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 2) | \
-                   (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00E0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
-
-  DEBUG ((EFI_D_INFO,  "FabId: %02X\n", *FabId));
-
-
   return EFI_SUCCESS;
 }
 
-
 EFI_STATUS
 EFIAPI
-BensonGetIVIBoardIdFabId (
+BensonGetFabId(
   IN CONST EFI_PEI_SERVICES     **PeiServices,
-  OUT UINT8                     *BoardId,
   OUT UINT8                     *FabId
   )
 {
   BXT_CONF_PAD0   padConfg0;
   BXT_CONF_PAD1   padConfg1;
-  IN UINT32       CommAndOffset;
+  UINT32           CommAndOffset;
+
+  DEBUG ((DEBUG_INFO, "Benson GetFabId++\n"));
 
-  DEBUG ((DEBUG_INFO, "GetIVIBoardIdFabId++\n"));
 
   //
-  // Board_ID0: GPIO_62
-  //
-  CommAndOffset = GetCommOffset (NORTH, 0x0190);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
-  padConfg1.r.IOSTerm = 0x3; //Enable Pullup
-  padConfg1.r.Term = 0xC;    //20k wpu
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Board_ID1: GPIO_63
-  //
-  CommAndOffset = GetCommOffset (NORTH, 0x0198);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
-  padConfg1.r.IOSTerm = 0x3; //Enable Pullup
-  padConfg1.r.Term = 0xC;    //20k wpu
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Board_ID2: GPIO_64
+  // FAB_ID: GPIO_30
   //
-  CommAndOffset = GetCommOffset (NORTH, 0x01A0);
+
+  CommAndOffset = GetCommOffset (NORTH, 0x0F0);
   padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
   padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
-  padConfg1.r.IOSTerm = 0x3; //Enable Pullup
-  padConfg1.r.Term = 0xC;    //20k wpu
-  GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-  //
-  // Board_ID3: GPIO_65
-  //
-  CommAndOffset = GetCommOffset (NORTH, 0x01A8);
-  padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
-  padConfg0.r.PMode = 0;
-  padConfg0.r.GPIORxTxDis = 0x1;
+
+  padConfg0.r.PMode = M0; // Set to GPIO mode
+  padConfg0.r.GPIORxTxDis = GPI;  // Set to GPI
   GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
-  padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
-  padConfg1.r.IOSTerm = 0x3; //Enable Pullup
-  padConfg1.r.Term = 0xC;    //20k wpu
+
+  padConfg1.r.IOSTerm  = EnPd;    // Enable pull-down
+  padConfg1.r.Term     = P_20K_L; // Set to 20K pull-down    
   GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
 
-  *BoardId = (UINT8) (((GpioPadRead (GetCommOffset (NORTH, 0x0190) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) | \
-                     (((GpioPadRead (GetCommOffset (NORTH, 0x0198) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 1) | \
-                     (((GpioPadRead (GetCommOffset (NORTH, 0x01A0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 2) | \
-                     (((GpioPadRead (GetCommOffset (NORTH, 0x01A8) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
+
+  *FabId = (UINT8) (((GpioPadRead (GetCommOffset (NORTH, 0x0F0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1));
+
+  DEBUG ((EFI_D_INFO,  "FabId: %02X\n", *FabId));
 
   return EFI_SUCCESS;
 }
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.h
index 7fc0cc3f9..c0b0f3610 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.h
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/PlatformId.h
@@ -34,25 +34,15 @@ BensonGetFwCfgId (
 
 EFI_STATUS
 EFIAPI
-BensonGetBoardIdFabId (
+BensonGetBoardId (
   IN CONST EFI_PEI_SERVICES     **PeiServices,
-  OUT UINT8                     *BoardId,
-  OUT UINT8                     *FabId
-  );
-
-EFI_STATUS
-EFIAPI
-BensonGetEmbeddedBoardIdFabId (
-  IN CONST EFI_PEI_SERVICES     **PeiServices,
-  OUT UINT8                     *BoardId,
-  OUT UINT8                     *FabId
+  OUT UINT8                     *BoardId
   );
 
 EFI_STATUS
 EFIAPI
-BensonGetIVIBoardIdFabId (
+BensonGetFabId (
   IN CONST EFI_PEI_SERVICES     **PeiServices,
-  OUT UINT8                     *BoardId,
   OUT UINT8                     *FabId
   );
 
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
index 7221f84a3..8051b0021 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
@@ -67,7 +67,6 @@ LeafHillPostMemInitCallback (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-    DEBUG ((EFI_D_INFO,  "Leaf Hill Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
@@ -75,7 +74,6 @@ LeafHillPostMemInitCallback (
   FabId = (UINT8) PcdGet8 (PcdFabId);
   DEBUG ((EFI_D_INFO,  "PostMemInit: BoardId == 0x%X, FabId == 0x%X\n", BoardId, FabId));
   if (BoardId != (UINT8) BOARD_ID_LFH_CRB) {
-    DEBUG ((EFI_D_INFO,  "LeafHill Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/BoardInit.c
index aa22e5622..b0be91dd2 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/BoardInit.c
@@ -68,20 +68,19 @@ LeafHillPreMemInit (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-     DEBUG ((EFI_D_INFO,  "LeafHill PreMem Init: Skip\n"));
     return EFI_SUCCESS;
   }
-  DEBUG ((EFI_D_INFO,  "LeafHill Pre Mem Init\n"));
 
   //
   // Pre Mem Board Init
   //
   Status = LeafHillGetEmbeddedBoardIdFabId (PeiServices, &BoardId, &FabId);
   if (BoardId != (UINT8) BOARD_ID_LFH_CRB) {
-    DEBUG ((EFI_D_INFO,  "Not a Leaf Hill Board - skip\n"));
     return EFI_SUCCESS;
   }
 
+  DEBUG ((EFI_D_INFO,  "This is LeafHill CRB.\n"));
+
   PcdSet8 (PcdBoardId, BoardId);
   PcdSet8 (PcdFabId, FabId);
 
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
index f329b5f2b..6ee7e3d3f 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
@@ -67,7 +67,6 @@ MinnowBoard3PostMemInitCallback (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-    DEBUG ((EFI_D_INFO,  "Minnow Board 3 Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
@@ -75,7 +74,6 @@ MinnowBoard3PostMemInitCallback (
   FabId = (UINT8) PcdGet8 (PcdFabId);
   DEBUG ((EFI_D_INFO,  "PostMemInit: BoardId == 0x%X, FabId == 0x%X\n", BoardId, FabId));
   if (BoardId != (UINT8) BOARD_ID_MINNOW) {
-    DEBUG ((EFI_D_INFO,  "Minnow Board 3 Post Mem Init callback: Skip\n"));
     return EFI_SUCCESS;
   }
 
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/BoardInit.c
index 720d11add..c07d4c044 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/BoardInit.c
@@ -68,22 +68,20 @@ MinnowBoard3PreMemInit (
              &Instance
              );
   if (!EFI_ERROR (Status)) {
-     DEBUG ((EFI_D_INFO,  "Minnow Board 3 Pre Mem Init: Skip\n"));
     return EFI_SUCCESS;
   }
 
-  DEBUG ((EFI_D_INFO,  "Minnow Board 3 Pre Mem Init\n"));
-
   //
   // Pre Mem Board Init
   //
   Status = Minnow3GetEmbeddedBoardIdFabId (PeiServices, &BoardId, &FabId);
 
   if (BoardId != (UINT8) BOARD_ID_MINNOW) {
-    DEBUG ((EFI_D_INFO,  "Not a Minnow Board - skip\n"));
     return EFI_SUCCESS;
   }
 
+  DEBUG ((EFI_D_INFO,  "This is MinnowBoard 3.\n"));
+
   PcdSet8 (PcdBoardId, BoardId);
   PcdSet8 (PcdFabId, FabId);
 
diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
index 7804dc58f..e08f5d10b 100644
--- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
+++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat
@@ -255,7 +255,11 @@ if /i "%~2" == "RELEASE" (
 )
 
 if %BoardId%==BG (
-  echo BOARD_REV = A >> Conf\BiosId.env
+  if %FabId%==B (
+    echo BOARD_REV = B >> Conf\BiosId.env
+  ) else (
+    echo BOARD_REV = A >> Conf\BiosId.env
+  )
 )
 
 if %BoardId%==MN (
diff --git a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
index 679b0eec1..42375ce87 100644
--- a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
+++ b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
@@ -132,9 +132,15 @@ copy /y /b %BIOS_Names%\OBB.Fv .\BIOS_COMPONENTS
 copy /y /b %BIOS_Names%\NvStorage.Fv .\BIOS_COMPONENTS
 
 if %BoardId%==BG (
-  copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk1.bin .
-  copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk2.bin .
-  copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk3.bin .
+  if %FabId%==B (
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_B\SpiChunk1.bin .
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_B\SpiChunk2.bin .
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_B\SpiChunk3.bin .
+  ) else (
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk1.bin .
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk2.bin .
+    copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk3.bin .  
+  )  
   copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin
 ) else if %BoardId%==MN (
          if %FabId%==B (
-- 
2.14.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel