From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=yunshan.tu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B76D210FBEE8 for ; Wed, 22 Aug 2018 00:03:05 -0700 (PDT) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2018 00:03:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,273,1531810800"; d="dat'59?scan'59,208,59";a="68133299" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 22 Aug 2018 00:03:04 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 22 Aug 2018 00:03:04 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 22 Aug 2018 00:03:03 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.205]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.143]) with mapi id 14.03.0319.002; Wed, 22 Aug 2018 15:03:01 +0800 From: "Tu, Yunshan" To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] GCC Build Enabling. Thread-Index: AdQ55ihhcGjXcCBCRC6NhkWWpThl1w== Date: Wed, 22 Aug 2018 07:03:00 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTY5ZjU4YjMtZjQ2MS00Y2JhLWI3MWYtYmM3YzI3NzQ4ODcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieERXb2w3U0M2a1d6SmROY3hCTk51NUFSNGgyeXFEbmZuTlBNSnhcLzNTRnduNnlud1RvUEY4WXhTcTM4cU1NUjcifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] GCC Build Enabling. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 07:03:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Fixed the GCC build errors. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunshan Tu Reviewed-by: David Wei --- 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 =3D> I2cLib.h} | 0 10 files changed, 32 insertions(+), 47 deletions(-) mode change 100755 =3D> 100644 BuildBIOS.sh mode change 100755 =3D> 100644 Platform/BroxtonPlatformPkg/BuildBxtBios.sh mode change 100755 =3D> 100644 Platform/BroxtonPlatformPkg/BuildIFWI.sh rename Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/{I2CLi= b.h =3D> 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=3D1; i<=3D$#; )) BoardId=3DMX Build_Flags=3D"$Build_Flags /MX" shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/UP" ]; then + BoardId=3DUP + Build_Flags=3D"$Build_Flags /UP" + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/LH" ]; then BoardId=3DLH Build_Flags=3D"$Build_Flags /LH" diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDx= e.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" =20 GET_BOARD_NAME mUp2GetBoardNamePtr =3D Up2GetBoardName; -SYSTEM_CONFIGURATION mSystemConfiguration; +SYSTEM_CONFIGURATION mSystemConfigurationUp; =20 CHAR16* EFIAPI @@ -58,18 +58,18 @@ UpdateSetupVariable ( &gEfiSetupVariableGuid, &VariableAttributes, &VarSize, - &mSystemConfiguration + &mSystemConfigurationUp ); ASSERT_EFI_ERROR (Status); =20 if (Status =3D=3D EFI_SUCCESS) { - mSystemConfiguration.PcieRootPortEn[3]=3D (UINT8) 0; + mSystemConfigurationUp.PcieRootPortEn[3]=3D (UINT8) 0; Status =3D gRT->SetVariable ( L"Setup", &gEfiSetupVariableGuid, VariableAttributes, VarSize, - &mSystemConfiguration + &mSystemConfigurationUp ); ASSERT_EFI_ERROR (Status); } diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh b/Platform/Broxton= PlatformPkg/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 =3D=3D "BG" ]; then elif [ $BoardId =3D=3D "LH" ]; then BOARD_ID=3DLEAF echo BOARD_ID =3D LEAFHIL >> $WORKSPACE/Conf/BiosId.env -else elif [ $BoardId =3D=3D "UP" ]; then BOARD_ID=3DUPBO echo BOARD_ID =3D UP2BORD >> $WORKSPACE/Conf/BiosId.env @@ -411,15 +410,15 @@ fi =20 if [ $BoardId =3D=3D "MX" ]; then if [ $FabId =3D=3D "B" ]; then - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_B/SpiChunk1.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_B/SpiChunk2.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_B/SpiChunk3.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_B/SpiChunk1SpiAccessControl.bin $PLATFORM_PATH/Platform/Broxton= PlatformPkg/Common/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_B/SpiChunk1.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_B/SpiChunk2.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_B/SpiChunk3.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_B/SpiChunk1SpiAccessControl.bin $PLATFORM_PATH/Platform/Broxt= onPlatformPkg/Common/Tools/Stitch else - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_A/SpiChunk1.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_A/SpiChunk2.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_A/SpiChunk3.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch - cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Nex= t/IFWI/FAB_A/SpiChunk1SpiAccessControl.bin $PLATFORM_PATH/Platform/Broxton= PlatformPkg/Common/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_A/SpiChunk1.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_A/SpiChunk2.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_A/SpiChunk3.bin $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Co= mmon/Tools/Stitch + cp -f $PLATFORM_PATH/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/IFWI/FAB_A/SpiChunk1SpiAccessControl.bin $PLATFORM_PATH/Platform/Broxt= onPlatformPkg/Common/Tools/Stitch fi fi =20 diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPla= tformPkg/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=3D1; i<=3D$#; )) BoardId=3DLH Build_Flags=3D"$Build_Flags /LH" shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/UP" ]; then + BoardId=3DUP + Build_Flags=3D"$Build_Flags /UP" + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/D" ]; then FabId=3DD Build_Flags=3D"$Build_Flags /D" diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/EEPROM/HobData.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Ee= promDataLib/EEPROM/HobData.c index ebc62a14e7..a6eeb41f4d 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/HobData.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/HobData.c @@ -19,7 +19,7 @@ =20 EFI_STATUS EFIAPI -GetEepromDataHobData (VOID) +GetEepromDataHobDataEeprom (VOID) { UINT8 *BlockData; BOOLEAN BlockFound; @@ -131,7 +131,7 @@ Exit: =20 EFI_STATUS EFIAPI -SetEepromDataHobData (VOID) +SetEepromDataHobDataEeprom (VOID) { // // Not supported in DXE. diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/EEPROM/HobDataPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom= /EepromDataLib/EEPROM/HobDataPei.c index 6ee99d512e..10d82c037f 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/HobDataPei.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/HobDataPei.c @@ -19,7 +19,7 @@ =20 EFI_STATUS EFIAPI -GetEepromDataHobData (VOID) +GetEepromDataHobDataEeprom (VOID) { // // Not supported in PEI. @@ -30,7 +30,7 @@ GetEepromDataHobData (VOID) =20 EFI_STATUS EFIAPI -SetEepromDataHobData (VOID) +SetEepromDataHobDataEeprom (VOID) { UINT8 *BlockData; UINT16 BlockNumber; diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/EepromDataLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eep= romDataLib/EepromDataLib.c index eff1a75ee7..d418997e48 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Eepr= omDataLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Eepr= omDataLib.c @@ -18,10 +18,10 @@ BOOLEAN mEepromDataLibDebugFlag =3D FALSE; EEPROM_DATA_LIBRARY_INDEX mEepromDataLibIndex[EEPROM_DATA_LIBRARY_INDEX= _MAX]; CHAR8 *mEepromLibraryString[EEPROM_DATA_LIBRARY_INDE= X_MAX] =3D { - {"EEPROM_NULL"}, - {"EEPROM_EEPROM"}, - {"EEPROM_FV"}, - {"EEPROM_MEMORY"} + "EEPROM_NULL", + "EEPROM_EEPROM", + "EEPROM_FV", + "EEPROM_MEMORY" }; =20 // diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/MemoryAllocationPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eepr= om/EepromDataLib/MemoryAllocationPei.c index 9bfccc7010..71abbaed75 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memo= ryAllocationPei.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/Memo= ryAllocationPei.c @@ -315,12 +315,10 @@ GetEepromMemoryHob (VOID) // // Create HOB // - DisplayStackPointer (__FUNCTION__, __LINE__); ZeroMem (&AllocationHeader, sizeof (EEPROM_ALLOCATION_STRUCT)); AllocationHeader.Signature =3D ALLOCATION_HOB_HEADER_SIGNATURE; HeaderPointer =3D BuildGuidDataHob (&gEepromVariableGuid, &AllocationHea= der, MAX_EEPROM_HOB_SIZE); if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HeaderPoin= ter =3D %08x\n", __FUNCTION__, __LINE__, HeaderPointer)); - DisplayStackPointer (__FUNCTION__, __LINE__); =20 Exit: if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Allocation= Hob @ %08x\n", __FUNCTION__, __LINE__, HeaderPointer)); diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.c index eccd28f54b..adf5df63aa 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.c @@ -16,7 +16,7 @@ #include "EepromLib.h" =20 BOOLEAN *gImageValidFlag; -UINT32 mCrcTable[256]; +UINT32 mCrcTableEeprom[256]; BOOLEAN mCrcInitFlag =3D FALSE; BOOLEAN mEepromLibDebugFlag =3D TRUE; =20 @@ -71,7 +71,7 @@ InitializeCrc32Table ( Value =3D Value << 1; } } - mCrcTable[TableEntry] =3D ReverseBits (Value); + mCrcTableEeprom[TableEntry] =3D ReverseBits (Value); } mCrcInitFlag =3D TRUE; } @@ -102,7 +102,7 @@ AddToCrc32 ( Crc32 =3D Crc; Ptr =3D (UINT8 *) Data; for (Index =3D 0; Index < DataSize; Index++) { - Crc32 =3D (Crc32 >> 8) ^ mCrcTable[(UINT8) Crc32 ^ Ptr[Index]]; + Crc32 =3D (Crc32 >> 8) ^ mCrcTableEeprom[(UINT8) Crc32 ^ Ptr[Index]]; } return Crc32; } @@ -569,10 +569,6 @@ GetValidEepromLibrary ( goto Exit; } =20 - // - // Display current stack pointer - // - DisplayStackPointer (__FUNCTION__, __LINE__); // // Loop thru PcdEepromAutoPriority looking for a previously validated im= age. // @@ -600,10 +596,6 @@ GetValidEepromLibrary ( index++; } =20 - // - // Display current stack pointer - // - DisplayStackPointer (__FUNCTION__, __LINE__); // // If nothing is valid, try validating them all // @@ -632,10 +624,6 @@ GetValidEepromLibrary ( } } =20 - // - // Display current stack pointer - // - DisplayStackPointer (__FUNCTION__, __LINE__); // // Determine which image to copy to memory // @@ -730,10 +718,6 @@ GetValidEepromLibrary ( FvBoardInfo =3D EepromFreePool (FvBoardInfo); FvEepromHeader =3D EepromFreePool (FvEepromHeader); } - // - // Display current stack pointer - // - DisplayStackPointer (__FUNCTION__, __LINE__); =20 // // Check to see if we need to copy into memory and not in PEI @@ -805,11 +789,6 @@ Exit: Library =3D EEPROM_NULL; } =20 - // - // Display current stack pointer - // - DisplayStackPointer (__FUNCTION__, __LINE__); - if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning libr= ary %a\n", __FUNCTION__, __LINE__, mEepromLibraryString[Library])); return Library; } diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I= 2CLib.h b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2cL= ib.h similarity index 100% rename from Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2= CLib.h rename to Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Include/Library/I2cL= ib.h --=20 2.18.0.windows.1