public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] GCC Build Enabling.
@ 2018-08-22  7:03 Tu, Yunshan
  0 siblings, 0 replies; only message in thread
From: Tu, Yunshan @ 2018-08-22  7:03 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Fixed the GCC build errors.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunshan Tu <yunshan.tu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
---
 BuildBIOS.sh                                  |  4 +++
 .../Board/UP2/BoardInitDxe/BoardInitDxe.c     |  8 +++---
 Platform/BroxtonPlatformPkg/BuildBxtBios.sh   | 17 ++++++------
 Platform/BroxtonPlatformPkg/BuildIFWI.sh      |  5 ++++
 .../Eeprom/EepromDataLib/EEPROM/HobData.c     |  4 +--
 .../Eeprom/EepromDataLib/EEPROM/HobDataPei.c  |  4 +--
 .../Eeprom/EepromDataLib/EepromDataLib.c      |  8 +++---
 .../EepromDataLib/MemoryAllocationPei.c       |  2 --
 .../Features/Eeprom/EepromLib/EepromLib.c     | 27 +++----------------
 .../Include/Library/{I2CLib.h => I2cLib.h}    |  0
 10 files changed, 32 insertions(+), 47 deletions(-)
 mode change 100755 => 100644 BuildBIOS.sh
 mode change 100755 => 100644 Platform/BroxtonPlatformPkg/BuildBxtBios.sh
 mode change 100755 => 100644 Platform/BroxtonPlatformPkg/BuildIFWI.sh
 rename Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/{I2CLib.h => I2cLib.h} (100%)

diff --git a/BuildBIOS.sh b/BuildBIOS.sh
old mode 100755
new mode 100644
index 9c482697b1..64eeac0687
--- a/BuildBIOS.sh
+++ b/BuildBIOS.sh
@@ -70,6 +70,10 @@ for (( i=1; i<=$#; ))
       BoardId=MX
       Build_Flags="$Build_Flags /MX"
       shift
+    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/UP" ]; then
+      BoardId=UP
+      Build_Flags="$Build_Flags /UP"
+      shift
     elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/LH" ]; then
       BoardId=LH
       Build_Flags="$Build_Flags /LH"
diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
index 662d8f1991..32a066d8bd 100644
--- a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
+++ b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
@@ -17,7 +17,7 @@
 #include "BoardInitDxe.h"
 
 GET_BOARD_NAME mUp2GetBoardNamePtr = Up2GetBoardName;
-SYSTEM_CONFIGURATION  mSystemConfiguration;
+SYSTEM_CONFIGURATION  mSystemConfigurationUp;
 
 CHAR16*
 EFIAPI
@@ -58,18 +58,18 @@ UpdateSetupVariable (
                     &gEfiSetupVariableGuid,
                     &VariableAttributes,
                     &VarSize,
-                    &mSystemConfiguration
+                    &mSystemConfigurationUp
                     );
   ASSERT_EFI_ERROR (Status);
 
   if (Status == EFI_SUCCESS) {
-    mSystemConfiguration.PcieRootPortEn[3]= (UINT8) 0;
+    mSystemConfigurationUp.PcieRootPortEn[3]= (UINT8) 0;
     Status = gRT->SetVariable (
                     L"Setup",
                     &gEfiSetupVariableGuid,
                     VariableAttributes,
                     VarSize,
-                    &mSystemConfiguration
+                    &mSystemConfigurationUp
                     );
     ASSERT_EFI_ERROR (Status);
   }
diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
old mode 100755
new mode 100644
index c2b5f17dd5..ac2c58abb1
--- a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
+++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh
@@ -164,7 +164,6 @@ elif [ $BoardId == "BG" ]; then
 elif [ $BoardId == "LH" ]; then
   BOARD_ID=LEAF
   echo BOARD_ID = LEAFHIL >> $WORKSPACE/Conf/BiosId.env
-else
 elif [ $BoardId == "UP" ]; then
   BOARD_ID=UPBO
   echo BOARD_ID = UP2BORD >> $WORKSPACE/Conf/BiosId.env
@@ -411,15 +410,15 @@ fi
 
 if [ $BoardId == "MX" ]; then
   if [ $FabId == "B" ]; then
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_B/SpiChunk1.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_B/SpiChunk2.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_B/SpiChunk3.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_B/SpiChunk1SpiAccessControl.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_B/SpiChunk1.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_B/SpiChunk2.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_B/SpiChunk3.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_B/SpiChunk1SpiAccessControl.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
   else
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_A/SpiChunk1.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_A/SpiChunk2.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_A/SpiChunk3.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/IFWI/FAB_A/SpiChunk1SpiAccessControl.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_A/SpiChunk1.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_A/SpiChunk2.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_A/SpiChunk3.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+    cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/IFWI/FAB_A/SpiChunk1SpiAccessControl.bin  $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
   fi
 fi
 
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
old mode 100755
new mode 100644
index 13fa292caf..447cfb507c
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
@@ -23,6 +23,7 @@ function Usage () {
   echo "       Build_Flags:                 /BG    Benson Glacier Board "
   echo "       Build_Flags:                 /MX    Minnowboard 3 Next "
   echo "       Build_Flags:                 /LH    LeafHill CRB Board "
+  echo "       Build_Flags:                 /UP    AAEON UP2 Board"
   echo "       Build_Flags:                 /A     Set FabId to A"
   echo "       Build_Flags:                 /B     Set FabId to B (default)"
   echo "       Build_Flags:                 /D     Set FabId to D"
@@ -78,6 +79,10 @@ for (( i=1; i<=$#; ))
       BoardId=LH
       Build_Flags="$Build_Flags /LH"
       shift
+    elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/UP" ]; then
+      BoardId=UP
+      Build_Flags="$Build_Flags /UP"
+      shift
     elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/D" ]; then
       FabId=D
       Build_Flags="$Build_Flags /D"
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobData.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobData.c
index ebc62a14e7..a6eeb41f4d 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobData.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobData.c
@@ -19,7 +19,7 @@
 
 EFI_STATUS
 EFIAPI
-GetEepromDataHobData (VOID)
+GetEepromDataHobDataEeprom (VOID)
 {
   UINT8                        *BlockData;
   BOOLEAN                       BlockFound;
@@ -131,7 +131,7 @@ Exit:
 
 EFI_STATUS
 EFIAPI
-SetEepromDataHobData (VOID)
+SetEepromDataHobDataEeprom (VOID)
 {
   //
   // Not supported in DXE.
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c
index 6ee99d512e..10d82c037f 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPROM/HobDataPei.c
@@ -19,7 +19,7 @@
 
 EFI_STATUS
 EFIAPI
-GetEepromDataHobData (VOID)
+GetEepromDataHobDataEeprom (VOID)
 {
   //
   // Not supported in PEI.
@@ -30,7 +30,7 @@ GetEepromDataHobData (VOID)
 
 EFI_STATUS
 EFIAPI
-SetEepromDataHobData (VOID)
+SetEepromDataHobDataEeprom (VOID)
 {
   UINT8                        *BlockData;
   UINT16                        BlockNumber;
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.c
index eff1a75ee7..d418997e48 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EepromDataLib.c
@@ -18,10 +18,10 @@
 BOOLEAN                      mEepromDataLibDebugFlag = FALSE;
 EEPROM_DATA_LIBRARY_INDEX    mEepromDataLibIndex[EEPROM_DATA_LIBRARY_INDEX_MAX];
 CHAR8                       *mEepromLibraryString[EEPROM_DATA_LIBRARY_INDEX_MAX] = {
-                              {"EEPROM_NULL"},
-                              {"EEPROM_EEPROM"},
-                              {"EEPROM_FV"},
-                              {"EEPROM_MEMORY"}
+                              "EEPROM_NULL",
+                              "EEPROM_EEPROM",
+                              "EEPROM_FV",
+                              "EEPROM_MEMORY"
                              };
 
 //
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c
index 9bfccc7010..71abbaed75 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/MemoryAllocationPei.c
@@ -315,12 +315,10 @@ GetEepromMemoryHob (VOID)
   //
   // Create HOB
   //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
   ZeroMem (&AllocationHeader, sizeof (EEPROM_ALLOCATION_STRUCT));
   AllocationHeader.Signature = ALLOCATION_HOB_HEADER_SIGNATURE;
   HeaderPointer = BuildGuidDataHob (&gEepromVariableGuid, &AllocationHeader, MAX_EEPROM_HOB_SIZE);
   if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HeaderPointer = %08x\n", __FUNCTION__, __LINE__, HeaderPointer));
-  DisplayStackPointer (__FUNCTION__, __LINE__);
 
 Exit:
   if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - AllocationHob @ %08x\n", __FUNCTION__, __LINE__, HeaderPointer));
diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLib.c
index eccd28f54b..adf5df63aa 100644
--- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLib.c
@@ -16,7 +16,7 @@
 #include "EepromLib.h"
 
 BOOLEAN     *gImageValidFlag;
-UINT32       mCrcTable[256];
+UINT32       mCrcTableEeprom[256];
 BOOLEAN      mCrcInitFlag        = FALSE;
 BOOLEAN      mEepromLibDebugFlag = TRUE;
 
@@ -71,7 +71,7 @@ InitializeCrc32Table (
           Value = Value << 1;
         }
       }
-      mCrcTable[TableEntry] = ReverseBits (Value);
+      mCrcTableEeprom[TableEntry] = ReverseBits (Value);
     }
     mCrcInitFlag = TRUE;
   }
@@ -102,7 +102,7 @@ AddToCrc32 (
   Crc32 = Crc;
   Ptr   = (UINT8 *) Data;
   for (Index = 0; Index < DataSize; Index++) {
-    Crc32 = (Crc32 >> 8) ^ mCrcTable[(UINT8) Crc32 ^ Ptr[Index]];
+    Crc32 = (Crc32 >> 8) ^ mCrcTableEeprom[(UINT8) Crc32 ^ Ptr[Index]];
   }
   return Crc32;
 }
@@ -569,10 +569,6 @@ GetValidEepromLibrary (
     goto Exit;
   }
 
-  //
-  // Display current stack pointer
-  //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
   //
   // Loop thru PcdEepromAutoPriority looking for a previously validated image.
   //
@@ -600,10 +596,6 @@ GetValidEepromLibrary (
     index++;
   }
 
-  //
-  // Display current stack pointer
-  //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
   //
   // If nothing is valid, try validating them all
   //
@@ -632,10 +624,6 @@ GetValidEepromLibrary (
     }
   }
 
-  //
-  // Display current stack pointer
-  //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
   //
   // Determine which image to copy to memory
   //
@@ -730,10 +718,6 @@ GetValidEepromLibrary (
     FvBoardInfo        = EepromFreePool (FvBoardInfo);
     FvEepromHeader     = EepromFreePool (FvEepromHeader);
   }
-  //
-  // Display current stack pointer
-  //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
 
   //
   // Check to see if we need to copy into memory and not in PEI
@@ -805,11 +789,6 @@ Exit:
     Library = EEPROM_NULL;
   }
 
-  //
-  // Display current stack pointer
-  //
-  DisplayStackPointer (__FUNCTION__, __LINE__);
-
   if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning library %a\n", __FUNCTION__, __LINE__, mEepromLibraryString[Library]));
   return Library;
 }
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2CLib.h b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2cLib.h
similarity index 100%
rename from Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2CLib.h
rename to Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2cLib.h
-- 
2.18.0.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-22  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-22  7:03 [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] GCC Build Enabling Tu, Yunshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox