From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=kelly.steele@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 055F221130E45 for ; Wed, 3 Oct 2018 15:30:23 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 15:30:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,337,1534834800"; d="scan'208,217,223";a="78509672" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga008.jf.intel.com with ESMTP; 03 Oct 2018 15:30:21 -0700 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 3 Oct 2018 15:30:21 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.194]) by ORSMSX113.amr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0319.002; Wed, 3 Oct 2018 15:30:20 -0700 From: "Steele, Kelly" To: "edk2-devel@lists.01.org" CC: "Wei, David" , "Guo, Mang" Thread-Topic: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Connect EEPROM code in Thread-Index: AdRbaAFoCiWm3GkWTVmflo+E+KL2Yw== Date: Wed, 3 Oct 2018 22:30:19 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzI5OTNlOTEtZjM1Yy00N2RjLTg4YjYtODI3N2Q5ZDE4NDdkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMTNVNzlYbTArK3d6UUNPSkdvVzk1S1laV3VEeVhzb3RzeWRpbnBFczlwMXg2ZFR4RGpjbklCWnUrRDZKT3VRNiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.140] MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 03 Oct 2018 15:47:07 -0700 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Connect EEPROM code in 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, 03 Oct 2018 22:30:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >>From affe36b5766578161cc39faaed40ad2366e2325c Mon Sep 17 00:00:00 2001 From: Kelly Steele Date: Wed, 3 Oct 2018 14:34:47 -0700 Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Connect EEP= ROM code in Connected the EEPROM code into the flow of the Minnowboard 3 Module code. This required increasing the size of the IBBR & IBBM. This means that new SpiChunks will need to be generated before you can use the simple IFWI stitch method. The EEPROM code feature is currently turned off via the defines.dsc define, EEPROM_CODE_ENABLE. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kelly Steele --- .../BoardInitPostMem/BoardInit.c | 14 + .../BoardInitPostMem/BoardInitPostMem.inf | 3 + .../BoardInitPreMem/BoardInitMiscs.c | 278 ++-- .../BoardInitPreMem/BoardInitMiscs.h | 4 +- .../BoardInitPreMem/BoardInitPreMem.inf | 5 +- .../BoardInitPreMem/PlatformId.c | 7 + .../Board/MinnowBoard3Module/Eeprom/EepromStruct.h | 1 - .../MinnowBoard3Module/Eeprom/GenerateBinary.py | 19 +- .../MinnowBoard3Module/Eeprom/Logo/Tianocore.bmp | Bin 0 -> 11958 bytes .../Board/MinnowBoard3Module/Eeprom/MB3-Eeprom.bin | Bin 32688 -> 26880 by= tes .../Board/MinnowBoard3Module/Eeprom/MB3-Prj.cfg | 1663 +++++++++--------= --- .../Eeprom/Memory/DramPolicyPpi.bin | Bin 0 -> 223 bytes .../Eeprom/Memory/GenerateDramPolicyBinary.py | 64 + .../{Vbt_bxt_t_TianmaMipi.bin =3D> VbtBxtMipi.bin} | Bin 6656 -> 5632 by= tes .../Eeprom/VBT/Vbt_bxt_t_fab_b.bin | Bin 7168 -> 0 bytes .../Eeprom/VBT/Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin | Bin 6656 -> 0 bytes Platform/BroxtonPlatformPkg/BuildBxtBios.bat | 2 +- Platform/BroxtonPlatformPkg/BuildIFWI.bat | 1 - .../Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 6 + .../Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 +- .../Common/Features/Eeprom/EepromApp/EepromApp.c | 20 +- .../Common/Features/Eeprom/EepromApp/EepromApp.h | 394 ++--- .../Common/Features/Eeprom/EepromApp/EepromApp.inf | 1 + .../Eeprom/EepromBinary/Docs/EepromLayout.txt | 23 +- .../Common/Features/Eeprom/EepromBinary/ReadMe.txt | 5 + .../EepromBinary/Utilities/ScrapDramPolicyPpi.py | 95 ++ .../EepromDataLib/EEPROM/EepromDataEepromLib.c | 140 +- .../Eeprom/EepromDataLib/FV/EepromDataFvLib.c | 7 +- .../Features/Eeprom/EepromDataLib/FV/GetImage.c | 19 +- .../Common/Features/Eeprom/EepromLib/EepromLib.c | 476 ++++-- .../Common/Features/Eeprom/EepromLib/EepromLib.h | 32 +- .../Common/Features/Eeprom/EepromLib/EepromLib.inf | 3 + .../Features/Eeprom/EepromLib/EepromPeiLib.inf | 3 + .../Features/Eeprom/EepromLib/Null/EepromNullLib.c | 16 +- .../Eeprom/EepromLib/Pei/ValidateHashPei.c | 36 +- .../Features/Eeprom/EepromLib/ValidateHash.c | 44 +- .../{EepromAcpi.c =3D> EepromPlatformDxeLib.c} | 72 +- .../Eeprom/EepromPlatformLib/EepromPlatformLib.c | 318 ++-- .../Eeprom/EepromPlatformLib/EepromPlatformLib.inf | 7 +- .../EepromPlatformLib/EepromPlatformNullLib.c | 95 -- .../EepromPlatformLib/EepromPlatformNullLib.inf | 13 +- .../EepromPlatformLib/EepromPlatformPeiLib.inf | 3 +- .../EepromPlatformLib/{ =3D> Null}/EepromAcpiNull.c | 0 .../EepromPlatformLib/Null/EepromPlatformNullLib.c | 241 +++ .../EepromPlatformPeiLib.c} | 17 + .../Features/Eeprom/Include/Library/EepromLib.h | 68 +- .../Eeprom/Include/Library/EepromPlatformLib.h | 93 +- .../Common/Features/Eeprom/ReadMe.txt | 7 + .../PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf | 1 + .../PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c | 26 +- .../PlatformPostMemPei/PlatformInit.c | 15 +- .../PlatformPostMemPei/PlatformPostMemPei.inf | 1 + .../PlatformPreMemPei/PlatformInitPreMem.c | 14 +- .../Common/SaveMemoryConfigDxe/SaveMemoryConfig.c | 9 +- .../SaveMemoryConfigDxe/SaveMemoryConfigDxe.inf | 3 +- .../PlatformDsc/Components.IA32.dsc | 1 - .../BroxtonPlatformPkg/PlatformDsc/Defines.dsc | 23 +- .../PlatformDsc/LibraryClasses.IA32.PEI.dsc | 14 +- .../PlatformDsc/LibraryClasses.dsc | 18 +- .../PlatformDsc/PcdsFixedAtBuild.dsc | 2 +- Platform/BroxtonPlatformPkg/PlatformPkg.dec | 11 +- Platform/BroxtonPlatformPkg/PlatformPkg.fdf | 47 +- Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc | 1 + Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc | 1 + Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc | 341 ++-- .../Cpu/ResetVector/Vtf0/Ia32/InitNEM.asm | 31 +- 66 files changed, 2883 insertions(+), 1994 deletions(-) create mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/Logo/Tianocore.bmp create mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/Memory/DramPolicyPpi.bin create mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/Memory/GenerateDramPolicyBinary.py rename Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VBT/{Vbt= _bxt_t_TianmaMipi.bin =3D> VbtBxtMipi.bin} (66%) delete mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/VBT/Vbt_bxt_t_fab_b.bin delete mode 100644 Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/VBT/Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin create mode 100644 Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eepro= mBinary/Utilities/ScrapDramPolicyPpi.py rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib= /{EepromAcpi.c =3D> EepromPlatformDxeLib.c} (75%) delete mode 100644 Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eepro= mPlatformLib/EepromPlatformNullLib.c rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib= /{ =3D> Null}/EepromAcpiNull.c (100%) create mode 100644 Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eepro= mPlatformLib/Null/EepromPlatformNullLib.c rename Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib= /{EepromAcpiPei.c =3D> Pei/EepromPlatformPeiLib.c} (72%) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/= BoardInitPostMem/BoardInit.c index 6d5817ab9d..b3e65bf1ce 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem= /BoardInit.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem= /BoardInit.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include "BoardInit.h" @@ -56,6 +57,8 @@ MinnowBoard3ModulePostMemInitCallback ( VOID *Instance; UINT8 BoardId; UINT8 FabId; + UINT8 *HdaVerbTable; + UINT32 HdaVerbTableSize; UINT8 ResetType; UINTN BufferSize; UINTN VariableSize; @@ -132,6 +135,17 @@ MinnowBoard3ModulePostMemInitCallback ( PcdSetBool(PcdPciePort3Enable, SystemConfiguration.PcieRootPortEn[3]); // + // HDA audio verb table + // + HdaVerbTable =3D NULL; + HdaVerbTableSize =3D 0; + Status =3D EepromGetHdaCodec (NULL, &HdaVerbTable, &HdaVerbTableSize); + if (! EFI_ERROR (Status) && (HdaVerbTableSize > 0)) { + PcdSet64 (PcdHdaVerbTablePtr, (UINT64) (UINTN) HdaVerbTable); + PcdSet8 (HdaVerbTableEntryNum, 1); + } + + // // Add init steps here // // diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoar= d3Module/BoardInitPostMem/BoardInitPostMem.inf index d5b0604335..4d2b9df922 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem= /BoardInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPostMem= /BoardInitPostMem.inf @@ -40,6 +40,7 @@ EepromPlatformLib HeciMsgLib HobLib + I2cLib IoLib SteppingLib GpioLib @@ -67,6 +68,8 @@ gPlatformModuleTokenSpaceGuid.PcdTianoCoreLogoFileGuid gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed gPlatformModuleTokenSpaceGuid.PcdPciePort3Enable + gPlatformModuleTokenSpaceGuid.PcdHdaVerbTablePtr + gPlatformModuleTokenSpaceGuid.HdaVerbTableEntryNum [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PreMem/BoardInitMiscs.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/BoardInitPreMem/BoardInitMiscs.c index 6cd4bdf18f..14780914e7 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitMiscs.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitMiscs.c @@ -66,9 +66,28 @@ Mb3MUpdateFspmUpd ( SYSTEM_CONFIGURATION SystemConfiguration; UINTN VariableSize; EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariablePpi; - UINT32 VidDid; UINT32 HwconfStraps; UINT8 MemoryType; + UINT8 *MemoryData; + UINT32 MemoryDataSize; + UINT16 SpdSlotFlag; + + // + // Check for EEPROM memory data + // + MemoryData =3D NULL; + MemoryDataSize =3D 0; + SpdSlotFlag =3D 0; + Status =3D EepromGetMemoryData (NULL, &SpdSlotFlag, &MemoryData, &Memory= DataSize); + DEBUG ((DEBUG_INFO, "**** MB3 Module - EepromGetMemoryData() --> %r\n", = Status)); + if (EFI_ERROR (Status) || (MemoryDataSize < sizeof (DRAM_POLICY_PPI)) ||= (SpdSlotFlag !=3D 0x000F)) { + // + // Didn't find valid memory data. Clear the pointers. + // + MemoryData =3D NULL; + MemoryDataSize =3D 0; + SpdSlotFlag =3D 0; + } Status =3D (*PeiServices)->LocatePpi ( PeiServices, @@ -77,8 +96,64 @@ Mb3MUpdateFspmUpd ( NULL, (VOID **) &DramPolicy ); - if (EFI_ERROR (Status)) { + DramPolicy =3D NULL; + } else { + if (((VOID *) (UINT32) DramPolicy->MrcTrainingDataPtr !=3D 0) && + ((VOID *) (UINT32) DramPolicy->MrcBootDataPtr !=3D 0)) { + DEBUG ((DEBUG_INFO, "%a() - NvsBufferPtr\n", __FUNCTION__)); + MrcNvData =3D (MRC_PARAMS_SAVE_RESTORE *) AllocateZeroPool = (sizeof (MRC_PARAMS_SAVE_RESTORE)); + BootVariableNvData =3D (BOOT_VARIABLE_NV_DATA *) AllocateZeroPool (s= izeof (BOOT_VARIABLE_NV_DATA)); + + MrcParamsHob =3D (MRC_PARAMS_SAVE_RESTORE *) ((UINT32) Dram= Policy->MrcTrainingDataPtr); + BootVariableNvDataHob =3D (BOOT_VARIABLE_NV_DATA *) ((UINT32) DramPo= licy->MrcBootDataPtr); + + CopyMem (MrcNvData, MrcParamsHob, sizeof (MRC_PARA= MS_SAVE_RESTORE)); + CopyMem (BootVariableNvData, BootVariableNvDataHob, sizeof (BOOT_VAR= IABLE_NV_DATA)); + FspUpdRgn->FspmArchUpd.NvsBufferPtr =3D (VOID *) (UINT32) Mrc= NvData; + FspUpdRgn->FspmConfig.VariableNvsBufferPtr =3D (VOID *) (UINT32) Boo= tVariableNvData; + } + } + + // + // Overrides for MinnowBoard3Module from Platfrom4 profile + // + // Description | DualRank | RankEnable | DeviceWidth | DramDenisty = | SoC | Channel + // =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D= =3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D + // MT53B256M32D1 | 0x01 | 0x01 | 0x01 x16 | 0x02 8Gb = | E3930 | Ch0 + // MT53B512M32D2 | 0x01 | 0x03 | 0x01 x16 | 0x02 8Gb = | E3950 | Ch0&1 + // MT53B1024M32D4 | 0x01 | 0x03 | 0x00 x8 | 0x04 16Gb = | | + // + + // + // Get HWCONF straps + // + HwconfStraps =3D Minnow3ModuleGetHwconfStraps (); + DEBUG ((DEBUG_INFO, "**** MB3 Module - HWCONF straps =3D 0x%08X\n", Hwco= nfStraps)); + + // + // Translate into Memory Type + // + MemoryType =3D (UINT8) ((HwconfStraps & MB3M_HWCONF_MEMORY_MASK) >> MB3M= _HWCONF_MEMORY); + if (MemoryType =3D=3D 0) { + DEBUG ((DEBUG_INFO, "**** MB3 Module - SPD based memory init requested= , but converted into Memory Profile type #4!\n")); + MemoryType =3D 4; // LPDDR4 16Gbit 4 channels + } + if (MemoryType =3D=3D 5) { + if (MemoryData =3D=3D NULL) { + DEBUG ((DEBUG_INFO, "**** MB3 Module - EEPROM based memory init requ= ested, but converted into Memory Profile type #4!\n")); + MemoryType =3D 4; // LPDDR4 16Gbit 4 channels + } else { + DEBUG ((DEBUG_INFO, "**** MB3 Module - EEPROM based memory init requ= ested and being used.\n")); + DramPolicy =3D (DRAM_POLICY_PPI *) MemoryData; + } + } + MemoryType--; // Zero base it for use as index into array + + if (DramPolicy =3D=3D NULL) { + // + // Status is still valid from LocatePpi(gDramPolicyPpiGuid) + // DEBUG ((DEBUG_INFO, "%a() - LocatePpi(gDramPolicyPpiGuid) returned %r\= n", __FUNCTION__, Status)); } else { FspUpdRgn->FspmConfig.Package =3D DramPolicy= ->Package; @@ -107,23 +182,8 @@ Mb3MUpdateFspmUpd ( FspUpdRgn->FspmConfig.MinRefRate2xEnable =3D DramPolicy= ->MinRefRate2xEnabled; FspUpdRgn->FspmConfig.DualRankSupportEnable =3D DramPolicy= ->DualRankSupportEnabled; - CopyMem (&(FspUpdRgn->FspmConfig.Ch0_RankEnable), &DramPolicy->ChDrp, = sizeof(DramPolicy->ChDrp)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch0_RankEnable), &DramPolicy->ChDr= p, sizeof (DramPolicy->ChDrp)); CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), &DramPolicy->ChSw= izzle, sizeof (DramPolicy->ChSwizzle)); - - if (((VOID *)(UINT32)DramPolicy->MrcTrainingDataPtr !=3D 0) && - ((VOID *)(UINT32)DramPolicy->MrcBootDataPtr !=3D 0)) { - DEBUG ((DEBUG_INFO, "%a() - NvsBufferPtr\n", __FUNCTION__)); - MrcNvData =3D (MRC_PARAMS_SAVE_RESTORE *) AllocateZeroPool = (sizeof (MRC_PARAMS_SAVE_RESTORE)); - BootVariableNvData =3D (BOOT_VARIABLE_NV_DATA *) AllocateZeroPool (s= izeof (BOOT_VARIABLE_NV_DATA)); - - MrcParamsHob =3D (MRC_PARAMS_SAVE_RESTORE*)((UINT32)DramPol= icy->MrcTrainingDataPtr); - BootVariableNvDataHob =3D (BOOT_VARIABLE_NV_DATA*)((UINT32)DramPolic= y->MrcBootDataPtr); - - CopyMem(MrcNvData, MrcParamsHob, sizeof (MRC_PARAMS_SAVE_RESTORE)); - CopyMem(BootVariableNvData, BootVariableNvDataHob, sizeof (BOOT_VARI= ABLE_NV_DATA)); - FspUpdRgn->FspmArchUpd.NvsBufferPtr =3D (VOID *)(UINT32)MrcNv= Data; - FspUpdRgn->FspmConfig.VariableNvsBufferPtr =3D (VOID *)(UINT32)BootV= ariableNvData; - } } DEBUG ((DEBUG_INFO, "%a() - gEfiPlatformInfoGuid\n", __FUNCTION__)); @@ -131,109 +191,100 @@ Mb3MUpdateFspmUpd ( ASSERT (Hob.Raw !=3D NULL); PlatformInfo =3D GET_GUID_HOB_DATA (Hob.Raw); - // - // Get IGD VID/DID - // - VidDid =3D MmioRead32 (MmPciBase (SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FUN_0) = + R_SA_IGD_VID); - if (VidDid =3D=3D 0x5A848086) { + if (MemoryType !=3D 4) { // - // E3950 path + // Common items // - DEBUG ((DEBUG_INFO, "**** MB3 Module - E3950 detected!\n")); - } else if (VidDid =3D=3D 0x5A858086) { + FspUpdRgn->FspmConfig.Package =3D 0x01; + FspUpdRgn->FspmConfig.Profile =3D 0x09; // LPDDR4_1600= _14_15_15 + //FspUpdRgn->FspmConfig.Profile =3D 0x0B; // LPDDR4_24= 00_24_22_22 + FspUpdRgn->FspmConfig.MemoryDown =3D 0x01; + FspUpdRgn->FspmConfig.DualRankSupportEnable =3D 0x01; + // - // E3930 path + // Memory Type specific items // - DEBUG ((DEBUG_INFO, "**** MB3 Module - E3930 detected!\n")); - } - - // - // Overrides for MinnowBoard3Module from Platfrom4 profile - // - // Description | DualRank | RankEnable | DeviceWidth | DramDenisty = | SoC | Channel - // =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D= =3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D - // MT53B256M32D1 | 0x01 | 0x01 | 0x01 x16 | 0x02 8Gb = | E3930 | Ch0 - // MT53B512M32D2 | 0x01 | 0x03 | 0x01 x16 | 0x02 8Gb = | E3950 | Ch0&1 - // MT53B1024M32D4 | 0x01 | 0x03 | 0x00 x8 | 0x04 16Gb = | | - // - - // - // Get HWCONF straps - // - HwconfStraps =3D Minnow3ModuleGetHwconfStraps (); - DEBUG ((DEBUG_INFO, "**** MB3 Module - HWCONF straps =3D 0x%08X\n", Hwco= nfStraps)); - - // - // Translate into Memory Type - // - MemoryType =3D (UINT8) ((HwconfStraps & MB3M_HWCONF_MEMORY_MASK) >> MB3M= _HWCONF_MEMORY); - if (MemoryType =3D=3D 0) { - DEBUG ((DEBUG_INFO, "**** MB3 Module - SPD based memory init requested= , but converted into Memory Profile type #4!\n")); - MemoryType =3D 4; // LPDDR4 16Gbit 4 channels - } - if (MemoryType =3D=3D 5) { - DEBUG ((DEBUG_INFO, "**** MB3 Module - EEPROM based memory init reques= ted, but converted into Memory Profile type #4!\n")); - MemoryType =3D 4; // LPDDR4 16Gbit 4 channels - } - MemoryType--; // Zero base it for use as index into array - - // - // Common items - // - FspUpdRgn->FspmConfig.Package =3D 0x01; - FspUpdRgn->FspmConfig.Profile =3D 0x09; // LPDDR4_1600_1= 4_15_15 -// FspUpdRgn->FspmConfig.Profile =3D 0x0B; // LPDDR4_2400= _24_22_22 - FspUpdRgn->FspmConfig.MemoryDown =3D 0x01; - FspUpdRgn->FspmConfig.DualRankSupportEnable =3D 0x01; + if (MemoryType < (sizeof (gMB3MChannelInfo) / sizeof (gMB3MChannelInfo= [0]))) { + DEBUG ((DEBUG_INFO, "**** MB3 Module - %a detected!\n", gMB3MChannel= Info[MemoryType].DescString)); + + // DDR0CH0 + FspUpdRgn->FspmConfig.Ch0_RankEnable =3D gMB3MChannelInfo[Mem= oryType].RankEnable[0]; + FspUpdRgn->FspmConfig.Ch0_DeviceWidth =3D gMB3MChannelInfo[Mem= oryType].DeviceWidth[0]; + FspUpdRgn->FspmConfig.Ch0_DramDensity =3D gMB3MChannelInfo[Mem= oryType].DramDensity[0]; + FspUpdRgn->FspmConfig.Ch0_Option =3D gMB3MChannelInfo[Mem= oryType].Option[0]; + + // DDR0CH1 + FspUpdRgn->FspmConfig.Ch1_RankEnable =3D gMB3MChannelInfo[Mem= oryType].RankEnable[1]; + FspUpdRgn->FspmConfig.Ch1_DeviceWidth =3D gMB3MChannelInfo[Mem= oryType].DeviceWidth[1]; + FspUpdRgn->FspmConfig.Ch1_DramDensity =3D gMB3MChannelInfo[Mem= oryType].DramDensity[1]; + FspUpdRgn->FspmConfig.Ch1_Option =3D gMB3MChannelInfo[Mem= oryType].Option[1]; + + // DDR1CH0 + FspUpdRgn->FspmConfig.Ch2_RankEnable =3D gMB3MChannelInfo[Mem= oryType].RankEnable[2]; + FspUpdRgn->FspmConfig.Ch2_DeviceWidth =3D gMB3MChannelInfo[Mem= oryType].DeviceWidth[2]; + FspUpdRgn->FspmConfig.Ch2_DramDensity =3D gMB3MChannelInfo[Mem= oryType].DramDensity[2]; + FspUpdRgn->FspmConfig.Ch2_Option =3D gMB3MChannelInfo[Mem= oryType].Option[2]; + + // DDR1CH1 + FspUpdRgn->FspmConfig.Ch3_RankEnable =3D gMB3MChannelInfo[Mem= oryType].RankEnable[3]; + FspUpdRgn->FspmConfig.Ch3_DeviceWidth =3D gMB3MChannelInfo[Mem= oryType].DeviceWidth[3]; + FspUpdRgn->FspmConfig.Ch3_DramDensity =3D gMB3MChannelInfo[Mem= oryType].DramDensity[3]; + FspUpdRgn->FspmConfig.Ch3_Option =3D gMB3MChannelInfo[Mem= oryType].Option[3]; + } else { + DEBUG ((DEBUG_INFO, "**** MB3 Module - Memory Type 0x%02X is out of = range!\n", MemoryType)); + } - // - // Memory Type specific items - // - if (MemoryType < (sizeof (gMB3MChannelInfo) / sizeof (gMB3MChannelInfo[0= ]))) { - DEBUG ((DEBUG_INFO, "**** MB3 Module - %a detected!\n", gMB3MChannelIn= fo[MemoryType].DescString)); - - // DDR0CH0 - FspUpdRgn->FspmConfig.Ch0_RankEnable =3D gMB3MChannelInfo[Memor= yType].RankEnable[0]; - FspUpdRgn->FspmConfig.Ch0_DeviceWidth =3D gMB3MChannelInfo[Memor= yType].DeviceWidth[0]; - FspUpdRgn->FspmConfig.Ch0_DramDensity =3D gMB3MChannelInfo[Memor= yType].DramDensity[0]; - FspUpdRgn->FspmConfig.Ch0_Option =3D gMB3MChannelInfo[Memor= yType].Option[0]; - - // DDR0CH1 - FspUpdRgn->FspmConfig.Ch1_RankEnable =3D gMB3MChannelInfo[Memor= yType].RankEnable[1]; - FspUpdRgn->FspmConfig.Ch1_DeviceWidth =3D gMB3MChannelInfo[Memor= yType].DeviceWidth[1]; - FspUpdRgn->FspmConfig.Ch1_DramDensity =3D gMB3MChannelInfo[Memor= yType].DramDensity[1]; - FspUpdRgn->FspmConfig.Ch1_Option =3D gMB3MChannelInfo[Memor= yType].Option[1]; - - // DDR1CH0 - FspUpdRgn->FspmConfig.Ch2_RankEnable =3D gMB3MChannelInfo[Memor= yType].RankEnable[2]; - FspUpdRgn->FspmConfig.Ch2_DeviceWidth =3D gMB3MChannelInfo[Memor= yType].DeviceWidth[2]; - FspUpdRgn->FspmConfig.Ch2_DramDensity =3D gMB3MChannelInfo[Memor= yType].DramDensity[2]; - FspUpdRgn->FspmConfig.Ch2_Option =3D gMB3MChannelInfo[Memor= yType].Option[2]; - - // DDR1CH1 - FspUpdRgn->FspmConfig.Ch3_RankEnable =3D gMB3MChannelInfo[Memor= yType].RankEnable[3]; - FspUpdRgn->FspmConfig.Ch3_DeviceWidth =3D gMB3MChannelInfo[Memor= yType].DeviceWidth[3]; - FspUpdRgn->FspmConfig.Ch3_DramDensity =3D gMB3MChannelInfo[Memor= yType].DramDensity[3]; - FspUpdRgn->FspmConfig.Ch3_Option =3D gMB3MChannelInfo[Memor= yType].Option[3]; - } else { - DEBUG ((DEBUG_INFO, "**** MB3 Module - Memory Type 0x%02X is out of ra= nge!\n", MemoryType)); + // + // Swizzling + // + if ((PcdGet8 (PcdFabId) =3D=3D FAB_ID_A) && (ChSwizzle_MB3Ma !=3D NULL= )) { + CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), ChSwizzle_MB3Ma= [0], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch1_Bit_swizzling), ChSwizzle_MB3Ma= [1], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch2_Bit_swizzling), ChSwizzle_MB3Ma= [2], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch3_Bit_swizzling), ChSwizzle_MB3Ma= [3], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + } + if ((PcdGet8 (PcdFabId) =3D=3D FAB_ID_C) && (ChSwizzle_MB3Mc !=3D NULL= )) { + CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), ChSwizzle_MB3Mc= [0], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch1_Bit_swizzling), ChSwizzle_MB3Mc= [1], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch2_Bit_swizzling), ChSwizzle_MB3Mc= [2], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + CopyMem (&(FspUpdRgn->FspmConfig.Ch3_Bit_swizzling), ChSwizzle_MB3Mc= [3], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); + } } // - // Swizzling + // Update DramPolicy and then dump it so it can be copied into the EEPRO= M image // - if ((PcdGet8 (PcdFabId) =3D=3D FAB_ID_A) && (ChSwizzle_MB3Ma !=3D NULL))= { - CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), ChSwizzle_MB3Ma[0= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch1_Bit_swizzling), ChSwizzle_MB3Ma[1= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch2_Bit_swizzling), ChSwizzle_MB3Ma[2= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch3_Bit_swizzling), ChSwizzle_MB3Ma[3= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - } - if ((PcdGet8 (PcdFabId) =3D=3D FAB_ID_C) && (ChSwizzle_MB3Mc !=3D NULL))= { - CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), ChSwizzle_MB3Mc[0= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch1_Bit_swizzling), ChSwizzle_MB3Mc[1= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch2_Bit_swizzling), ChSwizzle_MB3Mc[2= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - CopyMem (&(FspUpdRgn->FspmConfig.Ch3_Bit_swizzling), ChSwizzle_MB3Mc[3= ], DRAM_POLICY_NUMBER_BITS * sizeof (UINT8)); - } + DramPolicy->Package =3D FspUpdRgn->FspmConfig.P= ackage; + DramPolicy->Profile =3D FspUpdRgn->FspmConfig.P= rofile; + DramPolicy->MemoryDown =3D FspUpdRgn->FspmConfig.M= emoryDown; + DramPolicy->DDR3LPageSize =3D FspUpdRgn->FspmConfig.D= DR3LPageSize; + DramPolicy->DDR3LASR =3D FspUpdRgn->FspmConfig.D= DR3LASR; + DramPolicy->SystemMemorySizeLimit =3D FspUpdRgn->FspmConfig.M= emorySizeLimit; + DramPolicy->SpdAddress[0] =3D FspUpdRgn->FspmConfig.D= IMM0SPDAddress; + DramPolicy->SpdAddress[1] =3D FspUpdRgn->FspmConfig.D= IMM1SPDAddress; + DramPolicy->DDR3LPageSize =3D FspUpdRgn->FspmConfig.D= DR3LPageSize; + DramPolicy->DDR3LASR =3D FspUpdRgn->FspmConfig.D= DR3LASR; + DramPolicy->HighMemMaxVal =3D FspUpdRgn->FspmConfig.H= ighMemoryMaxValue; + DramPolicy->LowMemMaxVal =3D FspUpdRgn->FspmConfig.L= owMemoryMaxValue; + DramPolicy->DisableFastBoot =3D FspUpdRgn->FspmConfig.D= isableFastBoot; + DramPolicy->RmtMode =3D FspUpdRgn->FspmConfig.R= mtMode; + DramPolicy->RmtCheckRun =3D FspUpdRgn->FspmConfig.R= mtCheckRun; + DramPolicy->RmtMarginCheckScaleHighThreshold =3D FspUpdRgn->FspmConfig.R= mtMarginCheckScaleHighThreshold; + DramPolicy->MsgLevelMask =3D FspUpdRgn->FspmConfig.M= sgLevelMask; + DramPolicy->ChannelHashMask =3D FspUpdRgn->FspmConfig.C= hannelHashMask; + DramPolicy->SliceHashMask =3D FspUpdRgn->FspmConfig.S= liceHashMask; + DramPolicy->ChannelsSlicesEnabled =3D FspUpdRgn->FspmConfig.C= hannelsSlicesEnable; + DramPolicy->ScramblerSupport =3D FspUpdRgn->FspmConfig.S= cramblerSupport; + DramPolicy->InterleavedMode =3D FspUpdRgn->FspmConfig.I= nterleavedMode; + DramPolicy->MinRefRate2xEnabled =3D FspUpdRgn->FspmConfig.M= inRefRate2xEnable; + DramPolicy->DualRankSupportEnabled =3D FspUpdRgn->FspmConfig.D= ualRankSupportEnable; + CopyMem (&DramPolicy->ChDrp, &(FspUpdRgn->FspmConfig.Ch0_RankEnable)= , sizeof (DramPolicy->ChDrp)); + CopyMem (&DramPolicy->ChSwizzle, &(FspUpdRgn->FspmConfig.Ch0_Bit_swizzli= ng), sizeof (DramPolicy->ChSwizzle)); + // Print header marker + DEBUG ((DEBUG_INFO, "\n\nDRAM_POLICY_PPI dump for EEPROM programming [0x= %08x]:\n", sizeof (DRAM_POLICY_PPI))); + EepromDumpParagraph (DEBUG_INFO, DramPolicy, sizeof (DRAM_POLICY_PPI)); + // Print footer marker + DEBUG ((DEBUG_INFO, "\n\n")); // // Disable NPK based on DciEn @@ -330,8 +381,6 @@ Mb3MDramCreatePolicyDefaults ( DramPolicy->DualRankSupportEnabled =3D SystemConfiguration.DualRankSu= pportEnabled; } - DramConfig =3D &(DramConfigData->PlatformDram4); - DEBUG ((EFI_D_INFO, "Using smip platform override: %d\n", DramConfigData= ->Platform_override)); switch (DramConfigData->Platform_override) { case 0: @@ -354,6 +403,7 @@ Mb3MDramCreatePolicyDefaults ( // Do nothing if the override value does not exist. 0xFF is the // default Platform_override value when no override is selected // + DramConfig =3D &(DramConfigData->PlatformDram4); break; } diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PreMem/BoardInitMiscs.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Mod= ule/BoardInitPreMem/BoardInitMiscs.h index 011e4a3e15..97736ec40c 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitMiscs.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitMiscs.h @@ -20,10 +20,8 @@ #include "PlatformId.h" #include #include -#include #include -#include -#include +#include #include "MmrcData.h" diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PreMem/BoardInitPreMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3= Module/BoardInitPreMem/BoardInitPreMem.inf index 73eb7e0e9e..c9924e1059 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitPreMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= BoardInitPreMem.inf @@ -28,11 +28,10 @@ BoardInitMiscs.c [LibraryClasses] - PeiServicesLib + EepromPlatformLib PcdLib PchSerialIoUartLib - MmPciLib - IoLib + PeiServicesLib [Packages] MdePkg/MdePkg.dec diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInit= PreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/= BoardInitPreMem/PlatformId.c index 558627cdbf..ea88ce23f9 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= PlatformId.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/= PlatformId.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "PlatformId.h" PAD_ID_INFO gMB3MRawBoardIdPadInfo[] =3D { @@ -260,6 +261,9 @@ Minnow3ModuleGetEmbeddedBoardIdFabId ( OUT UINT8 *FabId ) { + BOARD_INFO_TABLE *BoardInfo; + EFI_STATUS Status; + DEBUG ((DEBUG_INFO, "%a(#%3d) - Starting...\n", __FUNCTION__, __LINE__))= ; *BoardId =3D Minnow3ModuleGetCommonBoardId (); @@ -271,6 +275,9 @@ Minnow3ModuleGetEmbeddedBoardIdFabId ( *FabId =3D UNKNOWN_FAB; } + Status =3D EepromGetBoardInfo (NULL, &BoardInfo); + DEBUG ((DEBUG_INFO, "%a(#%3d) - EepromGetBoardInfo() -> %r\n", __FUNCTIO= N__, __LINE__, Status)); + return EFI_SUCCESS; } diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Ee= promStruct.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/= EepromStruct.h index 316f5b2261..a826681aec 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/EepromStr= uct.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/EepromStr= uct.h @@ -166,4 +166,3 @@ typedef struct { #pragma pack() #endif - diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Ge= nerateBinary.py b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eepr= om/GenerateBinary.py index 92b0cc9a3a..e1a29e1374 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/GenerateB= inary.py +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/GenerateB= inary.py @@ -18,7 +18,7 @@ import subprocess import sys # Version defines -__version__ =3D '0.1.0.2' +__version__ =3D '0.1.0.3' VerString =3D 'EEPROM binary generation tool, Version #{0}'.format(__ve= rsion__) PythonVersion =3D 'Python version =3D {0:X}'.format(sys.hexversion) @@ -28,26 +28,27 @@ def Main(): try: # Get paths - ThisUtilityPath =3D os.path.dirname(os.path.abspath(sys.argv[0])) - ParentUtilityPath =3D os.path.dirname(ThisUtilityPath) - UtilityPath =3D ParentUtilityPath + '\\Utilities' - ProjectName =3D 'MB3' + ThisUtilityPath =3D os.path.dirname(os.path.abspath(sys.argv[0])) + TempPath =3D ThisUtilityPath + while os.path.basename(TempPath) !=3D 'BroxtonPlatformPkg': + TempPath =3D os.path.dirname(TempPath) + UtilityPath =3D TempPath + '\\Common\\Features\\Eeprom\\Ee= promBinary\\Utilities' + OpenSslPath =3D UtilityPath + '\\OpenSsl\\openssl.exe' + EepromBinaryUtility =3D UtilityPath + '\\eeprom.py' + EepromHashUtility =3D UtilityPath + '\\HashBinary.py' # MinnowBoard 3 specific defines - EepromBinaryUtility =3D UtilityPath + '\\eeprom.py' - EepromHashUtility =3D UtilityPath + '\\HashBinary.py' + ProjectName =3D 'MB3' EepromDefinitionFile =3D ThisUtilityPath + '\\' + ProjectName + '-Defs= .cfg' EepromProjectFile =3D ThisUtilityPath + '\\' + ProjectName + '-Prj.= cfg' EepromBinaryFile =3D ThisUtilityPath + '\\' + ProjectName + '-Eepr= om.bin' EepromHeaderFile =3D ThisUtilityPath + '\\EepromStruct.h' EepromPrivatePemFile =3D ThisUtilityPath + '\\RSA-keys\\' + ProjectNam= e + '-private.pem' - OpenSslPath =3D UtilityPath + '\\OpenSsl\\openssl.exe' # Debug prints if False: print('sys.argv[0] =3D {0}'.format(sys.argv[0])) print('ThisUtilityPath =3D {0}'.format(ThisUtilityPath)) - print('ParentUtilityPath =3D {0}'.format(ParentUtilityPath)) print('UtilityPath =3D {0}'.format(UtilityPath)) print('EepromBinaryFile =3D {0}'.format(EepromBinaryFile)) print('EepromBinaryUtility =3D {0}'.format(EepromBinaryUtility)) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Lo= go/Tianocore.bmp b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eep= rom/Logo/Tianocore.bmp new file mode 100644 index 0000000000000000000000000000000000000000..dcf1c0be035f50b909a5efd0f77= b10d03449305f GIT binary patch literal 11958 # Removed to conserve space literal 0 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/MB= 3-Eeprom.bin b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/= MB3-Eeprom.bin index 752b62d19be3e5dce7cd5aae13083b024d44e09d..df817430dc2029e1e381cafa915= 607e384888912 100644 GIT binary patch literal 26880 # Removed to conserve space literal 32688 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/MB= 3-Prj.cfg b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/MB3= -Prj.cfg index 4712e2e903..af3b53e7c5 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/MB3-Prj.c= fg +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/MB3-Prj.c= fg @@ -32,17 +32,28 @@ OutputFileName =3D MB3-Eeprom.bin ; Struct_n =3D Section ; [Structures] +; +; The following three structures MUST be in this order!!! +; Struct_01 =3D Header ; $Eeprom$ structure Struct_02 =3D M24M02EepromMap ; $EeprMap structure Struct_03 =3D MyBoardInfo ; $BrdInfo structure -Struct_04 =3D GpioData ; $GpioDat structure -Struct_05 =3D DsdtInfo ; $AcpiTbl structure -Struct_06 =3D VideoInfo ; $Video$ structure -Struct_07 =3D LogoInfo ; $Logo$ structure +; +; These structures can be in any order. +; +Struct_10 =3D GpioData ; $GpioDat structure +Struct_11 =3D LogoInfo ; $Logo$ structure +;Struct_12 =3D SsdtInfo ; $AcpiTbl structure +Struct_13 =3D VideoInfo ; $Video$ structure +; +; Optional structures +; +;Struct_20 =3D HdaInfo ; $HdCodec structure +;Struct_21 =3D MemoryInfo ; $MemCnfg structure ; ; The SignatureInfo structure needs to be the last structure. ; -Struct_99 =3D SignatureInfo +Struct_99 =3D SignatureInfo ; $PromSig structure ; ; Platform Specific Structures: @@ -109,33 +120,35 @@ StructureType =3D EepromMapRecord Offset =3D 0x00030000 Address =3D 0x57 ; 7-bit address -[DsdtInfo] -StructureType =3D AcpiTable -AcpiTbl =3D from_asl (../Utilities/IASL,EepromAsl/EepromSsdt0.asl) -; -; Relative or absolute path to the ASL compiler is the first parameter -; Relative or absolute path to the ASL file to compile and include -; - -; You need to also uncomment Struct_06 =3D VideoInfo above -[VideoInfo] -StructureType =3D VideoData -VideoData =3D from_file (VBT/Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin) -; -; 1 | HDMI & Tianma | Vbt_bxt_t_TianmaMipi.bin -; 2 | HDMI only | Vbt_bxt_t_fab_b.bin -; 3 | HDMI & Truly | Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin -; +;[HdaInfo] +;StructureType =3D HdaCodec +;LogoData =3D from_file (HDA/HdaVerbTable.bin) -; You need to also uncomment Struct_07 =3D LogoInfo above [LogoInfo] StructureType =3D LogoData -LogoData =3D from_file (Logo/Intel.bmp) +LogoData =3D from_file (Logo/Tianocore.bmp) ; ; BMP file is the only supported format. ; Recommend that the BMP file be less than 64KB in size. ; Use blank.bmp to remove the logo completely. +;[MemoryInfo] +;StructureType =3D MemoryData +;SpdSlot =3D 0x000F +;SpdData =3D from_file (Memory/DramPolicyPpi.bin) + +;[SsdtInfo] +;StructureType =3D AcpiTable +;AcpiTbl =3D from_asl (../../../Common/Features/Eeprom/EepromBinar= y/Utilities/IASL,EepromAsl/EepromSsdt0.asl) +;; +;; Relative or absolute path to the ASL compiler is the first parameter +;; Relative or absolute path to the ASL file to compile and include +;; + +[VideoInfo] +StructureType =3D VideoData +VideoData =3D from_file (VBT/VbtBxtMipi.bin) + ; You need to also uncomment Struct_99 =3D SignatureInfo above [SignatureInfo] StructureType =3D SignatureData @@ -159,1802 +172,1604 @@ StructureType =3D GpioDataHeader GpioData =3D from_struct_list (GpioDataList) [GpioData001] -; SMB_ALERT_1V8 <--> SW_SMB_ALERTB StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P1 PAD0$" -Offset =3D 0x00C005F8 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_2$" +Offset =3D 0x00C50510 +AndData =3D 0x0801E0FE +OrData =3D 0x04000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData002] -; SMB_ALERT_1V8 <--> SW_SMB_ALERTB StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P1 PAD1$" -Offset =3D 0x00C005FC -AndData =3D 0x00000000 -OrData =3D 0x0003F000 +GpioLabel =3D "N_GPIO_2$" +Offset =3D 0x00C50514 +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData003] -; SPI0_CS1 <--> NW_GPIO_98 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P31 PAD0$" -Offset =3D 0x00C406B0 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_3$" +Offset =3D 0x00C50518 +AndData =3D 0x0801E0FE +OrData =3D 0x04000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData004] -; SPI0_CS1 <--> NW_GPIO_98 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P31 PAD1$" -Offset =3D 0x00C406B4 -AndData =3D 0x00000000 -OrData =3D 0x0003FC4A +GpioLabel =3D "N_GPIO_3$" +Offset =3D 0x00C5051C +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData005] -; SDIO_WP <--> SW_GPIO_186 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P33 PAD0$" -Offset =3D 0x00C005E0 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_4$" +Offset =3D 0x00C50520 +AndData =3D 0x0801E0FE +OrData =3D 0x04000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData006] -; SDIO_WP <--> SW_GPIO_186 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P33 PAD1$" -Offset =3D 0x00C005E4 -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "N_GPIO_4$" +Offset =3D 0x00C50524 +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData007] -; SDIO_CMD <--> SW_GPIO_171 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P34 PAD0$" -Offset =3D 0x00C00598 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_6$" +Offset =3D 0x00C50530 +AndData =3D 0x0801E0FE +OrData =3D 0x46080100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData008] -; SDIO_CMD <--> SW_GPIO_171 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P34 PAD1$" -Offset =3D 0x00C0059C -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_6$" +Offset =3D 0x00C50534 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData009] -; SDIO_CMD <--> SW_GPIO_178 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P34 PAD0$" -Offset =3D 0x00C005D0 -AndData =3D 0x00000000 -OrData =3D 0x42000102 +GpioLabel =3D "N_GPIO_7$" +Offset =3D 0x00C50538 +AndData =3D 0x0801E0FE +OrData =3D 0x42880100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData010] -; SDIO_CMD <--> SW_GPIO_178 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P34 PAD1$" -Offset =3D 0x00C005D4 -AndData =3D 0x00000000 -OrData =3D 0x00027000 +GpioLabel =3D "N_GPIO_7$" +Offset =3D 0x00C5053C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData011] -; SDIO_CD <--> SW_GPIO_177 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P35 PAD0$" -Offset =3D 0x00C005C8 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_13$" +Offset =3D 0x00C50568 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData012] -; SDIO_CD <--> SW_GPIO_177 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P35 PAD1$" -Offset =3D 0x00C005CC -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_13$" +Offset =3D 0x00C5056C +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData013] -; SDIO_CK <--> SW_GPIO_166 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P36 PAD0$" -Offset =3D 0x00C00570 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_14$" +Offset =3D 0x00C50570 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData014] -; SDIO_CK <--> SW_GPIO_166 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P36 PAD1$" -Offset =3D 0x00C00574 -AndData =3D 0x00000000 -OrData =3D 0x00005000 +GpioLabel =3D "N_GPIO_14$" +Offset =3D 0x00C50574 +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData015] -; SDIO_CK <--> SW_GPIO_172 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P36 PAD0$" -Offset =3D 0x00C005A0 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_21$" +Offset =3D 0x00C505A8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData016] -; SDIO_CK <--> SW_GPIO_172 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P36 PAD1$" -Offset =3D 0x00C005A4 -AndData =3D 0x00000000 -OrData =3D 0x00021100 +GpioLabel =3D "N_GPIO_21$" +Offset =3D 0x00C505AC +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData017] -; SDIO_PWR_EN <--> SW_GPIO_183 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P37 PAD0$" -Offset =3D 0x00C005F0 -AndData =3D 0x00000000 -OrData =3D 0x44000201 +GpioLabel =3D "N_GPIO_22$" +Offset =3D 0x00C505B0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData018] -; SDIO_PWR_EN <--> SW_GPIO_183 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P37 PAD1$" -Offset =3D 0x00C005F4 -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "N_GPIO_22$" +Offset =3D 0x00C505B4 +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData019] -; SDIO_D0 <--> SW_GPIO_167 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P39 PAD0$" -Offset =3D 0x00C00578 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_23$" +Offset =3D 0x00C505B8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData020] -; SDIO_D0 <--> SW_GPIO_167 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P39 PAD1$" -Offset =3D 0x00C0057C -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_23$" +Offset =3D 0x00C505BC +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData021] -; SDIO_D0 <--> SW_GPIO_173 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P39 PAD0$" -Offset =3D 0x00C005A8 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_24$" +Offset =3D 0x00C505C0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData022] -; SDIO_D0 <--> SW_GPIO_173 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P39 PAD1$" -Offset =3D 0x00C005AC -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "N_GPIO_24$" +Offset =3D 0x00C505C4 +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData023] -; SDIO_D1 <--> SW_GPIO_168 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P40 PAD0$" -Offset =3D 0x00C00580 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_25$" +Offset =3D 0x00C505C8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData024] -; SDIO_D1 <--> SW_GPIO_168 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P40 PAD1$" -Offset =3D 0x00C00584 -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_25$" +Offset =3D 0x00C505CC +AndData =3D 0x000000FF +OrData =3D 0x0001F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData025] -; SDIO_D1 <--> SW_GPIO_174 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P40 PAD0$" -Offset =3D 0x00C005B0 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_26$" +Offset =3D 0x00C505D0 +AndData =3D 0x0801E0FE +OrData =3D 0x44001400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData026] -; SDIO_D1 <--> SW_GPIO_174 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P40 PAD1$" -Offset =3D 0x00C005B4 -AndData =3D 0x00000000 -OrData =3D 0x00023100 +GpioLabel =3D "N_GPIO_26$" +Offset =3D 0x00C505D4 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData027] -; SDIO_D2 <--> SW_GPIO_169 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P41 PAD0$" -Offset =3D 0x00C00588 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_38$" +Offset =3D 0x00C50630 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData028] -; SDIO_D2 <--> SW_GPIO_169 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P41 PAD1$" -Offset =3D 0x00C0058C -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_38$" +Offset =3D 0x00C50634 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData029] -; SDIO_D2 <--> SW_GPIO_175 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P41 PAD0$" -Offset =3D 0x00C005B8 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_39$" +Offset =3D 0x00C50638 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData030] -; SDIO_D2 <--> SW_GPIO_175 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P41 PAD1$" -Offset =3D 0x00C005BC -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_39$" +Offset =3D 0x00C5063C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData031] -; SDIO_D3 <--> SW_GPIO_170 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P42 PAD0$" -Offset =3D 0x00C00590 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_40$" +Offset =3D 0x00C50640 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData032] -; SDIO_D3 <--> SW_GPIO_170 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P42 PAD1$" -Offset =3D 0x00C00594 -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_40$" +Offset =3D 0x00C50644 +AndData =3D 0x000000FF +OrData =3D 0x00003100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData033] -; SDIO_D3 <--> SW_GPIO_176 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P42 PAD0$" -Offset =3D 0x00C005C0 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_41$" +Offset =3D 0x00C50648 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData034] -; SDIO_D3 <--> SW_GPIO_176 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P42 PAD1$" -Offset =3D 0x00C005C4 -AndData =3D 0x00000000 -OrData =3D 0x00023000 +GpioLabel =3D "N_GPIO_41$" +Offset =3D 0x00C5064C +AndData =3D 0x000000FF +OrData =3D 0x00023100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData035] -; SPI0_CS0 <--> NW_GPIO_97 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P43 PAD0$" -Offset =3D 0x00C406A8 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_42$" +Offset =3D 0x00C50650 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData036] -; SPI0_CS0 <--> NW_GPIO_97 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P43 PAD1$" -Offset =3D 0x00C406AC -AndData =3D 0x00000000 -OrData =3D 0x0003FC49 +GpioLabel =3D "N_GPIO_42$" +Offset =3D 0x00C50654 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData037] -; SPI0_CK <--> NW_GPIO_103 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P44 PAD0$" -Offset =3D 0x00C406D8 -AndData =3D 0x00000000 +GpioLabel =3D "N_GPIO_43$" +Offset =3D 0x00C50658 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData038] -; SPI0_CK <--> NW_GPIO_103 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P44 PAD1$" -Offset =3D 0x00C406DC -AndData =3D 0x00000000 -OrData =3D 0x0003FC4F +GpioLabel =3D "N_GPIO_43$" +Offset =3D 0x00C5065C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData039] -; SPI0_DIN <--> NW_GPIO_100 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P45 PAD0$" -Offset =3D 0x00C406C0 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_46$" +Offset =3D 0x00C50670 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData040] -; SPI0_DIN <--> NW_GPIO_100 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P45 PAD1$" -Offset =3D 0x00C406C4 -AndData =3D 0x00000000 -OrData =3D 0x0003FC4C +GpioLabel =3D "N_GPIO_46$" +Offset =3D 0x00C50674 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData041] -; SPI0_DO <--> NW_GPIO_99 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P46 PAD0$" -Offset =3D 0x00C406B8 -AndData =3D 0x00000000 +GpioLabel =3D "N_GPIO_47$" +Offset =3D 0x00C50678 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData042] -; SPI0_DO <--> NW_GPIO_99 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P46 PAD1$" -Offset =3D 0x00C406BC -AndData =3D 0x00000000 -OrData =3D 0x0003FC4B +GpioLabel =3D "N_GPIO_47$" +Offset =3D 0x00C5067C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData043] -; ESPI_CS0 <--> NW_GPIO_105 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P54 PAD0$" -Offset =3D 0x00C406F0 -AndData =3D 0x00000000 +GpioLabel =3D "N_GPIO_48$" +Offset =3D 0x00C50680 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData044] -; ESPI_CS0 <--> NW_GPIO_105 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P54 PAD1$" -Offset =3D 0x00C406F4 -AndData =3D 0x00000000 -OrData =3D 0x00001051 +GpioLabel =3D "N_GPIO_48$" +Offset =3D 0x00C50684 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData045] -; ESPI_CS1 <--> NW_GPIO_106 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P55 PAD0$" -Offset =3D 0x00C406F8 -AndData =3D 0x00000000 +GpioLabel =3D "N_GPIO_49$" +Offset =3D 0x00C50688 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData046] -; ESPI_CS1 <--> NW_GPIO_106 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P55 PAD1$" -Offset =3D 0x00C406FC -AndData =3D 0x00000000 -OrData =3D 0x00001052 +GpioLabel =3D "N_GPIO_49$" +Offset =3D 0x00C5068C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData047] -; ESPI_CK <--> NW_GPIO_104 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P56 PAD0$" -Offset =3D 0x00C406E8 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_64$" +Offset =3D 0x00C506A0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData048] -; ESPI_CK <--> NW_GPIO_104 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P56 PAD1$" -Offset =3D 0x00C406EC -AndData =3D 0x00000000 -OrData =3D 0x00001050 +GpioLabel =3D "N_GPIO_64$" +Offset =3D 0x00C506A4 +AndData =3D 0x000000FF +OrData =3D 0x0001D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData049] -; ESPI_IO_0 <--> NW_GPIO_109 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P57 PAD0$" -Offset =3D 0x00C40700 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_65$" +Offset =3D 0x00C506A8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData050] -; ESPI_IO_0 <--> NW_GPIO_109 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P57 PAD1$" -Offset =3D 0x00C40704 -AndData =3D 0x00000000 -OrData =3D 0x0001D054 +GpioLabel =3D "N_GPIO_65$" +Offset =3D 0x00C506AC +AndData =3D 0x000000FF +OrData =3D 0x0001D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData051] -; ESPI_IO_1 <--> NW_GPIO_110 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P58 PAD0$" -Offset =3D 0x00C40708 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "N_GPIO_66$" +Offset =3D 0x00C506B0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData052] -; ESPI_IO_1 <--> NW_GPIO_110 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P58 PAD1$" -Offset =3D 0x00C4070C -AndData =3D 0x00000000 -OrData =3D 0x00001055 +GpioLabel =3D "N_GPIO_66$" +Offset =3D 0x00C506B4 +AndData =3D 0x000000FF +OrData =3D 0x0001D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData053] -; USB0_EN_OC <--> NW_GPIO_203 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P62 PAD0$" -Offset =3D 0x00C40580 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "N_GPIO_67$" +Offset =3D 0x00C506B8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData054] -; USB0_EN_OC <--> NW_GPIO_203 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P62 PAD1$" -Offset =3D 0x00C40584 -AndData =3D 0x00000000 -OrData =3D 0x0003F000 +GpioLabel =3D "N_GPIO_67$" +Offset =3D 0x00C506BC +AndData =3D 0x000000FF +OrData =3D 0x0001D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData055] -; USB1_EN_OC <--> NW_GPIO_204 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P67 PAD0$" -Offset =3D 0x00C40588 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "NW_GPIO_193$" +Offset =3D 0x00C40530 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData056] -; USB1_EN_OC <--> NW_GPIO_204 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P67 PAD1$" -Offset =3D 0x00C4058C -AndData =3D 0x00000000 -OrData =3D 0x0003F000 +GpioLabel =3D "NW_GPIO_193$" +Offset =3D 0x00C40534 +AndData =3D 0x000000FF +OrData =3D 0x00005000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData057] -; PCIE_A_RST <--> W_PMU_PLTRST_B StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P75 PAD0$" -Offset =3D 0x00C70628 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "NW_GPIO_196$" +Offset =3D 0x00C40548 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData058] -; PCIE_A_RST <--> W_PMU_PLTRST_B StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P75 PAD1$" -Offset =3D 0x00C7062C -AndData =3D 0x00000000 -OrData =3D 0x0003C000 +GpioLabel =3D "NW_GPIO_196$" +Offset =3D 0x00C4054C +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData059] -; HDMI_HPD/DP1_HPD <--> NW_GPIO_199 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P104 PAD0$" -Offset =3D 0x00C40560 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "NW_GPIO_197$" +Offset =3D 0x00C40550 +AndData =3D 0x0801E0FE +OrData =3D 0x44000200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData060] -; HDMI_HPD/DP1_HPD <--> NW_GPIO_199 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P104 PAD1$" -Offset =3D 0x00C40564 -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "NW_GPIO_197$" +Offset =3D 0x00C40554 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData061] -; GPIO0/CAM0_PWR <--> N_GPIO_66 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P108 PAD0$" -Offset =3D 0x00C506B0 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "NW_GPIO_198$" +Offset =3D 0x00C40558 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData062] -; GPIO0/CAM0_PWR <--> N_GPIO_66 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P108 PAD1$" -Offset =3D 0x00C506B4 -AndData =3D 0x00000000 -OrData =3D 0x0001D05F +GpioLabel =3D "NW_GPIO_198$" +Offset =3D 0x00C4055C +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData063] -; GPIO1/CAM1_PWR <--> N_GPIO_67 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P109 PAD0$" -Offset =3D 0x00C506B8 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "NW_GPIO_199$" +Offset =3D 0x00C40560 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData064] -; GPIO1/CAM1_PWR <--> N_GPIO_67 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P109 PAD1$" -Offset =3D 0x00C506BC -AndData =3D 0x00000000 -OrData =3D 0x0001D060 +GpioLabel =3D "NW_GPIO_199$" +Offset =3D 0x00C40564 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData065] -; GPIO2/CAM0_RST <--> N_GPIO_64 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P110 PAD0$" -Offset =3D 0x00C506A0 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "NW_GPIO_200$" +Offset =3D 0x00C40568 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData066] -; GPIO2/CAM0_RST <--> N_GPIO_64 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P110 PAD1$" -Offset =3D 0x00C506A4 -AndData =3D 0x00000000 -OrData =3D 0x0001D05D +GpioLabel =3D "NW_GPIO_200$" +Offset =3D 0x00C4056C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData067] -; GPIO3/CAM1_RST <--> N_GPIO_65 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P111 PAD0$" -Offset =3D 0x00C506A8 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "NW_GPIO_203$" +Offset =3D 0x00C40580 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData068] -; GPIO3/CAM1_RST <--> N_GPIO_65 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P111 PAD1$" -Offset =3D 0x00C506AC -AndData =3D 0x00000000 -OrData =3D 0x0001D05E +GpioLabel =3D "NW_GPIO_203$" +Offset =3D 0x00C40584 +AndData =3D 0x000000FF +OrData =3D 0x0003F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData069] -; GPIO4/HDA_RST <--> NW_GPIO_84 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P112 PAD0$" -Offset =3D 0x00C40660 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "NW_GPIO_204$" +Offset =3D 0x00C40588 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData070] -; GPIO4/HDA_RST <--> NW_GPIO_84 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P112 PAD1$" -Offset =3D 0x00C40664 -AndData =3D 0x00000000 -OrData =3D 0x0000103D +GpioLabel =3D "NW_GPIO_204$" +Offset =3D 0x00C4058C +AndData =3D 0x000000FF +OrData =3D 0x0003F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData071] -; GPIO7 <--> N_GPIO_13 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P115 PAD0$" -Offset =3D 0x00C50568 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_PMC_SPI_FS1$" +Offset =3D 0x00C40598 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData072] -; GPIO7 <--> N_GPIO_13 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P115 PAD1$" -Offset =3D 0x00C5056C -AndData =3D 0x00000000 -OrData =3D 0x0001F070 +GpioLabel =3D "NW_PMC_SPI_FS1$" +Offset =3D 0x00C4059C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData073] -; GPIO8 <--> N_GPIO_14 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P116 PAD0$" -Offset =3D 0x00C50570 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_84$" +Offset =3D 0x00C40660 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData074] -; GPIO8 <--> N_GPIO_14 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P116 PAD1$" -Offset =3D 0x00C50574 -AndData =3D 0x00000000 -OrData =3D 0x0001F071 +GpioLabel =3D "NW_GPIO_84$" +Offset =3D 0x00C40664 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData075] -; GPIO9 <--> N_GPIO_2 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P117 PAD0$" -Offset =3D 0x00C50510 -AndData =3D 0x00000000 -OrData =3D 0x04000102 +GpioLabel =3D "NW_GPIO_85$" +Offset =3D 0x00C40668 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData076] -; GPIO9 <--> N_GPIO_2 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P117 PAD1$" -Offset =3D 0x00C50514 -AndData =3D 0x00000000 -OrData =3D 0x0001F065 +GpioLabel =3D "NW_GPIO_85$" +Offset =3D 0x00C4066C +AndData =3D 0x000000FF +OrData =3D 0x0003D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData077] -; GPIO10 <--> N_GPIO_3 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P118 PAD0$" -Offset =3D 0x00C50518 -AndData =3D 0x00000000 -OrData =3D 0x04000102 +GpioLabel =3D "NW_GPIO_86$" +Offset =3D 0x00C40670 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData078] -; GPIO10 <--> N_GPIO_3 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P118 PAD1$" -Offset =3D 0x00C5051C -AndData =3D 0x00000000 -OrData =3D 0x0001F066 -DataSize =3D 0x04 +GpioLabel =3D "NW_GPIO_86$" +Offset =3D 0x00C40674 +AndData =3D 0x000000FF +OrData =3D 0x0003D000 +DataSize =3D 0x04 DataType =3D 0x04 [GpioData079] -; GPIO11 <--> N_GPIO_4 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P119 PAD0$" -Offset =3D 0x00C50520 -AndData =3D 0x00000000 -OrData =3D 0x04000102 +GpioLabel =3D "NW_GPIO_87$" +Offset =3D 0x00C40678 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData080] -; GPIO11 <--> N_GPIO_4 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P119 PAD1$" -Offset =3D 0x00C50524 -AndData =3D 0x00000000 -OrData =3D 0x0001F067 +GpioLabel =3D "NW_GPIO_87$" +Offset =3D 0x00C4067C +AndData =3D 0x000000FF +OrData =3D 0x00025200 DataSize =3D 0x04 DataType =3D 0x04 [GpioData081] -; I2C_PM_CK <--> W_GPIO_139 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P121 PAD0$" -Offset =3D 0x00C70578 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_88$" +Offset =3D 0x00C40680 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData082] -; I2C_PM_CK <--> W_GPIO_139 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P121 PAD1$" -Offset =3D 0x00C7057C -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "NW_GPIO_88$" +Offset =3D 0x00C40684 +AndData =3D 0x000000FF +OrData =3D 0x0003D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData083] -; I2C_PM_DAT <--> W_GPIO_138 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P122 PAD0$" -Offset =3D 0x00C70570 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_97$" +Offset =3D 0x00C406A8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData084] -; I2C_PM_DAT <--> W_GPIO_138 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P122 PAD1$" -Offset =3D 0x00C70574 -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "NW_GPIO_97$" +Offset =3D 0x00C406AC +AndData =3D 0x000000FF +OrData =3D 0x0003FC00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData085] -; BOOT_SEL0 <--> N_GPIO_24 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P123 PAD0$" -Offset =3D 0x00C505C0 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_98$" +Offset =3D 0x00C406B0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData086] -; BOOT_SEL0 <--> N_GPIO_24 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P123 PAD1$" -Offset =3D 0x00C505C4 -AndData =3D 0x00000000 -OrData =3D 0x0001F035 +GpioLabel =3D "NW_GPIO_98$" +Offset =3D 0x00C406B4 +AndData =3D 0x000000FF +OrData =3D 0x0003FC00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData087] -; BOOT_SEL1 <--> N_GPIO_23 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P124 PAD0$" -Offset =3D 0x00C505B8 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_99$" +Offset =3D 0x00C406B8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData088] -; BOOT_SEL1 <--> N_GPIO_23 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P124 PAD1$" -Offset =3D 0x00C505BC -AndData =3D 0x00000000 -OrData =3D 0x0001F034 +GpioLabel =3D "NW_GPIO_99$" +Offset =3D 0x00C406BC +AndData =3D 0x000000FF +OrData =3D 0x0003FC00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData089] -; BOOT_SEL2 <--> N_GPIO_22 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P125 PAD0$" -Offset =3D 0x00C505B0 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "NW_GPIO_100$" +Offset =3D 0x00C406C0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData090] -; BOOT_SEL2 <--> N_GPIO_22 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P125 PAD1$" -Offset =3D 0x00C505B4 -AndData =3D 0x00000000 -OrData =3D 0x0001F033 +GpioLabel =3D "NW_GPIO_100$" +Offset =3D 0x00C406C4 +AndData =3D 0x000000FF +OrData =3D 0x0003FC00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData091] -; SER0_TX <--> N_GPIO_39 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P129 PAD0$" -Offset =3D 0x00C50638 -AndData =3D 0x00000000 +GpioLabel =3D "NW_GPIO_103$" +Offset =3D 0x00C406D8 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData092] -; SER0_TX <--> N_GPIO_39 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P129 PAD1$" -Offset =3D 0x00C5063C -AndData =3D 0x00000000 -OrData =3D 0x00003044 +GpioLabel =3D "NW_GPIO_103$" +Offset =3D 0x00C406DC +AndData =3D 0x000000FF +OrData =3D 0x0003FC00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData093] -; SER0_RX <--> N_GPIO_38 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P130 PAD0$" -Offset =3D 0x00C50630 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "NW_GPIO_104$" +Offset =3D 0x00C406E8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData094] -; SER0_RX <--> N_GPIO_38 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P130 PAD1$" -Offset =3D 0x00C50634 -AndData =3D 0x00000000 -OrData =3D 0x00003043 +GpioLabel =3D "NW_GPIO_104$" +Offset =3D 0x00C406EC +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData095] -; SER0_RTS <--> N_GPIO_40 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P131 PAD0$" -Offset =3D 0x00C50640 -AndData =3D 0x00000000 +GpioLabel =3D "NW_GPIO_105$" +Offset =3D 0x00C406F0 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData096] -; SER0_RTS <--> N_GPIO_40 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P131 PAD1$" -Offset =3D 0x00C50644 -AndData =3D 0x00000000 -OrData =3D 0x00003145 +GpioLabel =3D "NW_GPIO_105$" +Offset =3D 0x00C406F4 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData097] -; SER0_CTS <--> N_GPIO_41 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P132 PAD0$" -Offset =3D 0x00C50648 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "NW_GPIO_106$" +Offset =3D 0x00C406F8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData098] -; SER0_CTS <--> N_GPIO_41 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P132 PAD1$" -Offset =3D 0x00C5064C -AndData =3D 0x00000000 -OrData =3D 0x00023146 +GpioLabel =3D "NW_GPIO_106$" +Offset =3D 0x00C406FC +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData099] -; SER1_TX <--> N_GPIO_43 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P134 PAD0$" -Offset =3D 0x00C50658 -AndData =3D 0x00000000 +GpioLabel =3D "NW_GPIO_109$" +Offset =3D 0x00C40700 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData100] -; SER1_TX <--> N_GPIO_43 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P134 PAD1$" -Offset =3D 0x00C5065C -AndData =3D 0x00000000 -OrData =3D 0x00003048 +GpioLabel =3D "NW_GPIO_109$" +Offset =3D 0x00C40704 +AndData =3D 0x000000FF +OrData =3D 0x0001D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData101] -; SER1_RX <--> N_GPIO_42 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P135 PAD0$" -Offset =3D 0x00C50650 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "NW_GPIO_110$" +Offset =3D 0x00C40708 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData102] -; SER1_RX <--> N_GPIO_42 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P135 PAD1$" -Offset =3D 0x00C50654 -AndData =3D 0x00000000 -OrData =3D 0x00003047 +GpioLabel =3D "NW_GPIO_110$" +Offset =3D 0x00C4070C +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData103] -; SER2_TX <--> N_GPIO_47 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P136 PAD0$" -Offset =3D 0x00C50678 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "NW_GPIO_112$" +Offset =3D 0x00C40718 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData104] -; SER2_TX <--> N_GPIO_47 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P136 PAD1$" -Offset =3D 0x00C5067C -AndData =3D 0x00000000 -OrData =3D 0x0000304C +GpioLabel =3D "NW_GPIO_112$" +Offset =3D 0x00C4071C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData105] -; SER2_RX <--> N_GPIO_46 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P137 PAD0$" -Offset =3D 0x00C50670 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "NW_GPIO_113$" +Offset =3D 0x00C40720 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData106] -; SER2_RX <--> N_GPIO_46 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P137 PAD1$" -Offset =3D 0x00C50674 -AndData =3D 0x00000000 -OrData =3D 0x0000304B +GpioLabel =3D "NW_GPIO_113$" +Offset =3D 0x00C40724 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData107] -; SER2_RTS <--> N_GPIO_48 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P138 PAD0$" -Offset =3D 0x00C50680 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "W_GPIO_126$" +Offset =3D 0x00C70510 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData108] -; SER2_RTS <--> N_GPIO_48 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P138 PAD1$" -Offset =3D 0x00C50684 -AndData =3D 0x00000000 -OrData =3D 0x0000304D +GpioLabel =3D "W_GPIO_126$" +Offset =3D 0x00C70514 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData109] -; SER2_CTS <--> N_GPIO_49 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P139 PAD0$" -Offset =3D 0x00C50688 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "W_GPIO_127$" +Offset =3D 0x00C70518 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData110] -; SER2_CTS <--> N_GPIO_49 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P139 PAD1$" -Offset =3D 0x00C5068C -AndData =3D 0x00000000 -OrData =3D 0x0000304E +GpioLabel =3D "W_GPIO_127$" +Offset =3D 0x00C7051C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData111] -; SER3_TX <--> NW_GPIO_113 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P140 PAD0$" -Offset =3D 0x00C40720 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "W_GPIO_132$" +Offset =3D 0x00C70540 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData112] -; SER3_TX <--> NW_GPIO_113 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P140 PAD1$" -Offset =3D 0x00C40724 -AndData =3D 0x00000000 -OrData =3D 0x00003058 +GpioLabel =3D "W_GPIO_132$" +Offset =3D 0x00C70544 +AndData =3D 0x000000FF +OrData =3D 0x00012700 DataSize =3D 0x04 DataType =3D 0x04 [GpioData113] -; SER3_RX <--> NW_GPIO_112 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P141 PAD0$" -Offset =3D 0x00C40718 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "W_GPIO_133$" +Offset =3D 0x00C70548 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData114] -; SER3_RX <--> NW_GPIO_112 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC P141 PAD1$" -Offset =3D 0x00C4071C -AndData =3D 0x00000000 -OrData =3D 0x00003057 +GpioLabel =3D "W_GPIO_133$" +Offset =3D 0x00C7054C +AndData =3D 0x000000FF +OrData =3D 0x00012700 DataSize =3D 0x04 DataType =3D 0x04 [GpioData115] -; CSI1_TX+/I2C_CAM1_CK <--> W_GPIO_135 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S1 PAD0$" -Offset =3D 0x00C70558 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "W_GPIO_134$" +Offset =3D 0x00C70550 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData116] -; CSI1_TX+/I2C_CAM1_CK <--> W_GPIO_135 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S1 PAD1$" -Offset =3D 0x00C7055C -AndData =3D 0x00000000 +GpioLabel =3D "W_GPIO_134$" +Offset =3D 0x00C70554 +AndData =3D 0x000000FF OrData =3D 0x00006700 DataSize =3D 0x04 DataType =3D 0x04 [GpioData117] -; CSI1_TX-/I2C_CAM1_DAT <--> W_GPIO_134 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S2 PAD0$" -Offset =3D 0x00C70550 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "W_GPIO_135$" +Offset =3D 0x00C70558 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData118] -; CSI1_TX-/I2C_CAM1_DAT <--> W_GPIO_134 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S2 PAD1$" -Offset =3D 0x00C70554 -AndData =3D 0x00000000 +GpioLabel =3D "W_GPIO_135$" +Offset =3D 0x00C7055C +AndData =3D 0x000000FF OrData =3D 0x00006700 DataSize =3D 0x04 DataType =3D 0x04 [GpioData119] -; CSI0_TX+/I2C_CAM0_CK <--> W_GPIO_133 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S5 PAD0$" -Offset =3D 0x00C70548 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "W_GPIO_136$" +Offset =3D 0x00C70560 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData120] -; CSI0_TX+/I2C_CAM0_CK <--> W_GPIO_133 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S5 PAD1$" -Offset =3D 0x00C7054C -AndData =3D 0x00000000 -OrData =3D 0x00012700 +GpioLabel =3D "W_GPIO_136$" +Offset =3D 0x00C70564 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData121] -; CAM_MCK <--> W_OSC_CLK_OUT_0 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S6 PAD0$" -Offset =3D 0x00C705F0 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "W_GPIO_137$" +Offset =3D 0x00C70568 +AndData =3D 0x0801E0FE +OrData =3D 0x44000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData122] -; CAM_MCK <--> W_OSC_CLK_OUT_0 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S6 PAD1$" -Offset =3D 0x00C705F4 -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "W_GPIO_137$" +Offset =3D 0x00C7056C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData123] -; CSI0_TX-/I2C_CAM0_DAT <--> W_GPIO_132 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S7 PAD0$" -Offset =3D 0x00C70540 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "W_GPIO_146$" +Offset =3D 0x00C70580 +AndData =3D 0x0801E0FE +OrData =3D 0x44000C00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData124] -; CSI0_TX-/I2C_CAM0_DAT <--> W_GPIO_132 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S7 PAD1$" -Offset =3D 0x00C70544 -AndData =3D 0x00000000 -OrData =3D 0x00012700 +GpioLabel =3D "W_GPIO_146$" +Offset =3D 0x00C70584 +AndData =3D 0x000000FF +OrData =3D 0x0003D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData125] -; AUDIO_MCK <--> NW_GPIO_84 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S38 PAD0$" -Offset =3D 0x00C40660 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "W_GPIO_147$" +Offset =3D 0x00C70588 +AndData =3D 0x0801E0FE +OrData =3D 0x44000C00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData126] -; AUDIO_MCK <--> NW_GPIO_84 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S38 PAD1$" -Offset =3D 0x00C40664 -AndData =3D 0x00000000 -OrData =3D 0x0000103D +GpioLabel =3D "W_GPIO_147$" +Offset =3D 0x00C7058C +AndData =3D 0x000000FF +OrData =3D 0x0003D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData127] -; I2S0_LRCK <--> NW_GPIO_86 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S39 PAD0$" -Offset =3D 0x00C40670 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "W_GPIO_148$" +Offset =3D 0x00C70590 +AndData =3D 0x0801E0FE +OrData =3D 0x44000C00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData128] -; I2S0_LRCK <--> NW_GPIO_86 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S39 PAD1$" -Offset =3D 0x00C40674 -AndData =3D 0x00000000 -OrData =3D 0x0003D03F +GpioLabel =3D "W_GPIO_148$" +Offset =3D 0x00C70594 +AndData =3D 0x000000FF +OrData =3D 0x0003C000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData129] -; I2S0_SDOUT <--> NW_GPIO_88 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S40 PAD0$" -Offset =3D 0x00C40680 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "W_GPIO_149$" +Offset =3D 0x00C70598 +AndData =3D 0x0801E0FE +OrData =3D 0x44000C00 DataSize =3D 0x04 DataType =3D 0x04 [GpioData130] -; I2S0_SDOUT <--> NW_GPIO_88 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S40 PAD1$" -Offset =3D 0x00C40684 -AndData =3D 0x00000000 -OrData =3D 0x0003D041 +GpioLabel =3D "W_GPIO_149$" +Offset =3D 0x00C7059C +AndData =3D 0x000000FF +OrData =3D 0x0003D000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData131] -; I2S0_SDIN <--> NW_GPIO_87 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S41 PAD0$" -Offset =3D 0x00C40678 -AndData =3D 0x00000000 +GpioLabel =3D "W_OSC_CLK_OUT_0$" +Offset =3D 0x00C705F0 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData132] -; I2S0_SDIN <--> NW_GPIO_87 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S41 PAD1$" -Offset =3D 0x00C4067C -AndData =3D 0x00000000 -OrData =3D 0x00025240 +GpioLabel =3D "W_OSC_CLK_OUT_0$" +Offset =3D 0x00C705F4 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData133] -; I2S0_CK <--> NW_GPIO_85 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S42 PAD0$" -Offset =3D 0x00C40668 -AndData =3D 0x00000000 -OrData =3D 0x44000400 +GpioLabel =3D "W_PMU_AC_PRESENT" +Offset =3D 0x00C70618 +AndData =3D 0x0801E0FE +OrData =3D 0x44000201 DataSize =3D 0x04 DataType =3D 0x04 [GpioData134] -; I2S0_CK <--> NW_GPIO_85 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S42 PAD1$" -Offset =3D 0x00C4066C -AndData =3D 0x00000000 -OrData =3D 0x0003D03E +GpioLabel =3D "W_PMU_AC_PRESENT" +Offset =3D 0x00C7061C +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData135] -; I2C_GP_CK <--> W_GPIO_137 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S48 PAD0$" -Offset =3D 0x00C70568 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "W_PMU_BATLOW_B$" +Offset =3D 0x00C70620 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData136] -; I2C_GP_CK <--> W_GPIO_137 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S48 PAD1$" -Offset =3D 0x00C7056C -AndData =3D 0x00000000 -OrData =3D 0x00013300 +GpioLabel =3D "W_PMU_BATLOW_B$" +Offset =3D 0x00C70624 +AndData =3D 0x000000FF +OrData =3D 0x0003F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData137] -; I2C_GP_DAT <--> W_GPIO_136 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S49 PAD0$" -Offset =3D 0x00C70560 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "W_PMU_PLTRST_B$" +Offset =3D 0x00C70628 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData138] -; I2C_GP_DAT <--> W_GPIO_136 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S49 PAD1$" -Offset =3D 0x00C70564 -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "W_PMU_PLTRST_B$" +Offset =3D 0x00C7062C +AndData =3D 0x000000FF +OrData =3D 0x0003C000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData139] -; HDA_SYNC/I2S2_LRCK <--> W_GPIO_147 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S50 PAD0$" -Offset =3D 0x00C70588 -AndData =3D 0x00000000 -OrData =3D 0x44000C00 +GpioLabel =3D "W_PMU_SLP_S3_B$" +Offset =3D 0x00C70648 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData140] -; HDA_SYNC/I2S2_LRCK <--> W_GPIO_147 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S50 PAD1$" -Offset =3D 0x00C7058C -AndData =3D 0x00000000 -OrData =3D 0x0003D000 +GpioLabel =3D "W_PMU_SLP_S3_B$" +Offset =3D 0x00C7064C +AndData =3D 0x000000FF +OrData =3D 0x0003C000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData141] -; HDA_SDO/I2S2_SDOUT <--> W_GPIO_149 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S51 PAD0$" -Offset =3D 0x00C70598 -AndData =3D 0x00000000 -OrData =3D 0x44000C00 +GpioLabel =3D "SW_GPIO_206$" +Offset =3D 0x00C00508 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData142] -; HDA_SDO/I2S2_SDOUT <--> W_GPIO_149 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S51 PAD1$" -Offset =3D 0x00C7059C -AndData =3D 0x00000000 -OrData =3D 0x0003D000 +GpioLabel =3D "SW_GPIO_206$" +Offset =3D 0x00C0050C +AndData =3D 0x000000FF +OrData =3D 0x0003F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData143] -; HDA_SDI/I2S2_SDIN <--> W_GPIO_148 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S52 PAD0$" -Offset =3D 0x00C70590 -AndData =3D 0x00000000 -OrData =3D 0x44000C00 +GpioLabel =3D "SW_GPIO_166$" +Offset =3D 0x00C00570 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData144] -; HDA_SDI/I2S2_SDIN <--> W_GPIO_148 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S52 PAD1$" -Offset =3D 0x00C70594 -AndData =3D 0x00000000 -OrData =3D 0x0003C000 +GpioLabel =3D "SW_GPIO_166$" +Offset =3D 0x00C00574 +AndData =3D 0x000000FF +OrData =3D 0x00005000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData145] -; HDA_CK/I2S2_CK <--> W_GPIO_146 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S53 PAD0$" -Offset =3D 0x00C70580 -AndData =3D 0x00000000 -OrData =3D 0x44000C00 +GpioLabel =3D "SW_GPIO_167$" +Offset =3D 0x00C00578 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData146] -; HDA_CK/I2S2_CK <--> W_GPIO_146 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S53 PAD1$" -Offset =3D 0x00C70584 -AndData =3D 0x00000000 -OrData =3D 0x0003D000 +GpioLabel =3D "SW_GPIO_167$" +Offset =3D 0x00C0057C +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData147] -; SATA_ACT <--> N_GPIO_26 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S54 PAD0$" -Offset =3D 0x00C505D0 -AndData =3D 0x00000000 -OrData =3D 0x44001400 +GpioLabel =3D "SW_GPIO_168$" +Offset =3D 0x00C00580 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData148] -; SATA_ACT <--> N_GPIO_26 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S54 PAD1$" -Offset =3D 0x00C505D4 -AndData =3D 0x00000000 -OrData =3D 0x00001037 +GpioLabel =3D "SW_GPIO_168$" +Offset =3D 0x00C00584 +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData149] -; DP0_HPD <--> NW_GPIO_200 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S98 PAD0$" -Offset =3D 0x00C40568 -AndData =3D 0x00000000 -OrData =3D 0x44000802 +GpioLabel =3D "SW_GPIO_169$" +Offset =3D 0x00C00588 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData150] -; DP0_HPD <--> NW_GPIO_200 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S98 PAD1$" -Offset =3D 0x00C4056C -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "SW_GPIO_169$" +Offset =3D 0x00C0058C +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData151] -; LCD1_BKLT_EN <--> NW_GPIO_197 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S107 PAD0$" -Offset =3D 0x00C40550 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "SW_GPIO_170$" +Offset =3D 0x00C00590 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData152] -; LCD1_BKLT_EN <--> NW_GPIO_197 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S107 PAD1$" -Offset =3D 0x00C40554 -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "SW_GPIO_170$" +Offset =3D 0x00C00594 +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData153] -; LCD1_VDD_EN <--> NW_GPIO_196 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S116 PAD0$" -Offset =3D 0x00C40548 -AndData =3D 0x00000000 -OrData =3D 0x44000200 +GpioLabel =3D "SW_GPIO_171$" +Offset =3D 0x00C00598 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData154] -; LCD1_VDD_EN <--> NW_GPIO_196 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S116 PAD1$" -Offset =3D 0x00C4054C -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "SW_GPIO_171$" +Offset =3D 0x00C0059C +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData155] -; LCD1_BKLT_PWM <--> NW_GPIO_198 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S122 PAD0$" -Offset =3D 0x00C40558 -AndData =3D 0x00000000 +GpioLabel =3D "SW_GPIO_172$" +Offset =3D 0x00C005A0 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData156] -; LCD1_BKLT_PWM <--> NW_GPIO_198 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S122 PAD1$" -Offset =3D 0x00C4055C -AndData =3D 0x00000000 -OrData =3D 0x00001000 +GpioLabel =3D "SW_GPIO_172$" +Offset =3D 0x00C005A4 +AndData =3D 0x000000FF +OrData =3D 0x00021100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData157] -; LCD0_VDD_EN <--> NW_GPIO_193 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S133 PAD0$" -Offset =3D 0x00C40530 -AndData =3D 0x00000000 +GpioLabel =3D "SW_GPIO_173$" +Offset =3D 0x00C005A8 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData158] -; LCD0_VDD_EN <--> NW_GPIO_193 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S133 PAD1$" -Offset =3D 0x00C40534 -AndData =3D 0x00000000 -OrData =3D 0x00005000 +GpioLabel =3D "SW_GPIO_173$" +Offset =3D 0x00C005AC +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData159] -; I2C_LCD_CK <--> W_GPIO_127 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S139 PAD0$" -Offset =3D 0x00C70518 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "SW_GPIO_174$" +Offset =3D 0x00C005B0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData160] -; I2C_LCD_CK <--> W_GPIO_127 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S139 PAD1$" -Offset =3D 0x00C7051C -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "SW_GPIO_174$" +Offset =3D 0x00C005B4 +AndData =3D 0x000000FF +OrData =3D 0x00023100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData161] -; I2C_LCD_DAT <--> W_GPIO_126 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S140 PAD0$" -Offset =3D 0x00C70510 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "SW_GPIO_175$" +Offset =3D 0x00C005B8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData162] -; I2C_LCD_DAT <--> W_GPIO_126 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S140 PAD1$" -Offset =3D 0x00C70514 -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "SW_GPIO_175$" +Offset =3D 0x00C005BC +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData163] -; eDP0_HPD <--> NW_PMC_SPI_FS1 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S144 PAD0$" -Offset =3D 0x00C40598 -AndData =3D 0x00000000 -OrData =3D 0x44000800 +GpioLabel =3D "SW_GPIO_176$" +Offset =3D 0x00C005C0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData164] -; eDP0_HPD <--> NW_PMC_SPI_FS1 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S144 PAD1$" -Offset =3D 0x00C4059C -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "SW_GPIO_176$" +Offset =3D 0x00C005C4 +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData165] -; PCIE_WAKE <--> SW_GPIO_206 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S146 PAD0$" -Offset =3D 0x00C00508 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "SW_GPIO_177$" +Offset =3D 0x00C005C8 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData166] -; PCIE_WAKE <--> SW_GPIO_206 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S146 PAD1$" -Offset =3D 0x00C0050C -AndData =3D 0x00000000 -OrData =3D 0x0003F000 +GpioLabel =3D "SW_GPIO_177$" +Offset =3D 0x00C005CC +AndData =3D 0x000000FF +OrData =3D 0x00023000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData167] -; LID <--> N_GPIO_6 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S148 PAD0$" -Offset =3D 0x00C50530 -AndData =3D 0x00000000 -OrData =3D 0x46080102 +GpioLabel =3D "SW_GPIO_178$" +Offset =3D 0x00C005D0 +AndData =3D 0x0801E0FE +OrData =3D 0x42000100 DataSize =3D 0x04 DataType =3D 0x04 [GpioData168] -; LID <--> N_GPIO_6 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S148 PAD1$" -Offset =3D 0x00C50534 -AndData =3D 0x00000000 -OrData =3D 0x00003069 +GpioLabel =3D "SW_GPIO_178$" +Offset =3D 0x00C005D4 +AndData =3D 0x000000FF +OrData =3D 0x00027000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData169] -; SLEEP <--> N_GPIO_7 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S149 PAD0$" -Offset =3D 0x00C50538 -AndData =3D 0x00000000 -OrData =3D 0x42880102 +GpioLabel =3D "SW_GPIO_186$" +Offset =3D 0x00C005E0 +AndData =3D 0x0801E0FE +OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData170] -; SLEEP <--> N_GPIO_7 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S149 PAD1$" -Offset =3D 0x00C5053C -AndData =3D 0x00000000 -OrData =3D 0x0000306A +GpioLabel =3D "SW_GPIO_186$" +Offset =3D 0x00C005E4 +AndData =3D 0x000000FF +OrData =3D 0x00003000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData171] -; CHARGER_PRSNT <--> W_PMU_AC_PRESENT StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S152 PAD0$" -Offset =3D 0x00C70618 -AndData =3D 0x00000000 +GpioLabel =3D "SW_GPIO_183$" +Offset =3D 0x00C005F0 +AndData =3D 0x0801E0FE OrData =3D 0x44000201 DataSize =3D 0x04 DataType =3D 0x04 [GpioData172] -; CHARGER_PRSNT <--> W_PMU_AC_PRESENT StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S152 PAD1$" -Offset =3D 0x00C7061C -AndData =3D 0x00000000 -OrData =3D 0x00003000 +GpioLabel =3D "SW_GPIO_183$" +Offset =3D 0x00C005F4 +AndData =3D 0x000000FF +OrData =3D 0x00001000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData173] -; CARRIER_STBY <--> W_PMU_SLP_S3_B StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S153 PAD0$" -Offset =3D 0x00C70648 -AndData =3D 0x00000000 +GpioLabel =3D "SW_SMB_ALERTB$" +Offset =3D 0x00C005F8 +AndData =3D 0x0801E0FE OrData =3D 0x44000400 DataSize =3D 0x04 DataType =3D 0x04 [GpioData174] -; CARRIER_STBY <--> W_PMU_SLP_S3_B StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S153 PAD1$" -Offset =3D 0x00C7064C -AndData =3D 0x00000000 -OrData =3D 0x0003C000 +GpioLabel =3D "SW_SMB_ALERTB$" +Offset =3D 0x00C005FC +AndData =3D 0x000000FF +OrData =3D 0x0003F000 DataSize =3D 0x04 DataType =3D 0x04 [GpioData175] -; FORCE_RECOV <--> N_GPIO_21 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S155 PAD0$" -Offset =3D 0x00C505A8 -AndData =3D 0x00000000 -OrData =3D 0x44000102 +GpioLabel =3D "SW_SMB_CLK$" +Offset =3D 0x00C00600 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData176] -; FORCE_RECOV <--> N_GPIO_21 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S155 PAD1$" -Offset =3D 0x00C505AC -AndData =3D 0x00000000 -OrData =3D 0x00003032 +GpioLabel =3D "SW_SMB_CLK$" +Offset =3D 0x00C00604 +AndData =3D 0x000000FF +OrData =3D 0x00013300 DataSize =3D 0x04 DataType =3D 0x04 [GpioData177] -; BATLOW <--> W_PMU_BATLOW_B StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S156 PAD0$" -Offset =3D 0x00C70620 -AndData =3D 0x00000000 -OrData =3D 0x44000402 +GpioLabel =3D "SW_SMB_DATA$" +Offset =3D 0x00C00608 +AndData =3D 0x0801E0FE +OrData =3D 0x44000800 DataSize =3D 0x04 DataType =3D 0x04 [GpioData178] -; BATLOW <--> W_PMU_BATLOW_B -StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S156 PAD1$" -Offset =3D 0x00C70624 -AndData =3D 0x00000000 -OrData =3D 0x0003F000 -DataSize =3D 0x04 -DataType =3D 0x04 - -[GpioData179] -; TEST <--> N_GPIO_25 -StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S157 PAD0$" -Offset =3D 0x00C505C8 -AndData =3D 0x00000000 -OrData =3D 0x44000102 -DataSize =3D 0x04 -DataType =3D 0x04 - -[GpioData180] -; TEST <--> N_GPIO_25 StructureType =3D GpioDataRecord -GpioLabel =3D "SMARC S157 PAD1$" -Offset =3D 0x00C505CC -AndData =3D 0x00000000 -OrData =3D 0x0001F036 +GpioLabel =3D "SW_SMB_DATA$" +Offset =3D 0x00C0060C +AndData =3D 0x000000FF +OrData =3D 0x00013300 DataSize =3D 0x04 DataType =3D 0x04 @@ -2001,8 +1816,8 @@ DataType =3D 0x04 ; P117 | GPIO9 | N_GPIO_2 | C39 = | ICM--65 | 0x00C50510 ; P118 | GPIO10 | N_GPIO_3 | B39 = | ICM--66 | 0x00C50518 ; P119 | GPIO11 | N_GPIO_4 | B35 = | ICM--67 | 0x00C50520 -; P121 | I2C_PM_CK | W_GPIO_139 | T62= | -CM---- | 0x00C70578 -; P122 | I2C_PM_DAT | W_GPIO_138 | T61= | -CM---- | 0x00C70570 +; P121 | I2C_PM_CK | SW_SMB_CLK | T62= | -C----- | 0x00C00600 +; P122 | I2C_PM_DAT | SW_SMB_DATA | T61= | -C----- | 0x00C00608 ; P123 | BOOT_SEL0 | N_GPIO_24 | C25 = | ICM--35 | 0x00C505C0 ; P124 | BOOT_SEL1 | N_GPIO_23 | B25 = | ICM--34 | 0x00C505B8 ; P125 | BOOT_SEL2 | N_GPIO_22 | A26 = | ICM--33 | 0x00C505B0 @@ -2248,5 +2063,3 @@ Struct_175 =3D GpioData175 Struct_176 =3D GpioData176 Struct_177 =3D GpioData177 Struct_178 =3D GpioData178 -Struct_179 =3D GpioData179 -Struct_180 =3D GpioData180 diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Me= mory/DramPolicyPpi.bin b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Modu= le/Eeprom/Memory/DramPolicyPpi.bin new file mode 100644 index 0000000000000000000000000000000000000000..69dcc21ff589c404e987d973be5= 2d09882b49cd7 GIT binary patch literal 223 # Removed to conserve space literal 0 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Me= mory/GenerateDramPolicyBinary.py b/Platform/BroxtonPlatformPkg/Board/Minnow= Board3Module/Eeprom/Memory/GenerateDramPolicyBinary.py new file mode 100644 index 0000000000..cc5fddebac --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/Memory/Ge= nerateDramPolicyBinary.py @@ -0,0 +1,64 @@ +# @file +# Script file to generate the EEPROM binary +# +# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may = be found at +# http://opensource.org/licenses/bsd-license.php. +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# + +import glob +import os +import subprocess +import sys + +# Version defines +__version__ =3D '0.1.0.0' +VerString =3D 'EEPROM DramPolicyPpi binary generation tool, Version #{= 0}'.format(__version__) +PythonVersion =3D 'Python version =3D {0:X}'.format(sys.hexversion) + +def Main(): + # Set return code to error + ReturnCode =3D 1 + + try: + # Get paths + ThisUtilityPath =3D os.path.dirname(os.path.abspath(sys.argv[0])) + # Backup until we get to BroxtonPlatformPkg + TempPath =3D ThisUtilityPath + while os.path.basename(TempPath) !=3D 'BroxtonPlatformPkg': + TempPath =3D os.path.dirname(TempPath) + UtilityPath =3D TempPath + '\\Common\\Features\\Eeprom= \\EepromBinary\\Utilities' + ScrapDramPolicyPath =3D UtilityPath + '\\ScrapDramPolicyPpi.py' + OutputFilePath =3D ThisUtilityPath + '\\DramPolicyPpi.bin' + if len(sys.argv) > 1: + LogFilePath =3D sys.argv[1] + + # Debug prints + if False: + print('sys.argv[0] =3D {0}'.format(sys.argv[0])) + print('ThisUtilityPath =3D {0}'.format(ThisUtilityPath)) + print('UtilityPath =3D {0}'.format(UtilityPath)) + print('ScrapDramPolicyPath =3D {0}'.format(ScrapDramPolicyPath)) + print('LogFilePath =3D {0}'.format(LogFilePath)) + + # Generate DramPolicyPpi binary + # ScrapDramPolicyPpi.py LogFilePath OutputFilePath + subprocess.call(['python.exe', ScrapDramPolicyPath, LogFilePath, Outpu= tFilePath]) + + # Clear error code + ReturnCode =3D 0 + + finally: + return ReturnCode + +if __name__ =3D=3D "__main__": + print('') + print(VerString) + print(PythonVersion) + sys.exit(Main()) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VB= T/Vbt_bxt_t_TianmaMipi.bin b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3= Module/Eeprom/VBT/VbtBxtMipi.bin similarity index 66% rename from Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VBT= /Vbt_bxt_t_TianmaMipi.bin rename to Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VBT/V= btBxtMipi.bin index 32c872a7e321d5ddc2c419734b410f2ba165090d..48565f431e281bb50910479d03a= b6caa6aa7980c 100644 GIT binary patch delta 282 # Removed to conserve space delta 621 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VB= T/Vbt_bxt_t_fab_b.bin b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Modul= e/Eeprom/VBT/Vbt_bxt_t_fab_b.bin deleted file mode 100644 index a29afe5f1abcf394a0d0ffed3b0338f0f2ef3fd7..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 # Removed to conserve space literal 7168 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/Eeprom/VB= T/Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin b/Platform/BroxtonPlatformPkg/Board/Min= nowBoard3Module/Eeprom/VBT/Vbt_bxt_t_fab_b_TrulyMipi_Cmd.bin deleted file mode 100644 index 26f691d4f55b0ed791ac0d2b8ab0d68747e4405a..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 # Removed to conserve space literal 6656 # Removed to conserve space diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat b/Platform/Broxto= nPlatformPkg/BuildBxtBios.bat index cdf666a7a4..9bd71198e5 100644 --- a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat @@ -91,6 +91,7 @@ if /i "%~1"=3D=3D"/l" ( shift goto OptLoop ) + if /i "%~1"=3D=3D"/ia32" ( set Arch=3DIA32 shift @@ -742,6 +743,5 @@ echo See EDK2.log for more details echo %date% %time% ( EndLocal - set BiosVersion=3D%BiosVersion% exit /b %ExitCode% ) diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPl= atformPkg/BuildIFWI.bat index 78cdac5111..5566e211ee 100644 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat @@ -244,6 +244,5 @@ set exitCode=3D1 :Exit ( EndLocal - set Arch=3D%Arch% exit /b %exitCode% ) diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlat= form.c index 4cc1e1fc39..fd366da373 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.= c +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.= c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include "PlatformBaseAddresses.h" @@ -1084,6 +1085,11 @@ OnReadyToBoot ( // UpdateDmarOnReadyToBoot (SetupVarBuffer.VTdEnable); // + // Add EEPROM SSDT tables if they exist + // + Status =3D EepromProgramAcpi (); + + // // Publish ACPI 1.0 or 2.0 Tables // Status =3D AcpiSupport->PublishTables ( diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/Acp= iPlatformDxe.inf index 21ce938229..118681fa3a 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf @@ -1,7 +1,7 @@ ## @file # ACPI Platform Driver. # -# Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License @@ -46,6 +46,7 @@ SteppingLib SeCLib PcdLib + EepromPlatformLib [Guids] gACPIOSFRMfgStringVariableGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/E= epromApp.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/E= epromApp.c index 3b1b48baee..b586cd1993 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.c @@ -62,9 +62,16 @@ ShellAppMain ( ParseParameters (Argc, Argv, &ProgramInfo); // Print App version - Print (L"EepromApp - Version #%s\n", APP_VERSION); + Print (L"EepromApp for BXT/APL - Version #%s\n", APP_VERSION); Print (L"Copyright (c) %s Intel Corporation. All rights reserved.\n\n", = APP_COPYRIGHT); + // Make sure we support this SoC + if (! IsApolloLake ()) { + Print (L"ERROR: This is not a Broxton or Apollo Lake SoC!\n"); + Status =3D SHELL_INVALID_PARAMETER; + goto Exit; + } + // Help requested? if (ProgramInfo.HelpFlag) { PrintHelp (); @@ -85,7 +92,7 @@ ShellAppMain ( // // Skip this if we are doing a scan. // - Print (L"- GetValidEepromLibrary() =3D %a\n", mEepromLibraryString[Get= ValidEepromLibrary (TRUE)]); + Print (L"- GetValidEepromLibrary() =3D %a\n", mEepromLibraryString[Get= ValidEepromLibrary (FALSE)]); } else { // Scanning Status =3D ScanOption (&ProgramInfo); @@ -1244,6 +1251,15 @@ GetHexOrDecFromString ( } } +BOOLEAN +IsApolloLake (VOID) +{ + if (GetBxtSeries () =3D=3D BxtSeriesMax) { + return FALSE; + } + return TRUE; +} + VOID ParseParameters ( IN UINTN Argc, diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/E= epromApp.h b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/E= epromApp.h index 7babb6555e..9470843775 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.h +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.h @@ -1,196 +1,200 @@ -/** @file - - This application will read/write/verify/dump the EERPOM data. - - Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
- - This program and the accompanying materials are licensed and made availa= ble under - the terms and conditions of the BSD License which accompanies this distr= ibution. - The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - - -**/ - -#ifndef _EEPROM_APP_H_ -#define _EEPROM_APP_H_ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Defines -#define APP_VERSION L"1.00.00" -#define APP_COPYRIGHT L"2017 - 2018" -#define DIVIDING_LINE L"+----------------------------------------= ------------+------------------+\n" - -#define MD5DigestSize 0x10 -#define SHA1DigestSize 0x14 -#define SHA256DigestSize 0x20 -#define SHA384DigestSize 0x30 -#define SHA512DigestSize 0x40 - -// Structures -typedef struct { - BOOLEAN HelpFlag; - BOOLEAN AddressFlag; - UINT8 AddressValue; - BOOLEAN BusFlag; - UINT8 BusValue; - BOOLEAN CheckFlag; - UINT8 CheckLibraryIndex; - UINT8 *CheckFile; - CHAR16 *CheckFileName; - UINT32 CheckFileSize; - BOOLEAN DumpHumanFlag; - UINT8 DumpHumanLibraryIndex; - UINT8 *DumpHumanFile; - CHAR16 *DumpHumanFileName; - UINT32 DumpHumanFileSize; - BOOLEAN DumpRawFlag; - UINT8 DumpRawLibraryIndex; - UINT8 *DumpRawFile; - CHAR16 *DumpRawFileName; - UINT32 DumpRawFileSize; - BOOLEAN EraseFlag; - UINT8 EraseLibraryIndex; - BOOLEAN ReadFlag; - UINT8 ReadLibraryIndex; - UINT8 *ReadFile; - CHAR16 *ReadFileName; - UINT32 ReadFileSize; - BOOLEAN ScanFlag; - BOOLEAN VerboseFlag; - BOOLEAN VerifyFlag; - UINT8 VerifyLibraryIndex; - UINT8 *VerifyFile; - CHAR16 *VerifyFileName; - UINT32 VerifyFileSize; - BOOLEAN WriteFlag; - UINT8 WriteLibraryIndex; - UINT8 *WriteFile; - CHAR16 *WriteFileName; - UINT32 WriteFileSize; -} PROGRAM_INFO; - -// Headers -SHELL_STATUS -BufferToMemory ( - IN UINT8 *Buffer, - IN UINT32 BufferSize, - OUT UINT8 **MemoryBuffer, - OUT UINT32 *MemoryBufferSize - ); - -SHELL_STATUS -CheckForInvalidOptions ( - IN PROGRAM_INFO *ProgramInfo - ); - -SHELL_STATUS -CheckOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -SHELL_STATUS -DumpHumanOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -VOID -DumpParagraph ( - IN VOID *Ptr, - IN UINTN Count - ); - -VOID -DumpProgramInfo ( - IN PROGRAM_INFO *ProgramInfo - ); - -SHELL_STATUS -DumpRawOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -SHELL_STATUS -EraseOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -UINTN -GetHexOrDecFromString ( - CHAR16 *Arg - ); - -VOID -ParseParameters ( - IN UINTN Argc, - IN CHAR16 **Argv, - IN PROGRAM_INFO *ProgramInfo - ); - -VOID -PrintChar ( - IN UINT8 Count, - IN CHAR16 *Char -); - -VOID -PrintHelp (VOID); - -EFI_STATUS -ReadFileData ( - IN CHAR16 *FileName, - OUT UINT8 **Buffer, - OUT UINT32 *BufferSize - ); - -SHELL_STATUS -ReadOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -SHELL_STATUS -ScanOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -CHAR16 * -ToLower ( - IN OUT CHAR16 *Str - ); - -SHELL_STATUS -VerifyOption ( - IN PROGRAM_INFO *ProgramInfo - ); - -EFI_STATUS -WriteFileData ( - IN CHAR16 *FileName, - IN UINT8 *Buffer, - IN UINTN BufferSize - ); - -SHELL_STATUS -WriteOption ( - IN PROGRAM_INFO *ProgramInfo - ); - +/** @file + + This application will read/write/verify/dump the EERPOM data. + + Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble under + the terms and conditions of the BSD License which accompanies this distr= ibution. + The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + + +**/ + +#ifndef _EEPROM_APP_H_ +#define _EEPROM_APP_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Defines +#define APP_VERSION L"1.00.01" +#define APP_COPYRIGHT L"2017 - 2018" +#define DIVIDING_LINE L"+----------------------------------------= ------------+------------------+\n" + +#define MD5DigestSize 0x10 +#define SHA1DigestSize 0x14 +#define SHA256DigestSize 0x20 +#define SHA384DigestSize 0x30 +#define SHA512DigestSize 0x40 + +// Structures +typedef struct { + BOOLEAN HelpFlag; + BOOLEAN AddressFlag; + UINT8 AddressValue; + BOOLEAN BusFlag; + UINT8 BusValue; + BOOLEAN CheckFlag; + UINT8 CheckLibraryIndex; + UINT8 *CheckFile; + CHAR16 *CheckFileName; + UINT32 CheckFileSize; + BOOLEAN DumpHumanFlag; + UINT8 DumpHumanLibraryIndex; + UINT8 *DumpHumanFile; + CHAR16 *DumpHumanFileName; + UINT32 DumpHumanFileSize; + BOOLEAN DumpRawFlag; + UINT8 DumpRawLibraryIndex; + UINT8 *DumpRawFile; + CHAR16 *DumpRawFileName; + UINT32 DumpRawFileSize; + BOOLEAN EraseFlag; + UINT8 EraseLibraryIndex; + BOOLEAN ReadFlag; + UINT8 ReadLibraryIndex; + UINT8 *ReadFile; + CHAR16 *ReadFileName; + UINT32 ReadFileSize; + BOOLEAN ScanFlag; + BOOLEAN VerboseFlag; + BOOLEAN VerifyFlag; + UINT8 VerifyLibraryIndex; + UINT8 *VerifyFile; + CHAR16 *VerifyFileName; + UINT32 VerifyFileSize; + BOOLEAN WriteFlag; + UINT8 WriteLibraryIndex; + UINT8 *WriteFile; + CHAR16 *WriteFileName; + UINT32 WriteFileSize; +} PROGRAM_INFO; + +// Headers +SHELL_STATUS +BufferToMemory ( + IN UINT8 *Buffer, + IN UINT32 BufferSize, + OUT UINT8 **MemoryBuffer, + OUT UINT32 *MemoryBufferSize + ); + +SHELL_STATUS +CheckForInvalidOptions ( + IN PROGRAM_INFO *ProgramInfo + ); + +SHELL_STATUS +CheckOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +SHELL_STATUS +DumpHumanOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +VOID +DumpParagraph ( + IN VOID *Ptr, + IN UINTN Count + ); + +VOID +DumpProgramInfo ( + IN PROGRAM_INFO *ProgramInfo + ); + +SHELL_STATUS +DumpRawOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +SHELL_STATUS +EraseOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +UINTN +GetHexOrDecFromString ( + CHAR16 *Arg + ); + +BOOLEAN +IsApolloLake (VOID); + +VOID +ParseParameters ( + IN UINTN Argc, + IN CHAR16 **Argv, + IN PROGRAM_INFO *ProgramInfo + ); + +VOID +PrintChar ( + IN UINT8 Count, + IN CHAR16 *Char +); + +VOID +PrintHelp (VOID); + +EFI_STATUS +ReadFileData ( + IN CHAR16 *FileName, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ); + +SHELL_STATUS +ReadOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +SHELL_STATUS +ScanOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +CHAR16 * +ToLower ( + IN OUT CHAR16 *Str + ); + +SHELL_STATUS +VerifyOption ( + IN PROGRAM_INFO *ProgramInfo + ); + +EFI_STATUS +WriteFileData ( + IN CHAR16 *FileName, + IN UINT8 *Buffer, + IN UINTN BufferSize + ); + +SHELL_STATUS +WriteOption ( + IN PROGRAM_INFO *ProgramInfo + ); + #endif // _EEPROM_APP_H_ \ No newline at end of file diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/E= epromApp.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp= /EepromApp.inf index a13974891b..738404edd1 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromApp/EepromAp= p.inf @@ -50,6 +50,7 @@ PrintLib ShellCEntryLib ShellLib + SteppingLib TimerLib UefiApplicationEntryPoint UefiLib diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinar= y/Docs/EepromLayout.txt b/Platform/BroxtonPlatformPkg/Common/Features/Eepro= m/EepromBinary/Docs/EepromLayout.txt index 7a4f004ecd..037303081d 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Docs/= EepromLayout.txt +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Docs/= EepromLayout.txt @@ -13,8 +13,8 @@ # ## -Version: 1.10 -Dated: 07-31-2018 +Version: 1.11 +Dated: 09-11-2018 - The first 4KB of the EEPROM data MUST be accessible from I2C bus gPlatformModuleTokenSpaceGuid.PcdEepromBus, address @@ -80,25 +80,14 @@ Dated: 07-31-2018 - If characters in a Signature[8] or a Label[16] don't fill the entire allo= cated length, append string with $ as a sentinel value. IE - Signature[8] : "$uCode" s= hall be "$uCode$" -- If there is a valid binary in both the FV and EEPROM, BIOS will use the = following rules to determine - which one to load into memory and use: - - It is assumed that the FV and EEPROM binaries have both passed sanity = checks. - - CRC32 passes - - Hash and signed hash passes if present - - If the following fields are not equal, then the FV is assumed to have = priority: - - $BrdInfo.ManuName - - $BrdInfo.BrdName - - $BrdInfo.BoardId - - $BrdInfo.FabId - - $BrdInfo.EcId - - $BrdInfo.BoardType - - If the $BrdInfo test passes, then priority is given to the image with = the greater $Eeprom$.Version. - - If the $BrdInfo test passes and $Eeprom$.Version are equal, then use t= he FV due to speed concerns. +- If there is a valid binary in both the FV and EEPROM, BIOS will use the = image with the greater + $Eeeprom$.Version. - Due to the size of OpenSSL, it is unavailable in PEI for verifying the h= ash and/or signature in $PromSig. As such, the $PromSig data, if present, is stored in a NvStora= ge variable for use in PEI. It will be checked and if needed, updated each boot in DXE. If it change= s, then BIOS will reboot to - ensure that the PEI integrity check passes. + ensure that the PEI integrity check passes. Please note that on some sys= tems, this variable is + unavailable until after memory has been initialized. Generic header structure diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinar= y/ReadMe.txt b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBin= ary/ReadMe.txt index d161e4d51d..916e61bef5 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/ReadM= e.txt +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/ReadM= e.txt @@ -184,6 +184,8 @@ EepromApp.efi gPlatformModuleTokenSpaceGuid.PcdEepromInMemoryFlag|0|BOOLEAN|0xEEEE00= 06 ## Flag to tell if EEPROM Map is in HOB gPlatformModuleTokenSpaceGuid.PcdEepromMapHobValid|0|BOOLEAN|0xEEEE000= 7 + ## Flag to tell if EEPROM image require DXE verification or not + gPlatformModuleTokenSpaceGuid.PcdEepromDxeVerificationRequired|0|BOOLE= AN|0xEEEE0008 [PcdsFixedAtBuild] ## I2C bus the master EEPROM is hanging on @@ -200,6 +202,9 @@ EepromApp.efi gPlatformModuleTokenSpaceGuid.PcdEepromFvImageFile|{0xAC, 0x3D, 0xBD, = 0xBF, 0xEB, 0x01, 0xEB, 0x4F, 0xA9, 0xDE, 0xBC, 0xC9, 0xD1, 0xBA, 0x55, 0x3= 1}|VOID*|0xEEEE2004 ## GPIO PAD whitelist | END OF ARRAY | gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList|{0xFF, 0xFF, 0xFF, 0xFF= }|VOID*|0xEEEE2005 + ## EEPROM security violation policy action + ## 0x00 - CPU dead loop + gPlatformModuleTokenSpaceGuid.PcdEepromSecurityViolationPolicy|0x00|UI= NT8|0xEEEE2006 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinar= y/Utilities/ScrapDramPolicyPpi.py b/Platform/BroxtonPlatformPkg/Common/Feat= ures/Eeprom/EepromBinary/Utilities/ScrapDramPolicyPpi.py new file mode 100644 index 0000000000..13e28ec681 --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromBinary/Utili= ties/ScrapDramPolicyPpi.py @@ -0,0 +1,95 @@ +# @file +# Scraps the debug log to generate the DRAM_POLICY_PPI data file for the = EEPROM image. +# +# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may = be found at +# http://opensource.org/licenses/bsd-license.php. +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# + +import sys + +# Version defines +__version__ =3D '0.1.0.0' +VerString =3D 'Scrap the debug log for the DRAM_POLICY_PPI data, Version= #{0}'.format(__version__) + +# Global defines +DebugFlag =3D False +StartingMarker =3D 'DRAM_POLICY_PPI dump' + +def Main(): + # Assume failure + ReturnCode =3D 1 + + if DebugFlag: + index =3D 1 + while len(sys.argv) > index - 1: + print('sys.argv[{0}] =3D {1}'.format(index - 1, sys.argv[index - 1])= ) + index +=3D 1 + + if len(sys.argv) < 3: + print('Useage: ScrapDramPolicyPpi DebugLog OutputFile') + return 1 + + DebugLogPath =3D sys.argv[1] + OutputFilePath =3D sys.argv[2] + if DebugFlag: + print('DebugLogPath =3D {0}'.format(DebugLogPath)) + print('OutputFilePath =3D {0}'.format(OutputFilePath)) + + # Assume failure + LogFile =3D None + OutputFile =3D None + + try: + # Open the files + LogFile =3D open(DebugLogPath, "r") + OutputFile =3D open(OutputFilePath, "wb") + + # Search the Log file for the marker and then scrap the data + ByteCount =3D 0 + MarkerFoundFlag =3D False + for LogLine in LogFile: + if StartingMarker in LogLine: + # Beginning of data found + MarkerFoundFlag =3D True + if len(LogLine) =3D=3D 1: + # End of data found + MarkerFoundFlag =3D False + if MarkerFoundFlag: + # Parse data to write out to the binary file + if LogLine.startswith(' | '): + # This is valid data line. Parse it. + LogLine =3D LogLine.split(' ') + PipeCount =3D 0 + for element in LogLine: + if element =3D=3D '|': + PipeCount +=3D 1 + elif (PipeCount =3D=3D 2) and (len(element) > 0): + # Print out what we are writing to the file + print('0x{0:02X} - 0x{1}'.format(ByteCount, element)) + # Write it to the file + OutputFile.write(str(chr(int(element, 16)))) + # Increment the byte counter + ByteCount +=3D 1 + + # Clear the return flag + ReturnCode =3D 0 + + finally: + # Close files + if LogFile is not None: + LogFile.close() + if OutputFile is not None: + OutputFile.close() + return ReturnCode + +if __name__ =3D=3D "__main__": + print '' + print(VerString) + sys.exit (Main()) diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/EEPROM/EepromDataEepromLib.c b/Platform/BroxtonPlatformPkg/Common/Featur= es/Eeprom/EepromDataLib/EEPROM/EepromDataEepromLib.c index 09171fd861..5c97036e81 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/EepromDataEepromLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/EEPR= OM/EepromDataEepromLib.c @@ -90,9 +90,11 @@ CreateBlockList ( // // Dump this block of info // - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Addres= s =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Address)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset= =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Offset)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Size = =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Size)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Address =3D 0x%08x\n", __FUNCTION= __, __LINE__, BlockList->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D 0x%08x\n", __FUNCTION= __, __LINE__, BlockList->Offset)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Size =3D 0x%08x\n", __FUNCTION= __, __LINE__, BlockList->Size)); + } // // New address range, create new PageList. // @@ -125,9 +127,11 @@ CreateBlockList ( // // Dump this block of info // - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Address = =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Address)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset = =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Offset)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Size = =3D 0x%08x\n", __FUNCTION__, __LINE__, BlockList->Size)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Address =3D 0x%08x\n", __FUNCTION__, = __LINE__, BlockList->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D 0x%08x\n", __FUNCTION__, = __LINE__, BlockList->Offset)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Size =3D 0x%08x\n", __FUNCTION__, = __LINE__, BlockList->Size)); + } // // Insert last record // @@ -189,33 +193,39 @@ DumpEepromMap (VOID) LIST_ENTRY *MapNode; LIST_ENTRY *PartNode; - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting\n= ", __FUNCTION__, __LINE__)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPar= tsHeadLink =3D 0x%08x\n", __FUNCTION__, __LINE__, gEepromPartsHeadLink)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HeadLink= ->ForwardLink =3D 0x%08x\n", __FUNCTION__, __LINE__, gEepromPartsHeadLink->= ForwardLink)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HeadLink= ->BackLink =3D 0x%08x\n", __FUNCTION__, __LINE__, gEepromPartsHeadLink->= BackLink)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPar= ts =3D 0x%08x\n", __FUNCTION__, __LINE__, gEepromParts)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting\n", __FUNCTION__, __LINE__))= ; + DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPartsHeadLink =3D 0x%08x\n", _= _FUNCTION__, __LINE__, gEepromPartsHeadLink)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - HeadLink->ForwardLink =3D 0x%08x\n"= , __FUNCTION__, __LINE__, gEepromPartsHeadLink->ForwardLink)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - HeadLink->BackLink =3D 0x%08x\n"= , __FUNCTION__, __LINE__, gEepromPartsHeadLink->BackLink)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromParts =3D 0x%08x\n", _= _FUNCTION__, __LINE__, gEepromParts)); + } if ((gEepromParts !=3D NULL) && (gEepromPartsHeadLink !=3D NULL)) { PartNode =3D GetFirstNode (gEepromPartsHeadLink); do { CurrentEepromParts =3D EEPROM_PART_INFO_FROM_THIS (PartNode); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Part= Node =3D %08x HeadLink =3D %08x\n", __FUNCTION__, __LINE__, Pa= rtNode, gEepromPartsHeadLink)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM bus number =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->BusNumber)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM address =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->Address)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM speed =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->PartSpeed)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM part size =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->PartSize)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM block length =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->BlockLength)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM page size =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->PageSize)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM master map =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->Master)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - PartNode =3D %08x = HeadLink =3D %08x\n", __FUNCTION__, __LINE__, PartNode, gEepromPartsHeadLin= k)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM bus number =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->BusNumber)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM address =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM speed =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->PartSpeed)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM part size =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->PartSize)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM block length =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->BlockLength)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM page size =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->PageSize)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM master map =3D 0x%08x\= n", __FUNCTION__, __LINE__, CurrentEepromParts->Master)); + } // // Dump map records // MapNode =3D GetFirstNode (&CurrentEepromParts->MapHeadLink); do { CurrentEepromMap =3D EEPROM_MAP_INFO_FROM_THIS (MapNode); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = MapNode =3D %08x HeadLink =3D %08x\n", __FUNCTION__, __LINE__, MapNode, &= CurrentEepromParts->MapHeadLink)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - Address =3D 0x%08x\n", __FUNC= TION__, __LINE__, CurrentEepromMap->Address)); - DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D 0x%08x\n", __FUNC= TION__, __LINE__, CurrentEepromMap->Offset)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - MapNode =3D %08x HeadLink= =3D %08x\n", __FUNCTION__, __LINE__, MapNode, &CurrentEepromParts->MapHead= Link)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Address =3D 0x%08x\n", __FU= NCTION__, __LINE__, CurrentEepromMap->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D 0x%08x\n", __FU= NCTION__, __LINE__, CurrentEepromMap->Offset)); + } // // Get next record // @@ -227,7 +237,7 @@ DumpEepromMap (VOID) PartNode =3D GetNextNode (gEepromPartsHeadLink, PartNode); } while (!IsNull (gEepromPartsHeadLink, PartNode)); } else { - DEBUG ((DEBUG_INFO, "%a (#%4d) - WARNING: gEepromParts or gEepromParts= HeadLink is bad!\n", __FUNCTION__, __LINE__)); + DEBUG ((DEBUG_ERROR, "%a (#%4d) - WARNING: gEepromParts or gEepromPart= sHeadLink is bad!\n", __FUNCTION__, __LINE__)); } } @@ -441,12 +451,14 @@ FillEepromMap ( CurrentEepromParts->BlockLength =3D EepromHeader->blklength; CurrentEepromParts->PageSize =3D EepromHeader->pagesize; CurrentEepromParts->Master =3D EepromHeader->master; - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= bus number =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Bu= sNumber)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= address =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Ad= dress)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= speed =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Pa= rtSpeed)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= part size =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Pa= rtSize)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= block length =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Bl= ockLength)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM= master map =3D 0x%08x\n", __FUNCTION__, __LINE__, CurrentEepromParts->Ma= ster)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM bus number =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->BusNumber)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM address =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM speed =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->PartSpeed)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM part size =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->PartSize)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM block length =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->BlockLength)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM master map =3D 0x%08x\n"= , __FUNCTION__, __LINE__, CurrentEepromParts->Master)); + } Status =3D EFI_SUCCESS; break; } @@ -499,9 +511,11 @@ FillEepromMap ( CurrentEepromMap->Signature =3D EEPROM_MAP_INFO_SIGNATURE; CurrentEepromMap->Address =3D MapRecord->address; CurrentEepromMap->Offset =3D MapRecord->offset; - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = Map[%04x] =3D %08x\n", __FUNCTION__, __LINE__, index, CurrentEepromMap)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Addr= ess[%04x] =3D %08x\n", __FUNCTION__, __LINE__, index, CurrentEepromMap->Add= ress)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Off= set[%04x] =3D %08x\n", __FUNCTION__, __LINE__, index, CurrentEepromMap->Off= set)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Map[%04x] =3D %08x\n", __FU= NCTION__, __LINE__, index, CurrentEepromMap)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Address[%04x] =3D %08x\n", __FU= NCTION__, __LINE__, index, CurrentEepromMap->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset[%04x] =3D %08x\n", __FU= NCTION__, __LINE__, index, CurrentEepromMap->Offset)); + } // // Insert record // @@ -640,10 +654,12 @@ I2cReadPages ( PageSize =3D EepromPartInfo->PageSize; PartSpeed =3D EepromPartInfo->PartSpeed; } - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Bus = =3D %02x Address =3D %02x\n", __FUNCTION__, __LINE__, Bus, Ad= dress)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset = =3D %08x Size =3D %08x\n", __FUNCTION__, __LINE__, Offset, Size)= ); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize = =3D %02x PartSpeed =3D %02x\n", __FUNCTION__, __LINE__, PageSiz= e, PartSpeed)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Buffer = =3D %08x\n", __FUNCTION__, __LINE__, Buffer)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Bus =3D %02x Address= =3D %02x\n", __FUNCTION__, __LINE__, Bus, Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D %08x Size = =3D %08x\n", __FUNCTION__, __LINE__, Offset, Size)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize =3D %02x PartSpe= ed =3D %02x\n", __FUNCTION__, __LINE__, PageSize, PartSpeed)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Buffer =3D %08x\n", __FUNCTION_= _, __LINE__, Buffer)); + } // // Init I2C controller // @@ -676,10 +692,12 @@ I2cReadPages ( // ReadCount =3D PageSize - (CurrentOffset % PageSize); } - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Size = =3D %08x\n", __FUNCTION__, __LINE__, Size)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - CurrentC= ount =3D %08x\n", __FUNCTION__, __LINE__, CurrentCount)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize= =3D %08x\n", __FUNCTION__, __LINE__, PageSize)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - ReadCoun= t =3D %08x\n", __FUNCTION__, __LINE__, ReadCount)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Size =3D %08x\n", __FUNCTIO= N__, __LINE__, Size)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - CurrentCount =3D %08x\n", __FUNCTIO= N__, __LINE__, CurrentCount)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize =3D %08x\n", __FUNCTIO= N__, __LINE__, PageSize)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - ReadCount =3D %08x\n", __FUNCTIO= N__, __LINE__, ReadCount)); + } // // Set offset // @@ -808,10 +826,12 @@ I2cWritePages ( PageSize =3D EepromPartInfo->PageSize; PartSpeed =3D EepromPartInfo->PartSpeed; } - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Bus = =3D %02x Address =3D %02x\n", __FUNCTION__, __LINE__, Bus, Ad= dress)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset = =3D %08x Size =3D %08x\n", __FUNCTION__, __LINE__, Offset, Size)= ); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize = =3D %02x PartSpeed =3D %02x\n", __FUNCTION__, __LINE__, PageSiz= e, PartSpeed)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Buffer = =3D %08x\n", __FUNCTION__, __LINE__, Buffer)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Bus =3D %02x Address= =3D %02x\n", __FUNCTION__, __LINE__, Bus, Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Offset =3D %08x Size = =3D %08x\n", __FUNCTION__, __LINE__, Offset, Size)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize =3D %02x PartSpe= ed =3D %02x\n", __FUNCTION__, __LINE__, PageSize, PartSpeed)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Buffer =3D %08x\n", __FUNCTION_= _, __LINE__, Buffer)); + } // // Init I2C controller // @@ -848,10 +868,12 @@ I2cWritePages ( // WriteCount =3D PageSize - (CurrentOffset % PageSize); } - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Size = =3D %08x\n", __FUNCTION__, __LINE__, Size)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - CurrentC= ount =3D %08x\n", __FUNCTION__, __LINE__, CurrentCount)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize= =3D %08x\n", __FUNCTION__, __LINE__, PageSize)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - WriteCou= nt =3D %08x\n", __FUNCTION__, __LINE__, WriteCount)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Size =3D %08x\n", __FUNCTIO= N__, __LINE__, Size)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - CurrentCount =3D %08x\n", __FUNCTIO= N__, __LINE__, CurrentCount)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - PageSize =3D %08x\n", __FUNCTIO= N__, __LINE__, PageSize)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - WriteCount =3D %08x\n", __FUNCTIO= N__, __LINE__, WriteCount)); + } // // Set offset // @@ -985,11 +1007,13 @@ ReadEepromBlockList ( // Read in a block // CurrentBlockList =3D BLOCK_LIST_FROM_THIS (Node); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = buffer @ %08x\n", __FUNCTION__, __LINE__, Buffer)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = bus =3D %08x\n", __FUNCTION__, __LINE__, EepromInfo->Bus)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = address =3D %08x\n", __FUNCTION__, __LINE__, CurrentBlockList->Address= )); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = offset =3D %08x\n", __FUNCTION__, __LINE__, CurrentBlockList->Offset)= ); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - = ptr @ %08x\n", __FUNCTION__, __LINE__, Ptr)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - buffer @ %08x\n", __F= UNCTION__, __LINE__, Buffer)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - bus =3D %08x\n", _= _FUNCTION__, __LINE__, EepromInfo->Bus)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - address =3D %08x\n", _= _FUNCTION__, __LINE__, CurrentBlockList->Address)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - offset =3D %08x\n", _= _FUNCTION__, __LINE__, CurrentBlockList->Offset)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - ptr @ %08x\n", __F= UNCTION__, __LINE__, Ptr)); + } Status =3D I2cReadPages (EepromInfo->Bus, CurrentBlockList->Address, C= urrentBlockList->Offset, CurrentBlockList->Size, Ptr); if (EFI_ERROR (Status)) { goto Exit; @@ -1361,9 +1385,11 @@ SearchEepromPartList ( EEPROM_PART_INFO *EepromPartInfo; LIST_ENTRY *Node; - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting\n= ", __FUNCTION__, __LINE__)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPar= ts =3D %08x\n", __FUNCTION__, __LINE__, gEepromParts)); - if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPar= tsHeadLink =3D %08x\n", __FUNCTION__, __LINE__, gEepromPartsHeadLink)); + if (mEepromDataLibDebugFlag) { + DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting\n", __FUNCTION__, __LINE__))= ; + DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromParts =3D %08x\n", __F= UNCTION__, __LINE__, gEepromParts)); + DEBUG ((DEBUG_INFO, "%a (#%4d) - gEepromPartsHeadLink =3D %08x\n", __F= UNCTION__, __LINE__, gEepromPartsHeadLink)); + } // // Sanity checks @@ -1451,7 +1477,7 @@ WriteEepromBlockList ( // // Write data from buffer // - DEBUG ((DEBUG_INFO, "%a (#%4d) - Writing to EEPROM...\n", __FUNCTION__, = __LINE__)); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Writing to= EEPROM...\n", __FUNCTION__, __LINE__)); Node =3D GetFirstNode (&BlockListHead->Link); do { // diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/FV/EepromDataFvLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eepro= m/EepromDataLib/FV/EepromDataFvLib.c index c503a83720..1060fc2aa8 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/E= epromDataFvLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/E= epromDataFvLib.c @@ -74,6 +74,7 @@ ReadEepromFv ( &Address, &FvSize ); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - GetImage(%= g) --> %r\n", __FUNCTION__, __LINE__, FvSectionGuid, Status)); if (!EFI_ERROR (Status)) { // @@ -81,14 +82,14 @@ ReadEepromFv ( // if (Address !=3D NULL) { Ptr =3D Address; - DEBUG ((DEBUG_INFO, "%a (#%4d) - Found EEPROM image @ 0x%08x.\n", __= FUNCTION__, __LINE__, Address)); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Found = EEPROM image @ 0x%08x.\n", __FUNCTION__, __LINE__, Address)); if (*Size =3D=3D 0) { // // Nothing to copy, return FV EEPROM size. // *Size =3D (UINT32) FvSize; Status =3D EFI_BUFFER_TOO_SMALL; - DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPROM size =3D 0x%08x\n", __FUNC= TION__, __LINE__, *Size)); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - EEPR= OM size =3D 0x%08x\n", __FUNCTION__, __LINE__, *Size)); } else { // // Figure out the correct buffer size. @@ -115,7 +116,7 @@ ReadEepromFv ( } } } - DEBUG ((DEBUG_INFO, "%a (#%4d) - Copying 0x%08x bytes of data star= ting at offset 0x%08x...\n", __FUNCTION__, __LINE__, *Size, Offset)); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Copy= ing 0x%08x bytes of data starting at offset 0x%08x...\n", __FUNCTION__, __L= INE__, *Size, Offset)); if (*Size > 0) { // // Asking to copy something diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataL= ib/FV/GetImage.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eepro= mDataLib/FV/GetImage.c index 434d9d9496..0384f7789b 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/G= etImage.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromDataLib/FV/G= etImage.c @@ -1,5 +1,5 @@ /** @file - FV EEPROM raw data library instance. + DXE GetImage code for FV EEPROM raw data library instance. Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
@@ -32,12 +32,12 @@ GetImage ( EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; EFI_HANDLE *HandleBuffer; UINTN HandleCount; - EFI_FIRMWARE_VOLUME2_PROTOCOL *ImageFv; UINTN Index; EFI_STATUS Status; + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting..= .\n", __FUNCTION__, __LINE__)); + Status =3D EFI_NOT_FOUND; - ImageFv =3D NULL; Status =3D gBS->LocateHandleBuffer ( ByProtocol, @@ -46,6 +46,7 @@ GetImage ( &HandleCount, &HandleBuffer ); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - LocateHand= leBuffer(gEfiFirmwareVolume2ProtocolGuid)[%d] --> %r\n", __FUNCTION__, __LI= NE__, HandleCount, Status)); if (EFI_ERROR (Status)) { // // Couldn't find the FV2 protocol. Bail. @@ -62,12 +63,10 @@ GetImage ( &gEfiFirmwareVolume2ProtocolGuid, (VOID **) &Fv ); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - HandlePr= otocol(gEfiFirmwareVolume2ProtocolGuid) --> %r\n", __FUNCTION__, __LINE__, = Status)); if (EFI_ERROR (Status)) { goto Exit; } - if ((ImageFv !=3D NULL) && (Fv =3D=3D ImageFv)) { - continue; - } // // Found an FV, try to find file. @@ -83,6 +82,7 @@ GetImage ( Size, &AuthenticationStatus ); + if (mEepromDataLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Fv->Read= Section() --> %r\n", __FUNCTION__, __LINE__, Status)); if (!EFI_ERROR (Status)) { // // Found the file. Bail. @@ -98,7 +98,7 @@ GetImage ( // // Nope. Clear buffer and size, then bail. // - *Buffer =3D NULL; + *Buffer =3D EepromFreePool (*Buffer); *Size =3D 0; Status =3D EFI_NOT_FOUND; } else { @@ -106,9 +106,6 @@ GetImage ( } Exit: - if (HandleBuffer !=3D NULL) { - FreePool (HandleBuffer); - HandleBuffer =3D NULL; - } + EepromFreePool (HandleBuffer); return Status; } diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.c index adf5df63aa..d469d5c803 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.c @@ -15,10 +15,9 @@ #include "EepromLib.h" -BOOLEAN *gImageValidFlag; UINT32 mCrcTableEeprom[256]; BOOLEAN mCrcInitFlag =3D FALSE; -BOOLEAN mEepromLibDebugFlag =3D TRUE; +BOOLEAN mEepromLibDebugFlag =3D FALSE; /** This internal function reverses bits for 32bit data. @@ -159,10 +158,140 @@ EepromCalculateCrc32 ( return EFI_SUCCESS; } +VOID +EepromPrintChar ( + IN UINTN DebugMask, + IN UINTN Count, + IN CHAR16 *Char +) +{ + UINTN Index; + + for (Index =3D 0; Index < Count; Index++) { + DEBUG ((DebugMask, "%s", Char)); + } +} + +#define DIVIDING_LINE "+--------------------------------------------------= --+------------------+\n" + +VOID +EepromDumpParagraph ( + IN UINTN DebugMask, + IN VOID *Ptr, + IN UINTN Count + ) +{ + CHAR8 AsciiBuffer[17]; + UINT8 *Data; + UINTN Index; + UINTN Paragraphs; + UINTN PlaceHolder; + UINTN PlaceHolders; + + // + // Use a different pointer so that the one passed in doesn't change + // + Data =3D (UINT8 *) Ptr; + // + // Calcualte the number of paragraphs + // + Paragraphs =3D Count / 16; + if ((Paragraphs * 16) < Count) { + Paragraphs++; + } + // + // Calculate the number of columns + // + PlaceHolder =3D Paragraphs; + PlaceHolders =3D 0; + while (PlaceHolder > 0) { + PlaceHolders++; + PlaceHolder >>=3D 4; + } + + // + // Dump the buffer + // + if (Count > 0 ) { + // + // Print header + // + EepromPrintChar (DebugMask, PlaceHolders + 5, L" "); + DEBUG ((DebugMask, DIVIDING_LINE)); + EepromPrintChar (DebugMask, PlaceHolders + 5, L" "); + DEBUG ((DebugMask, "| x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE = xF | String |\n")); + DEBUG ((DebugMask, " +")); + EepromPrintChar (DebugMask, PlaceHolders + 3, L"-"); + DEBUG ((DebugMask, DIVIDING_LINE)); + // + // Print data + // + for (Index =3D 0; Index < (Paragraphs * 16); Index++) { + // + // Print divider + // + if (Index % 0x10 =3D=3D 0x00) { + if ((Index > 0) && ((Index / 0x10) % 0x04 =3D=3D 0x00) && (Paragra= phs > 6)) { + DEBUG ((DebugMask, " +")); + EepromPrintChar (DebugMask, PlaceHolders + 3, L"-"); + DEBUG ((DebugMask, DIVIDING_LINE)); + } + DEBUG ((DebugMask, " | %0*xx | ", PlaceHolders, (Index / 0x10))); + } + // + // Print the data or a filler + // + if (Index < Count) { + DEBUG ((DebugMask, "%02x ", Data[Index])); + if ((Data[Index] < 32) || (Data[Index] > 126)) { + // + // Not printable + // + AsciiBuffer[(Index % 0x10)] =3D '.'; + } else { + // + // Printable + // + AsciiBuffer[(Index % 0x10)] =3D Data[Index]; + } + } else { + DEBUG ((DebugMask, " ")); + AsciiBuffer[(Index % 0x10)] =3D ' '; + } + // + // Print break or line end if needed + // + if (Index % 0x10 =3D=3D 0x0F) { + AsciiBuffer[16] =3D 0x00; + DEBUG ((DebugMask, "| %a |\n", AsciiBuffer)); + } else if (Index % 0x04 =3D=3D 0x03) { + DEBUG ((DebugMask, " ")); + } + } + // + // Print footer + // + DEBUG ((DebugMask, " +")); + EepromPrintChar (DebugMask, PlaceHolders + 3, L"-"); + DEBUG ((DebugMask, DIVIDING_LINE)); + } +} + +// +// Desc: Registers the raw data libraries +// Variables: None +// Return: EFI_SUCCESS, anything else will cause an ASSERT +// EFI_STATUS EFIAPI -EepromLibNemToMemory (VOID) +EepromInitConstructor (VOID) { + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting...\n"= , __FUNCTION__, __LINE__)); + // + // Initiliaze CRC32 tables + // + if (!mCrcInitFlag) InitializeCrc32Table (); + return EFI_SUCCESS; } @@ -174,6 +303,8 @@ EraseEeprom ( { UINT8 *Buffer; EEPROM_FUNCTION_INFO EepromInfo; + BOOLEAN *ImageValidFlags; + UINTN PcdPtrSize; UINT32 Size; EFI_STATUS Status; @@ -188,6 +319,8 @@ EraseEeprom ( EepromInfo.LibraryIndex =3D EEPROM_EEPROM; Size =3D sizeof (GENERIC_HEADER); Buffer =3D EepromAllocatePool (Size); + ImageValidFlags =3D (BOOLEAN *) PcdGetPtr (PcdEepromLibraryValid= ); + PcdPtrSize =3D PcdGetSize (PcdEepromLibraryValid); // // Sanity checks @@ -217,7 +350,7 @@ EraseEeprom ( // // Clear the valid status for this image. // - gImageValidFlag[LibraryIndex] =3D FALSE; + ImageValidFlags[LibraryIndex] =3D FALSE; Exit: // @@ -227,14 +360,30 @@ Exit: if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - Ending with %r\n", __FUNCTION__, __L= INE__, Status)); } + PcdSetPtr (PcdEepromLibraryValid, &PcdPtrSize, ImageValidFlags); return Status; } +/** + Returns the EEPROM structure data + + @param[in] LibraryIndex Which library to use to get the str= ucture + @param[in] Signature Signature of the structure we are l= ooking for + @param[out] StructureIndex Index of where to start looking for= the next structure + @param[out] Buffer Buffer containing the structure dat= a + NOTE: Caller is responsible for fre= eing this memory. + @param[out] Size Size of the StructureData buffer + + @retval EFI_SUCCESS Structure data found + @retval EFI_NOT_FOUND Structure data not found + @retval EFI_INVALID_PARAMETER Invalid parameter passed in +**/ EFI_STATUS EFIAPI GetEepromStructure ( IN UINT8 LibraryIndex, IN OUT CHAR8 Signature[EEPROM_SIGNATURE_SIZE], + IN OUT UINT32 *StructureIndex, IN OUT UINT8 **Buffer, IN OUT UINT32 *Size ) @@ -278,7 +427,11 @@ GetEepromStructure ( // // Start at the beginning structure and loop thru the image looking for = the requested structure // - Index =3D 0; + if (StructureIndex =3D=3D NULL) { + Index =3D 0; + } else { + Index =3D *StructureIndex; + } while (!EFI_ERROR (Status)) { // // Make sure buffer is empty @@ -294,6 +447,7 @@ GetEepromStructure ( // // This is our structure. Bail. // + if (StructureIndex !=3D NULL) *StructureIndex =3D Index; goto Exit; } } @@ -315,6 +469,102 @@ Exit: return Status; } +/** + Returns the EEPROM structure data + + @param[in] LibraryIndex Which library to use to get the str= ucture + @param[in] Signature Signature of the structure we are l= ooking for + @param[out] StructureIndex Index of where to start looking for= the next structure + @param[in] HeaderSize Size of the structure header + @param[out] StructureHeader Header of the structure we're looki= ng for + NOTE: Caller is responsible for fre= eing this memory. + @param[out] StructureData Buffer containing the structure dat= a + @param[out] DataSize Size of the StructureData buffer + + @retval EFI_SUCCESS Structure data found + @retval EFI_NOT_FOUND Structure data not found + @retval EFI_INVALID_PARAMETER Invalid parameter passed in +**/ +EFI_STATUS +EFIAPI +GetEepromStructureData ( + IN UINT8 *LibraryIndex, + IN CHAR8 Signature[EEPROM_SIGNATURE_SIZE], + IN OUT UINT32 *StructureIndex, + IN UINT32 HeaderSize, + OUT UINT8 **StructureHeader, + OUT UINT8 **StructureData, + OUT UINT32 *DataSize + ) +{ + CHAR8 AsciiData[32]; + UINT8 EepromLibrary; + GENERIC_HEADER *Header; + UINT32 Index; + UINT32 Size; + EFI_STATUS Status; + + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Starting...\n",= __FUNCTION__, __LINE__)); + + // + // Return the structure data + // 1. Get valid EEPROM library index + // 2. Find structure + // 3. Return structure data + // + if (StructureIndex =3D=3D NULL) { + Index =3D 0; + } else { + Index =3D *StructureIndex; + } + if (LibraryIndex =3D=3D NULL) { + EepromLibrary =3D GetValidEepromLibrary (FALSE); + } else { + EepromLibrary =3D *LibraryIndex; + } + if (EepromLibrary =3D=3D EEPROM_NULL) { + DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); + Status =3D EFI_NOT_FOUND; + } else { + Header =3D NULL; + Size =3D 0; + Status =3D GetEepromStructure (EepromLibrary, Signature, &Index, (UINT= 8 **) &Header, &Size); + if (EFI_ERROR (Status) || (Size =3D=3D 0)) { + DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the %a structure= in the EERPOM binary!\n", __FUNCTION__, __LINE__, Signature)); + Status =3D EFI_NOT_FOUND; + } else { + Size =3D Header->length - HeaderSize; + if (StructureHeader !=3D NULL) *StructureHeader =3D (UINT8 *) Header= ; + if (StructureData !=3D NULL) { + if (Size =3D=3D 0) { + *StructureData =3D NULL; + } else { + *StructureData =3D (UINT8 *) Header + HeaderSize; + } + } + if (DataSize !=3D NULL) *DataSize =3D Size; + if (StructureIndex !=3D NULL) *StructureIndex =3D Index; + if (mEepromLibDebugFlag) { + ZeroMem (AsciiData, 32); + CopyMem (AsciiData, Header->signature, 8); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Signature =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Version =3D %04x:%04x\n", __F= UNCTION__, __LINE__, Header->vermajor, Header->verminor)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Length =3D 0x%08x\n", __F= UNCTION__, __LINE__, Header->length)); + } + Status =3D EFI_SUCCESS; + } + } + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returning %r...= \n", __FUNCTION__, __LINE__, Status)); + return Status; +} + +/** + Returns the EEPROM image size + + @param[in] LibraryIndex Which library to use to get the struct= ure + + @retval UINT32 Size of that image +**/ UINT32 EFIAPI GetImageSize ( @@ -365,6 +615,7 @@ GetImageSize ( // // Didn't find size. // + Size =3D 0; Status =3D EFI_NOT_FOUND; goto Exit; } @@ -537,28 +788,36 @@ GetValidEepromLibrary ( IN BOOLEAN CopyToMemory ) { + BOOLEAN DxeEepromSecurityFlag; UINT8 *EepromAutoList; EEPROM_FUNCTION_INFO EepromInfo; + UINT8 FirstPassImage; UINT8 FirstValidImage; UINT8 *ImageBuffer; UINT32 ImageSize; + BOOLEAN *ImageValidFlags; UINT8 index; UINT8 Library; + UINTN PcdPtrSize; UINT32 Size; EFI_STATUS Status; - if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting...\n"= , __FUNCTION__, __LINE__)); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting[%d]..= .\n", __FUNCTION__, __LINE__, PcdGetBool (PcdEepromDxeVerificationRequired)= )); // // Initialize variables // ZeroMem (&EepromInfo, sizeof (EEPROM_FUNCTION_INFO)); + DxeEepromSecurityFlag =3D PcdGetBool (PcdEepromDxeVerificationRequired= ); EepromAutoList =3D (UINT8 *) PcdGetPtr (PcdEepromAutoPriority); EepromInfo.Bus =3D PcdGet8 (PcdEepromBus); EepromInfo.Address =3D PcdGet8 (PcdEepromAddress); EepromInfo.LibraryIndex =3D EEPROM_EEPROM; + FirstPassImage =3D EEPROM_NULL; FirstValidImage =3D EEPROM_NULL; ImageBuffer =3D NULL; + ImageValidFlags =3D (BOOLEAN *) PcdGetPtr (PcdEepromLibraryValid= ); + PcdPtrSize =3D PcdGetSize (PcdEepromLibraryValid); // // Sanity checks @@ -570,6 +829,10 @@ GetValidEepromLibrary ( } // + // Display current stack pointer + // + if (mEepromLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); + // // Loop thru PcdEepromAutoPriority looking for a previously validated im= age. // index =3D 0; @@ -583,7 +846,14 @@ GetValidEepromLibrary ( Library =3D EEPROM_NULL; goto Exit; } - if (gImageValidFlag[Library]) { + if (!InPeiPhase () && DxeEepromSecurityFlag) { + // + // DXE security verifiation required. Clear all the valid flags. + // + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Clearing v= alidation flags.\n", __FUNCTION__, __LINE__)); + ImageValidFlags[Library] =3D FALSE; + } + if (ImageValidFlags[Library]) { // // This library is valid, bail. // @@ -595,8 +865,13 @@ GetValidEepromLibrary ( // index++; } + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - FirstValidImag= e =3D %a\n", __FUNCTION__, __LINE__, mEepromLibraryString[FirstValidImage])= ); // + // Display current stack pointer + // + if (mEepromLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); + // // If nothing is valid, try validating them all // if (FirstValidImage =3D=3D EEPROM_NULL) { @@ -609,13 +884,14 @@ GetValidEepromLibrary ( if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Trying to = validate library %a...\n", __FUNCTION__, __LINE__, mEepromLibraryString[Lib= rary])); Status =3D ValidateEeprom (Library); if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Validating= %a -> %r\n", __FUNCTION__, __LINE__, mEepromLibraryString[Library], Status= )); - if (!EFI_ERROR (Status) || (Status =3D=3D EFI_MEDIA_CHANGED)) { + if (!EFI_ERROR (Status) && (FirstValidImage =3D=3D EEPROM_NULL)) { // // This one is valid. Bail. // - if (FirstValidImage =3D=3D EEPROM_NULL) { - FirstValidImage =3D Library; - } + FirstValidImage =3D Library; + } + if ((Status =3D=3D EFI_MEDIA_CHANGED) && (FirstPassImage =3D=3D EEPR= OM_NULL)) { + FirstPassImage =3D Library; } // // Point to next library @@ -624,88 +900,107 @@ GetValidEepromLibrary ( } } + if (FirstValidImage =3D=3D EEPROM_NULL) { + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - No validated= images found.\n", __FUNCTION__, __LINE__)); + if (InPeiPhase ()) { + // + // We're in PEI and no valid images found. Set flag for DXE security= action. + // + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Set flag f= or DXE security action.\n", __FUNCTION__, __LINE__)); + PcdSetBool (PcdEepromDxeVerificationRequired, TRUE); + } else { + if (DxeEepromSecurityFlag) { + // + // We didn't find a valid image, we're in DXE, and security action= is required. Inform user and perform policy action. + // + DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: No valid images found!\n"= , __FUNCTION__, __LINE__)); + switch (PcdGet8 (PcdEepromSecurityViolationPolicy)) { + case EEPROM_DEADLOOP: + default: + CpuDeadLoop (); + break; + } + } + } + if (FirstPassImage =3D=3D EEPROM_NULL) { + // + // We got nothing, so bail + // + Library =3D EEPROM_NULL; + goto Exit; + } else { + Library =3D FirstPassImage; + goto Exit; + } + } + + // + // Something got validated. + // + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Validated EEPR= OM library. Clear flag.\n", __FUNCTION__, __LINE__)); + PcdSetBool (PcdEepromDxeVerificationRequired, FALSE); + if (!InPeiPhase () && DxeEepromSecurityFlag) { + // + // We verified at least one image. Reset the system. + // + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - We're in DXE= and verification security flag was set, so do a system reset.\n", __FUNCTI= ON__, __LINE__)); + EepromResetSystem (EfiResetWarm); + // + // We shouldn't get here, but have the deadloop to catch it if it does + // + CpuDeadLoop (); + } + + // + // Display current stack pointer + // + if (mEepromLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); // // Determine which image to copy to memory // - if (gImageValidFlag[EEPROM_MEMORY]) { + if (ImageValidFlags[EEPROM_MEMORY]) { // // Yep. Bail. // Library =3D EEPROM_MEMORY; goto Exit; } - if (gImageValidFlag[EEPROM_EEPROM]) { + if (ImageValidFlags[EEPROM_EEPROM]) { Library =3D EEPROM_EEPROM; } - if (gImageValidFlag[EEPROM_FV]) { + if (ImageValidFlags[EEPROM_FV]) { Library =3D EEPROM_FV; } - if (gImageValidFlag[EEPROM_EEPROM] && gImageValidFlag[EEPROM_FV]) { - BOARD_INFO_TABLE *EepromBoardInfo; - BOARD_INFO_TABLE *FvBoardInfo; + if (ImageValidFlags[EEPROM_EEPROM] && ImageValidFlags[EEPROM_FV]) { EEPROM_HEADER *EepromEepromHeader; EEPROM_HEADER *FvEepromHeader; // // Initialize variables // - EepromBoardInfo =3D NULL; EepromEepromHeader =3D NULL; - FvBoardInfo =3D NULL; FvEepromHeader =3D NULL; Library =3D EEPROM_NULL; // - // Get BoardInfo records + // Get EepromHeader records // Size =3D 0; - Status =3D GetEepromStructure (EEPROM_EEPROM, EEPROM_BOARD_INFO_SIGNAT= URE, (UINT8 **) &EepromBoardInfo, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0) || (EepromBoardInfo =3D=3D N= ULL)) { - DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get EEPROM Board = Info structure! (%r)\n", __FUNCTION__, __LINE__, Status)); + Status =3D GetEepromStructure (EEPROM_EEPROM, EEPROM_HEADER_SIGNATURE,= NULL, (UINT8 **) &EepromEepromHeader, &Size); + if (EFI_ERROR (Status) || (Size =3D=3D 0) || (EepromEepromHeader =3D= =3D NULL)) { + DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get EEPROM header= structure! (%r)\n", __FUNCTION__, __LINE__, Status)); Library =3D EEPROM_FV; } else { Size =3D 0; - Status =3D GetEepromStructure (EEPROM_FV, EEPROM_BOARD_INFO_SIGNATUR= E, (UINT8 **) &FvBoardInfo, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0) || (FvBoardInfo =3D=3D NUL= L)) { - DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get FV Board In= fo structure! (%r)\n", __FUNCTION__, __LINE__, Status)); + Status =3D GetEepromStructure (EEPROM_FV, EEPROM_HEADER_SIGNATURE, N= ULL, (UINT8 **) &FvEepromHeader, &Size); + if (EFI_ERROR (Status) || (Size =3D=3D 0) || (FvEepromHeader =3D=3D = NULL)) { + DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get FV header s= tructure! (%r)\n", __FUNCTION__, __LINE__, Status)); Library =3D EEPROM_EEPROM; } else { // - // Compare BoardInfo records + // Compare image versions // - if ((CompareMem (EepromBoardInfo->manuname, FvBoardInfo->manuname,= 16) =3D=3D 0) && - (CompareMem (EepromBoardInfo->brdname, FvBoardInfo->brdname, = 16) =3D=3D 0) && - (EepromBoardInfo->boardid =3D=3D FvBoardInfo->boardid) = && - (EepromBoardInfo->fabid =3D=3D FvBoardInfo->fabid) = && - (EepromBoardInfo->ecid =3D=3D FvBoardInfo->ecid) = && - (EepromBoardInfo->boardtype =3D=3D FvBoardInfo->boardtype)) { - // - // Get EepromHeader records - // - Size =3D 0; - Status =3D GetEepromStructure (EEPROM_EEPROM, EEPROM_HEADER_SIGN= ATURE, (UINT8 **) &EepromEepromHeader, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0) || (EepromEepromHeader= =3D=3D NULL)) { - DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get EEPROM = header structure! (%r)\n", __FUNCTION__, __LINE__, Status)); - Library =3D EEPROM_FV; - } else { - Size =3D 0; - Status =3D GetEepromStructure (EEPROM_FV, EEPROM_HEADER_SIGNAT= URE, (UINT8 **) &FvEepromHeader, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0) || (FvEepromHeader = =3D=3D NULL)) { - DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get FV he= ader structure! (%r)\n", __FUNCTION__, __LINE__, Status)); - Library =3D EEPROM_EEPROM; - } else { - // - // Compare image versions - // - if (EepromEepromHeader->version > FvEepromHeader->version) { - Library =3D EEPROM_EEPROM; - } else { - Library =3D EEPROM_FV; - } - } - } + if (EepromEepromHeader->version > FvEepromHeader->version) { + Library =3D EEPROM_EEPROM; } else { - // - // FV gets priority since BoardInfo data doesn't match - // Library =3D EEPROM_FV; } } @@ -713,11 +1008,13 @@ GetValidEepromLibrary ( // // Free resources // - EepromBoardInfo =3D EepromFreePool (EepromBoardInfo); EepromEepromHeader =3D EepromFreePool (EepromEepromHeader); - FvBoardInfo =3D EepromFreePool (FvBoardInfo); FvEepromHeader =3D EepromFreePool (FvEepromHeader); } + // + // Display current stack pointer + // + if (mEepromLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); // // Check to see if we need to copy into memory and not in PEI @@ -781,15 +1078,20 @@ Exit: // Free resources // ImageBuffer =3D EepromFreePool (ImageBuffer); - if (FirstValidImage =3D=3D EEPROM_NULL) { + if ((FirstValidImage =3D=3D EEPROM_NULL) && (Library =3D=3D EEPROM_NULL)= ) { // // Nothing is valid. Return default NULL. // DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to find a valid image = in list PcdEepromAutoPriority!\n", __FUNCTION__, __LINE__)); - Library =3D EEPROM_NULL; } + // + // Display current stack pointer + // + if (mEepromLibDebugFlag) DisplayStackPointer (__FUNCTION__, __LINE__); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning libr= ary %a\n", __FUNCTION__, __LINE__, mEepromLibraryString[Library])); + PcdSetPtr (PcdEepromLibraryValid, &PcdPtrSize, ImageValidFlags); return Library; } @@ -808,8 +1110,10 @@ ValidateEeprom ( UINT32 HashSize; UINT8 *ImageBuffer; UINT32 ImageSize; + BOOLEAN *ImageValidFlags; UINT32 Offset; UINT32 OriginalCrc32; + UINTN PcdPtrSize; UINT32 Size; EFI_STATUS Status; GENERIC_HEADER *Structure; @@ -829,6 +1133,8 @@ ValidateEeprom ( ImageBuffer =3D NULL; Status =3D EFI_SUCCESS; Structure =3D NULL; + ImageValidFlags =3D (BOOLEAN *) PcdGetPtr (PcdEepromLibraryValid= ); + PcdPtrSize =3D PcdGetSize (PcdEepromLibraryValid); // // Sanity checks @@ -919,7 +1225,7 @@ ValidateEeprom ( // Get $Eeprom$ structure // Size =3D 0; - Status =3D GetEepromStructure (LibraryIndex, EEPROM_HEADER_SIGNATURE, (U= INT8 **) &EepromHeader, &Size); + Status =3D GetEepromStructure (LibraryIndex, EEPROM_HEADER_SIGNATURE, NU= LL, (UINT8 **) &EepromHeader, &Size); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Image is corrupted!\n", __FUN= CTION__, __LINE__)); Status =3D EFI_VOLUME_CORRUPTED; @@ -934,6 +1240,7 @@ ValidateEeprom ( Crc32 =3D StartCrc32 (); Crc32 =3D AddToCrc32 (EepromHeader, Size, Crc32); Offset =3D Size; + EepromHeader =3D EepromFreePool (EepromHeader); // // Add the rest of the binary // @@ -958,6 +1265,7 @@ ValidateEeprom ( Crc32 =3D AddToCrc32 (ImageBuffer, Size, Crc32); } } + ImageBuffer =3D EepromFreePool (ImageBuffer); Crc32 =3D FinishCrc32 (Crc32); if (OriginalCrc32 !=3D Crc32) { // @@ -967,7 +1275,6 @@ ValidateEeprom ( Status =3D EFI_SECURITY_VIOLATION; goto Exit; } - EepromHeader =3D EepromFreePool (EepromHeader); // // Verify hash @@ -989,42 +1296,17 @@ Exit: // EepromHeader =3D EepromFreePool (EepromHeader); ImageBuffer =3D EepromFreePool (ImageBuffer); - if (EFI_ERROR (Status) && (Status !=3D EFI_MEDIA_CHANGED)) { - gImageValidFlag[LibraryIndex] =3D FALSE; - DEBUG ((DEBUG_ERROR, "%a (#%4d) - Ending with %r\n", __FUNCTION__, __L= INE__, Status)); + if (EFI_ERROR (Status)) { + ImageValidFlags[LibraryIndex] =3D FALSE; + if (Status !=3D EFI_MEDIA_CHANGED) DEBUG ((DEBUG_ERROR, "%a (#%4d) - E= nding with %r\n", __FUNCTION__, __LINE__, Status)); } else { // // Might need to go to a bit flag here to indicate CRC32, hash, and si= gned hash pass. First round in PEI will only be // able to get CRC32 pass since hash is supported by OpenSSL library a= nd it is HUGE. // - gImageValidFlag[LibraryIndex] =3D TRUE; + ImageValidFlags[LibraryIndex] =3D TRUE; } + PcdSetPtr (PcdEepromLibraryValid, &PcdPtrSize, ImageValidFlags); return Status; } -// -// Desc: Registers the raw data libraries -// Variables: None -// Return: EFI_SUCCESS, anything else will cause an ASSERT -// -EFI_STATUS -EFIAPI -EepromInitConstructor (VOID) -{ - if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting...\n"= , __FUNCTION__, __LINE__)); - // - // Initiliaze CRC32 tables - // - if (!mCrcInitFlag) InitializeCrc32Table (); - - // - // Initiliaze Library valid flags pointer from PCD. This uses the fact t= hat the PCD library currently just passes out - // a pointer to it's internal DB. There is no need to update the PCD, si= nce the pointer already points to the internal - // PCD copy. If the PCD library changes to include a CRC check of it's d= ata, then we'll have to start using the PcdSetPtr() - // function to set the internal PCD value. - // - gImageValidFlag =3D PcdGetPtr (PcdEepromLibraryValid); - - return EFI_SUCCESS; -} - diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.h b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.h index 047b5592d7..a1cc4885c8 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.h +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.h @@ -37,6 +37,21 @@ #define MAX_HASH_TYPE 5 #define MAX_DIGEST_SIZE SHA512_DIGEST_SIZE #define EFI_CERT_TYPE_RSA2048_SIZE 256 +#define EEPROM_DEADLOOP 0x00 + +/// +/// FSP Reset Status code +/// These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code +/// @{ came from FspApi.h +#define FSP_STATUS_RESET_REQUIRED_COLD 0x40000001 +#define FSP_STATUS_RESET_REQUIRED_WARM 0x40000002 +#define FSP_STATUS_RESET_REQUIRED_3 0x40000003 +#define FSP_STATUS_RESET_REQUIRED_4 0x40000004 +#define FSP_STATUS_RESET_REQUIRED_5 0x40000005 +#define FSP_STATUS_RESET_REQUIRED_6 0x40000006 +#define FSP_STATUS_RESET_REQUIRED_7 0x40000007 +#define FSP_STATUS_RESET_REQUIRED_8 0x40000008 +/// @} //// //// TypeDefs @@ -49,6 +64,19 @@ //// //// Functions //// +/** + Perform platform related reset in FSP wrapper. + + This function will reset the system with requested ResetType. + + @param[in] FspStatusResetType The type of reset the platform has to per= form. +**/ +VOID +EFIAPI +CallFspWrapperResetSystem ( + IN UINT32 FspStatusResetType + ); + EFI_STATUS EFIAPI EepromCalculateCrc32 ( @@ -59,10 +87,6 @@ EepromCalculateCrc32 ( EFI_STATUS EFIAPI -EepromLibNemToMemory (VOID); - -EFI_STATUS -EFIAPI SignedHashCheck ( IN UINT8 LibraryIndex ); diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib= /EepromLib.inf index b7ccb920aa..35c3cdbdb6 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromLi= b.inf @@ -34,6 +34,7 @@ BaseMemoryLib DebugLib EepromDataLib + FspWrapperPlatformResetLib MemoryAllocationLib PcdLib PrintLib @@ -55,6 +56,8 @@ gPlatformModuleTokenSpaceGuid.PcdEepromMemoryPointer gPlatformModuleTokenSpaceGuid.PcdEepromMemorySize gPlatformModuleTokenSpaceGuid.PcdEepromPublicKeyFile + gPlatformModuleTokenSpaceGuid.PcdEepromDxeVerificationRequired + gPlatformModuleTokenSpaceGuid.PcdEepromSecurityViolationPolicy [Sources] EepromLib.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/E= epromPeiLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Eeprom= Lib/EepromPeiLib.inf index 0f619fd2f5..60b9169503 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromPe= iLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/EepromPe= iLib.inf @@ -33,6 +33,7 @@ BaseMemoryLib DebugLib EepromDataLib + FspWrapperPlatformResetLib MemoryAllocationLib PcdLib PeiServicesLib @@ -52,6 +53,8 @@ gPlatformModuleTokenSpaceGuid.PcdEepromLibraryValid gPlatformModuleTokenSpaceGuid.PcdEepromMemoryPointer gPlatformModuleTokenSpaceGuid.PcdEepromMemorySize + gPlatformModuleTokenSpaceGuid.PcdEepromDxeVerificationRequired + gPlatformModuleTokenSpaceGuid.PcdEepromSecurityViolationPolicy [Ppis] gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_CONSUMES diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/N= ull/EepromNullLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Ee= promLib/Null/EepromNullLib.c index a235d8acf1..d7cc4ef6a6 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Null/Eep= romNullLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Null/Eep= romNullLib.c @@ -15,6 +15,16 @@ #include "EepromNullLib.h" +VOID +EepromDumpParagraph ( + IN UINTN DebugMask, + IN VOID *Ptr, + IN UINTN Count + ) +{ + return; +} + EFI_STATUS EFIAPI EraseEeprom ( @@ -29,6 +39,7 @@ EFIAPI GetEepromStructure ( IN UINT8 LibraryIndex, IN OUT CHAR8 Signature[EEPROM_SIGNATURE_SIZE], + IN OUT UINT32 *StructureIndex, IN OUT UINT8 **Buffer, IN OUT UINT32 *Size ) @@ -66,11 +77,6 @@ GetValidEepromLibrary ( return EEPROM_NULL; } -VOID -InitializeEepromPcds (VOID) -{ -} - EFI_STATUS EFIAPI ValidateEeprom ( diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/P= ei/ValidateHashPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/E= epromLib/Pei/ValidateHashPei.c index a0f7b6b7d8..7db3f9da29 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Pei/Vali= dateHashPei.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Pei/Vali= dateHashPei.c @@ -35,6 +35,8 @@ GetEepromVariable ( EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices; UINTN VariableSize; + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting...\n"= , __FUNCTION__, __LINE__)); + // // Initialize variables // @@ -116,6 +118,7 @@ GetEepromVariable ( &VariableSize, // Data size Data // Data ); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - GetVariable(%s= ) --> %r\n", __FUNCTION__, __LINE__, VariableName, Status)); if (EFI_ERROR (Status)) { // // Failed to get data @@ -131,6 +134,7 @@ Exit: if (EFI_ERROR (Status)) { Data =3D EepromFreePool (Data); } + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning --> = %r\n", __FUNCTION__, __LINE__, Status)); return Status; } @@ -147,6 +151,7 @@ SignedHashCheck ( IN UINT8 LibraryIndex ) { + INTN CmpMemReturn; UINT8 *Hash; UINT32 HashSize; SIGNATURE_DATA *Signature; @@ -155,6 +160,8 @@ SignedHashCheck ( UINT8 *Variable; UINT32 VariableSize; + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting [%a].= ..\n", __FUNCTION__, __LINE__, mEepromLibraryString[LibraryIndex])); + // // Sanity checks // @@ -167,22 +174,23 @@ SignedHashCheck ( // // Get $PromSig structure // - Size =3D 0; - Status =3D GetEepromStructure (LibraryIndex, EEPROM_SIGNATURE_SIGNATURE,= (UINT8 **) &Signature, &Size); + Signature =3D NULL; + Size =3D 0; + Status =3D GetEepromStructureData (&LibraryIndex, EEPROM_SIGNATURE_SI= GNATURE, NULL, sizeof (SIGNATURE_DATA), (UINT8**) &Signature, &Hash, &HashS= ize); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - GetEepromStruc= tureData(EEPROM_SIGNATURE_SIGNATURE) [%a] --> %r\n", __FUNCTION__, __LINE__= , mEepromLibraryString[LibraryIndex], Status)); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Image is corrupted!\n", __FUN= CTION__, __LINE__)); Status =3D EFI_VOLUME_CORRUPTED; goto Exit; } - Hash =3D ((UINT8 *) Signature) + sizeof (SIGNATURE_DATA); - HashSize =3D Signature->length - sizeof (SIGNATURE_DATA); // // Get stored hash // Variable =3D NULL; VariableSize =3D 0; - Status =3D GetEepromVariable (LibraryIndex, &Variable, &VariableSize); + Status =3D GetEepromVariable (LibraryIndex, &Variable, &VariableSi= ze); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - GetEepromVaria= ble(%a) 0x%08x --> %r\n", __FUNCTION__, __LINE__, mEepromLibraryString[Libr= aryIndex], VariableSize, Status)); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to get variable! [%r]\= n", __FUNCTION__, __LINE__, Status)); goto Exit; @@ -196,6 +204,7 @@ SignedHashCheck ( // Nothing stored for this library. Bail. // Status =3D EFI_MEDIA_CHANGED; + DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Stored size returned 0! [%r]\= n", __FUNCTION__, __LINE__, Status)); goto Exit; } if (VariableSize !=3D HashSize) { @@ -207,11 +216,25 @@ SignedHashCheck ( // // Compare stored to real // - if (CompareMem (Variable, Hash, HashSize) !=3D 0) { + CmpMemReturn =3D CompareMem (Variable, Hash, HashSize); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - CompareMem(Var= iable, Hash) --> %d\n", __FUNCTION__, __LINE__, CmpMemReturn)); + if (CmpMemReturn !=3D 0) { // // Failed security match // Status =3D EFI_SECURITY_VIOLATION; + if (mEepromLibDebugFlag) { + DEBUG ((DEBUG_INFO, "\n\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n")); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Hash from variable...\n", __FUNCTIO= N__, __LINE__)); + DEBUG ((DEBUG_INFO, "-----------------------------------------------= ---------------------------------\n")); + EepromDumpParagraph (DEBUG_INFO, Variable, VariableSize); + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n")); + DEBUG ((DEBUG_INFO, "\n\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n")); + DEBUG ((DEBUG_INFO, "%a (#%4d) - Hash from %a...\n", __FUNCTION__, _= _LINE__, mEepromLibraryString[LibraryIndex])); + DEBUG ((DEBUG_INFO, "-----------------------------------------------= ---------------------------------\n")); + EepromDumpParagraph (DEBUG_INFO, Hash, HashSize); + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n\n")); + } } else { Status =3D EFI_SUCCESS; } @@ -222,6 +245,7 @@ Exit: // Signature =3D EepromFreePool (Signature); Variable =3D EepromFreePool (Variable); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning [%a]= --> %r\n", __FUNCTION__, __LINE__, mEepromLibraryString[LibraryIndex], Sta= tus)); return Status; } diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/V= alidateHash.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLi= b/ValidateHash.c index 7d670c529a..09f7f4e34c 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Validate= Hash.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromLib/Validate= Hash.c @@ -47,10 +47,12 @@ SetEepromVariable ( EFI_STATUS Status; CHAR16 VariableName[32]; + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting...\n"= , __FUNCTION__, __LINE__)); + // // Initialize variables // - Attributes =3D EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCE= SS | EFI_VARIABLE_RUNTIME_ACCESS; + Attributes =3D EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCE= SS; Status =3D EFI_SUCCESS; UnicodeSPrint (VariableName, 32, L"PromSig-%d", LibraryIndex); @@ -62,6 +64,11 @@ SetEepromVariable ( Status =3D EFI_INVALID_PARAMETER; goto Exit; } + if ((LibraryIndex =3D=3D EEPROM_MEMORY) || (LibraryIndex =3D=3D EEPROM_N= ULL)) { + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - WARNING: The= re is no need to save the %a hash to a variable!\n", __FUNCTION__, __LINE__= , mEepromLibraryString[LibraryIndex])); + Status =3D EFI_SUCCESS; + goto Exit; + } if ((Buffer =3D=3D NULL) && (BufferSize > 0)) { Status =3D EFI_INVALID_PARAMETER; goto Exit; @@ -70,6 +77,7 @@ SetEepromVariable ( // // Set variable // + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - SetVariable(%s= ) Size =3D 0x%08x\n", __FUNCTION__, __LINE__, VariableName, BufferSize)); Status =3D gRT->SetVariable ( VariableName, // Variable name in UniCode &gEepromVariableGuid, // Variable GUID @@ -77,8 +85,10 @@ SetEepromVariable ( BufferSize, // Data size Buffer // Data ); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - SetVariable(%s= ) --> %r\n", __FUNCTION__, __LINE__, VariableName, Status)); Exit: + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning --> = %r\n", __FUNCTION__, __LINE__, Status)); return Status; } @@ -110,6 +120,8 @@ SignedHashCheck ( UINT32 Size; EFI_STATUS Status; + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Starting [%a].= ..\n", __FUNCTION__, __LINE__, mEepromLibraryString[LibraryIndex])); + // // Initialize variables // @@ -151,8 +163,9 @@ SignedHashCheck ( // // Get $Eeprom$ structure // - Size =3D 0; - Status =3D GetEepromStructure (LibraryIndex, EEPROM_HEADER_SIGNATURE, (U= INT8 **) &EepromHeader, &Size); + EepromHeader =3D NULL; + Size =3D 0; + Status =3D GetEepromStructure (LibraryIndex, EEPROM_HEADER_SIGNATU= RE, NULL, (UINT8 **) &EepromHeader, &Size); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Image is corrupted!\n", __FUN= CTION__, __LINE__)); Status =3D EFI_VOLUME_CORRUPTED; @@ -168,20 +181,21 @@ SignedHashCheck ( // // Get $PromSig structure // - Size =3D 0; - Status =3D GetEepromStructure (LibraryIndex, EEPROM_SIGNATURE_SIGNATURE,= (UINT8 **) &Signature, &Size); + Signature =3D NULL; + Size =3D 0; + Status =3D GetEepromStructureData (&LibraryIndex, EEPROM_SIGNATURE_SI= GNATURE, NULL, sizeof (SIGNATURE_DATA), (UINT8**) &Signature, &Hash, &HashS= ize); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Image is corrupted!\n", __FUN= CTION__, __LINE__)); Status =3D EFI_VOLUME_CORRUPTED; goto Exit; } - Hash =3D ((UINT8 *) Signature) + sizeof (SIGNATURE_DATA); HashType =3D Signature->hashtype; HashSize =3D mHashSizeLookup[HashType & HASH_TYPE_MASK]; if (HashType & EEPROM_SIGNATURE_TYPE_SIGNED) { SignedHash =3D ((UINT8 *) Signature) + sizeof (SIGNATURE_DATA) + H= ashSize; SignedHashSize =3D Signature->length - sizeof (SIGNATURE_DATA) - HashS= ize; } + if (HashType =3D=3D 0) { // // Nothing to do. Bail. @@ -411,6 +425,7 @@ SignedHashCheck ( goto Exit; } + //KES: If we decide to mis-match the hash and the signed hash, this will= need to be updated RsaStatus =3D RsaPkcs1Verify (Rsa, Hash, HashSize, SignedHash, SignedHas= hSize); if (!RsaStatus) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - RsaPkcs1Verify() failed!\n", __FUNCT= ION__, __LINE__)); @@ -419,13 +434,6 @@ SignedHashCheck ( } Exit: - if (Rsa !=3D NULL) { - RsaFree (Rsa); - } - EepromHeader =3D EepromFreePool (EepromHeader); - ImageBuffer =3D EepromFreePool (ImageBuffer); - PublicKey =3D EepromFreePool (PublicKey); - Signature =3D EepromFreePool (Signature); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a (#%4d) - Ending with %r\n", __FUNCTION__, __L= INE__, Status)); } else if (HashType !=3D 0) { @@ -434,9 +442,17 @@ Exit: // Status =3D SetEepromVariable (LibraryIndex, Hash, (HashSize + SignedHas= hSize)); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to delete variable P= romSig-%d! [%r]\n", __FUNCTION__, __LINE__, LibraryIndex, Status)); + DEBUG ((DEBUG_ERROR, "%a (#%4d) - ERROR: Failed to set variable Prom= Sig-%d! [%r]\n", __FUNCTION__, __LINE__, LibraryIndex, Status)); } } + if (Rsa !=3D NULL) { + RsaFree (Rsa); + } + EepromHeader =3D EepromFreePool (EepromHeader); + ImageBuffer =3D EepromFreePool (ImageBuffer); + PublicKey =3D EepromFreePool (PublicKey); + Signature =3D EepromFreePool (Signature); + if (mEepromLibDebugFlag) DEBUG ((DEBUG_INFO, "%a (#%4d) - Returning [%a]= --> %r\n", __FUNCTION__, __LINE__, mEepromLibraryString[LibraryIndex], Sta= tus)); return Status; } diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromAcpi.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Ee= promPlatformLib/EepromPlatformDxeLib.c similarity index 75% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatfo= rmLib/EepromAcpi.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatform= Lib/EepromPlatformDxeLib.c index 7381c82f24..4eeba54ceb 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromAcpi.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformDxeLib.c @@ -44,7 +44,8 @@ EFI_OUT_OF_RESOURCES - There are not enough resources t= o find the protocol. --*/ EFI_STATUS -LocateSupportProtocol( +EFIAPI +EepromLocateSupportProtocol ( IN EFI_GUID *Protocol, OUT VOID **Instance, IN UINT32 Type @@ -63,14 +64,14 @@ IN UINT32 Type // // Locate protocol. // - Status =3D gBS->LocateHandleBuffer( + Status =3D gBS->LocateHandleBuffer ( ByProtocol, Protocol, NULL, &NumberOfHandles, &HandleBuffer ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { // // Defined errors at this time are not found and out of resources. // @@ -85,12 +86,12 @@ IN UINT32 Type // Get the protocol on this handle // This should not fail because of LocateHandleBuffer // - Status =3D gBS->HandleProtocol( + Status =3D gBS->HandleProtocol ( HandleBuffer[Index], Protocol, Instance ); - ASSERT(!EFI_ERROR(Status)); + ASSERT(!EFI_ERROR (Status)); if (!Type) { // @@ -104,7 +105,7 @@ IN UINT32 Type // // See if it has the ACPI storage file // - Status =3D ((EFI_FIRMWARE_VOLUME2_PROTOCOL*)(*Instance))->ReadFile= ( + Status =3D ((EFI_FIRMWARE_VOLUME2_PROTOCOL*) (*Instance))->ReadFil= e( *Instance, &gEfiAcpiTableStorageGuid, NULL, @@ -116,7 +117,7 @@ IN UINT32 Type // // If we found it, then we are done // - if (!EFI_ERROR(Status)) { + if (!EFI_ERROR (Status)) { break; } } @@ -127,7 +128,7 @@ IN UINT32 Type // // Free any allocated buffers // - gBS->FreePool(HandleBuffer); + gBS->FreePool (HandleBuffer); return Status; } @@ -142,23 +143,26 @@ IN UINT32 Type @retval EFI_NOT_READY $AcpiTbl data not ready to be programmed **/ EFI_STATUS +EFIAPI EepromProgramAcpi (VOID) { - UINT8 EepromLibrary; UINT8 *AcpiData; + BOOLEAN AcpiStructureFound; UINT32 AcpiSize; ACPI_TABLE *AcpiStructure; EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; - UINT32 Size; + UINT32 Index; EFI_STATUS Status; UINTN TableHandle; if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + AcpiStructureFound =3D FALSE; + // // Find the AcpiSupport protocol // - Status =3D LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **= ) &AcpiSupport, 0); + Status =3D EepromLocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (V= OID **) &AcpiSupport, 0); if (EFI_ERROR (Status)) { Status =3D EFI_NOT_READY; goto Exit; @@ -166,28 +170,18 @@ EepromProgramAcpi (VOID) // // Program the $AcpiTbl data - // 1. Get valid EEPROM library index - // 2. Find $AcpiTbl structure - // 3. Program the $AcpiTbl data // - EepromLibrary =3D GetValidEepromLibrary (TRUE); - if (EepromLibrary =3D=3D EEPROM_NULL) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - Size =3D 0; - Status =3D GetEepromStructure (EepromLibrary, EEPROM_ACPI_TABLE_SIGNAT= URE, (UINT8 **) &AcpiStructure, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $AcpiTbl str= ucture in the EERPOM binary!\n", __FUNCTION__, __LINE__)); + Index =3D 0; + while (!EFI_ERROR (Status)) { + Status =3D GetEepromStructureData (NULL, EEPROM_ACPI_TABLE_SIGNATURE, = &Index, sizeof (ACPI_TABLE), (UINT8**) &AcpiStructure, &AcpiData, &AcpiSize= ); + if (EFI_ERROR (Status)) { + if (!AcpiStructureFound) DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Did= n't find the $AcpiTbl structure in the EERPOM binary!\n", __FUNCTION__, __L= INE__)); Status =3D EFI_NOT_FOUND; } else { - AcpiSize =3D AcpiStructure->length - sizeof (ACPI_TABLE); if (AcpiSize =3D=3D 0) { - EepromFreePool (AcpiStructure); DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $AcpiTbl s= tructure data in the EERPOM binary!\n", __FUNCTION__, __LINE__)); Status =3D EFI_NOT_FOUND; } else { - AcpiData =3D (UINT8 *) AcpiStructure + sizeof (ACPI_TABLE); // // publish the AcpiTable // @@ -199,13 +193,31 @@ EepromProgramAcpi (VOID) EFI_ACPI_TABLE_VERSION_2_0, &TableHandle ); - // - // re-init variables - // - AcpiStructure =3D EepromFreePool (AcpiStructure); + AcpiStructureFound =3D TRUE; } + AcpiStructure =3D EepromFreePool (AcpiStructure); } } + + if (AcpiStructureFound) Status =3D EFI_SUCCESS; + Exit: return Status; } + +/** + Reset the system using the platform desired reset method. + + @param[in] ResetType The reset type to perform + + @retval None +**/ +VOID +EFIAPI +EepromResetSystem ( + IN EFI_RESET_TYPE ResetType + ) +{ + gRT->ResetSystem (ResetType, EFI_SUCCESS, 0, NULL); +} + diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromPlatformLib.c b/Platform/BroxtonPlatformPkg/Common/Features/Ee= prom/EepromPlatformLib/EepromPlatformLib.c index 4ef7879459..c36ba2f0e9 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformLib.c @@ -15,11 +15,12 @@ #include "EepromPlatformLib.h" -BOOLEAN mEepromPlatformLibDebugFlag =3D TRUE; +BOOLEAN mEepromPlatformLibDebugFlag =3D FALSE; /** Returns the $BrdInfo structure + @param[out] StructureIndex Index of where to start looking for the nex= t structure @param[out] BoardInfo Buffer containing the BOARD_INFO_TABLE stru= cture - Up to the caller to free the buffer @@ -28,56 +29,94 @@ BOOLEAN mEepromPlatformLibDebugFlag =3D TRUE; @retval EFI_NOT_READY $BrdInfo structure not ready yet **/ EFI_STATUS +EFIAPI EepromGetBoardInfo ( - OUT BOARD_INFO_TABLE **BoardInfo + IN OUT UINT32 *StructureIndex, + OUT BOARD_INFO_TABLE **BoardInfo ) { CHAR8 AsciiData[32]; - UINT8 EepromLibrary; - UINT32 Size; EFI_STATUS Status; if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - // - // Return the $BrdInfo structure - // 1. Get valid EEPROM library index - // 2. Find $BrdInfo structure - // - EepromLibrary =3D GetValidEepromLibrary (TRUE); - if (EepromLibrary =3D=3D EEPROM_NULL) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; + if (BoardInfo =3D=3D NULL) { + Status =3D EFI_INVALID_PARAMETER; } else { - Size =3D 0; - Status =3D GetEepromStructure (EepromLibrary, EEPROM_BOARD_INFO_SIGNAT= URE, (UINT8 **) BoardInfo, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0)) { + // + // Return the $BrdInfo structure + // + Status =3D GetEepromStructureData (NULL, EEPROM_BOARD_INFO_SIGNATURE, = StructureIndex, sizeof (BOARD_INFO_TABLE), (UINT8**) BoardInfo, NULL, NULL)= ; + if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $BrdInfo str= ucture in the EERPOM binary!\n", __FUNCTION__, __LINE__)); Status =3D EFI_NOT_FOUND; } else { if (mEepromPlatformLibDebugFlag) { ZeroMem (AsciiData, 32); - CopyMem (AsciiData, (*BoardInfo)->signature, 8); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Signature =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Version =3D %04x:%04x\n", __F= UNCTION__, __LINE__, (*BoardInfo)->vermajor, (*BoardInfo)->verminor)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Length =3D 0x%08x\n", __F= UNCTION__, __LINE__, (*BoardInfo)->length)); - ZeroMem (AsciiData, 32); CopyMem (AsciiData, (*BoardInfo)->manuname, 16); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Manufacturer =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Manufacturer =3D %a\n", __FUNC= TION__, __LINE__, AsciiData)); ZeroMem (AsciiData, 32); CopyMem (AsciiData, (*BoardInfo)->brdname, 16); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Board name =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Board name =3D %a\n", __FUNC= TION__, __LINE__, AsciiData)); ZeroMem (AsciiData, 32); CopyMem (AsciiData, (*BoardInfo)->brdserial, 16); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Serial # =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Board ID =3D 0x%08x\n", __F= UNCTION__, __LINE__, (*BoardInfo)->boardid)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Fab ID =3D 0x%08x\n", __F= UNCTION__, __LINE__, (*BoardInfo)->fabid)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - EC ID =3D 0x%08x\n", __F= UNCTION__, __LINE__, (*BoardInfo)->ecid)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Board type =3D %a\n", __F= UNCTION__, __LINE__, (*BoardInfo)->boardtype ? "Main board (RedBox)" : "Plu= g-in board")); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Serial # =3D %a\n", __FUNC= TION__, __LINE__, AsciiData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Board ID =3D 0x%08x\n", __FUNC= TION__, __LINE__, (*BoardInfo)->boardid)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Fab ID =3D 0x%08x\n", __FUNC= TION__, __LINE__, (*BoardInfo)->fabid)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - EC ID =3D 0x%08x\n", __FUNC= TION__, __LINE__, (*BoardInfo)->ecid)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Board type =3D %a\n", __FUNC= TION__, __LINE__, (*BoardInfo)->boardtype ? "Main board (RedBox)" : "Plug-i= n board")); + } + } + } + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); + return Status; +} + +/** + Returns the $HdCodec data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $HdCodec data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the HdaData buffer + + @retval EFI_SUCCESS $HdCodec data found + @retval EFI_NOT_FOUND $HdCodec data not found + @retval EFI_NOT_READY $HdCodec data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetHdaCodec ( + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + HDA_CODEC *HdaStructure; + UINT8 *HdaData; + UINT32 HdaSize; + EFI_STATUS Status; + + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + + if ((Buffer =3D=3D NULL) || (BufferSize =3D=3D NULL)) { + Status =3D EFI_INVALID_PARAMETER; + } else { + Status =3D GetEepromStructureData (NULL, EEPROM_HDA_CODEC_SIGNATURE, S= tructureIndex, sizeof (HDA_CODEC), (UINT8**) &HdaStructure, &HdaData, &HdaS= ize); + if (!EFI_ERROR (Status)) { + if (HdaSize !=3D 0) { + *Buffer =3D AllocatePool (HdaSize); + if (*Buffer =3D=3D NULL) { + HdaSize =3D 0; + } else { + CopyMem (*Buffer, HdaData, HdaSize); + EepromFreePool (HdaStructure); + } } - Status =3D EFI_SUCCESS; + *BufferSize =3D HdaSize; } } + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); return Status; } @@ -85,62 +124,101 @@ EepromGetBoardInfo ( /** Returns the $Logo$ data - @param[out] LogoData Buffer containing the $Logo$ data - @param[out] LogoSize Size of the LogoData buffer + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Logo$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the LogoData buffer @retval EFI_SUCCESS $Logo$ data found @retval EFI_NOT_FOUND $Logo$ data not found @retval EFI_NOT_READY $Logo$ data not ready yet **/ EFI_STATUS +EFIAPI EepromGetLogo ( - OUT UINT8 **LogoData, - OUT UINT32 *LogoSize + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize ) { - CHAR8 AsciiData[32]; - UINT8 EepromLibrary; + UINT8 *LogoData; + UINT32 LogoSize; LOGO_DATA *LogoStructure; - UINT32 Size; EFI_STATUS Status; if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - // - // Return the $Logo$ data - // 1. Get valid EEPROM library index - // 2. Find $Logo$ structure - // 3. Return $Logo$ data - // - EepromLibrary =3D GetValidEepromLibrary (TRUE); - if (EepromLibrary =3D=3D EEPROM_NULL) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; + if ((Buffer =3D=3D NULL) || (BufferSize =3D=3D NULL)) { + Status =3D EFI_INVALID_PARAMETER; } else { - Size =3D 0; - Status =3D GetEepromStructure (EepromLibrary, EEPROM_LOGO_DATA_SIGNATU= RE, (UINT8 **) &LogoStructure, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $Logo$ struc= ture in the EERPOM binary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - *LogoSize =3D LogoStructure->length - sizeof (LOGO_DATA); - if (*LogoSize =3D=3D 0) { - *LogoData =3D EepromFreePool (LogoStructure); - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $Logo$ str= ucture data in the EERPOM binary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - *LogoData =3D (UINT8 *) LogoStructure + sizeof (LOGO_DATA); - if (mEepromPlatformLibDebugFlag) { - ZeroMem (AsciiData, 32); - CopyMem (AsciiData, LogoStructure->signature, 8); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Signature =3D %a\n", _= _FUNCTION__, __LINE__, AsciiData)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Version =3D %04x:%04x\n", _= _FUNCTION__, __LINE__, LogoStructure->vermajor, LogoStructure->verminor)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Length =3D 0x%08x\n", _= _FUNCTION__, __LINE__, LogoStructure->length)); + Status =3D GetEepromStructureData (NULL, EEPROM_LOGO_DATA_SIGNATURE, S= tructureIndex, sizeof (LOGO_DATA), (UINT8**) &LogoStructure, &LogoData, &Lo= goSize); + if (!EFI_ERROR (Status)) { + if (LogoSize !=3D 0) { + *Buffer =3D AllocatePool (LogoSize); + if (*Buffer =3D=3D NULL) { + LogoSize =3D 0; + } else { + CopyMem (*Buffer, LogoData, LogoSize); + EepromFreePool (LogoStructure); } - Status =3D EFI_SUCCESS; } + *BufferSize =3D LogoSize; } } + + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); + return Status; +} + +/** + Returns the $MemCnfg data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] SpdSlotFlag Flags of which SPD this data is valid for + @param[out] Buffer Buffer containing the $MemCnfg data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the MemoryData buffer + + @retval EFI_SUCCESS $MemCnfg data found + @retval EFI_NOT_FOUND $MemCnfg data not found + @retval EFI_NOT_READY $MemCnfg data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetMemoryData ( + IN OUT UINT32 *StructureIndex, + OUT UINT16 *SpdSlotFlag, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + UINT8 *MemoryData; + UINT32 MemorySize; + MEMORY_DATA *MemoryStructure; + EFI_STATUS Status; + + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + + if ((SpdSlotFlag =3D=3D NULL) || (Buffer =3D=3D NULL) || (BufferSize =3D= =3D NULL)) { + Status =3D EFI_INVALID_PARAMETER; + } else { + Status =3D GetEepromStructureData (NULL, EEPROM_MEMORY_DATA_SIGNATURE,= StructureIndex, sizeof (MEMORY_DATA), (UINT8**) &MemoryStructure, &MemoryD= ata, &MemorySize); + if (!EFI_ERROR (Status)) { + *SpdSlotFlag =3D MemoryStructure->spdslot; + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Spd= Slots =3D %04x\n", __FUNCTION__, __LINE__, MemoryStructure->spdslot)); + if (MemorySize !=3D 0) { + *Buffer =3D AllocatePool (MemorySize); + if (*Buffer =3D=3D NULL) { + MemorySize =3D 0; + } else { + CopyMem (*Buffer, MemoryData, MemorySize); + EepromFreePool (MemoryStructure); + } + } + *BufferSize =3D MemorySize; + } + } + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); return Status; } @@ -148,63 +226,48 @@ EepromGetLogo ( /** Returns the $Video$ data - @param[out] VideoData Buffer containing the $Video$ data - @param[out] VideoSize Size of the VideoData buffer + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Video$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the VideoData buffer @retval EFI_SUCCESS $Video$ data found @retval EFI_NOT_FOUND $Video$ data not found @retval EFI_NOT_READY $Video$ data not ready yet **/ - EFI_STATUS +EFIAPI EepromGetVbt ( - OUT UINT8 **VideoData, - OUT UINT32 *VideoSize + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize ) { - CHAR8 AsciiData[32]; - UINT8 EepromLibrary; - VIDEO_DATA *VideoStructure; - UINT32 Size; EFI_STATUS Status; + UINT8 *VideoData; + UINT32 VideoSize; + VIDEO_DATA *VideoStructure; if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - // - // Return the $Video$ data - // 1. Get valid EEPROM library index - // 2. Find $Video$ structure - // 3. Return $Video$ data - // - EepromLibrary =3D GetValidEepromLibrary (TRUE); - if (EepromLibrary =3D=3D EEPROM_NULL) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; + if ((Buffer =3D=3D NULL) || (BufferSize =3D=3D NULL)) { + Status =3D EFI_INVALID_PARAMETER; } else { - Size =3D 0; - Status =3D GetEepromStructure (EepromLibrary, EEPROM_VIDEO_DATA_SIGNAT= URE, (UINT8 **) &VideoStructure, &Size); - if (EFI_ERROR (Status) || (Size =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $Video$ stru= cture in the EERPOM binary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - *VideoSize =3D VideoStructure->length - sizeof (VIDEO_DATA); - if (*VideoSize =3D=3D 0) { - *VideoData =3D EepromFreePool (VideoStructure); - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find the $Video$ st= ructure data in the EERPOM binary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - *VideoData =3D (UINT8 *) VideoStructure + sizeof (VIDEO_DATA); - if (mEepromPlatformLibDebugFlag) { - ZeroMem (AsciiData, 32); - CopyMem (AsciiData, VideoStructure->signature, 8); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Signature =3D %a\n", _= _FUNCTION__, __LINE__, AsciiData)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Version =3D %04x:%04x\n", _= _FUNCTION__, __LINE__, VideoStructure->vermajor, VideoStructure->verminor))= ; - DEBUG ((DEBUG_INFO, "%a(#%4d) - Length =3D 0x%08x\n", _= _FUNCTION__, __LINE__, VideoStructure->length)); + Status =3D GetEepromStructureData (NULL, EEPROM_VIDEO_DATA_SIGNATURE, = StructureIndex, sizeof (VIDEO_DATA), (UINT8**) &VideoStructure, &VideoData,= &VideoSize); + if (!EFI_ERROR (Status)) { + if (VideoSize !=3D 0) { + *Buffer =3D AllocatePool (VideoSize); + if (*Buffer =3D=3D NULL) { + VideoSize =3D 0; + } else { + CopyMem (*Buffer, VideoData, VideoSize); + EepromFreePool (VideoStructure); } - Status =3D EFI_SUCCESS; } + *BufferSize =3D VideoSize; } } + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); return Status; } @@ -218,6 +281,7 @@ EepromGetVbt ( @retval FALSE PAD offset is not in the whitelist **/ BOOLEAN +EFIAPI EepromPadCheck ( IN UINT32 PadOffset ) @@ -289,13 +353,15 @@ Exit: @retval EFI_NOT_READY GPIO data not ready yet **/ EFI_STATUS +EFIAPI EepromProgramGpioPads (VOID) { CHAR8 AsciiData[32]; GPIO_DATA_RECORD *EepromGpioData; GPIO_DATA_HEADER *EepromGpioHeader; - UINT8 EepromLibrary; + BOOLEAN GpioDataFound; UINT32 GpioPadData; + UINT32 Index; UINT32 OldGpioPadData; UINT32 Size; EFI_STATUS Status; @@ -304,29 +370,18 @@ EepromProgramGpioPads (VOID) // // Program any EEPROM defined GPIOs - // 1. Get valid EEPROM library index - // 2. Find GPIO data in EEPROM binary - // 3. Loop thru GPIO data and program PADs if PAD is in whitelist + // 1. Find GPIO data in EEPROM binary + // 2. Loop thru GPIO data and program PADs if PAD is in whitelist // - EepromLibrary =3D GetValidEepromLibrary (TRUE); - if (EepromLibrary =3D=3D EEPROM_NULL) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find a valid EEPROM bin= ary!\n", __FUNCTION__, __LINE__)); - Status =3D EFI_NOT_FOUND; - } else { - Size =3D 0; - Status =3D GetEepromStructure (EepromLibrary, EEPROM_GPIO_SIGNATURE, (= UINT8 **) &EepromGpioHeader, &Size); + GpioDataFound =3D FALSE; + Index =3D 0; + Status =3D EFI_SUCCESS; + while (!EFI_ERROR (Status)) { + Status =3D GetEepromStructureData (NULL, EEPROM_GPIO_SIGNATURE, &Index= , sizeof (GPIO_DATA_HEADER), (UINT8**) &EepromGpioHeader, (UINT8**) &Eeprom= GpioData, &Size); if (EFI_ERROR (Status) || (Size =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't find any GPIO data in= the EERPOM binary!\n", __FUNCTION__, __LINE__)); + if (!GpioDataFound) DEBUG ((DEBUG_ERROR, "%a(#%4d) - ERROR: Didn't f= ind any GPIO data in the EERPOM binary!\n", __FUNCTION__, __LINE__)); Status =3D EFI_NOT_FOUND; } else { - EepromGpioData =3D (GPIO_DATA_RECORD *) ((UINT8 *) EepromGpioHeader = + sizeof (GPIO_DATA_HEADER)); - if (mEepromPlatformLibDebugFlag) { - ZeroMem (AsciiData, 32); - CopyMem (AsciiData, EepromGpioHeader->signature, 8); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Signature =3D %a\n", __F= UNCTION__, __LINE__, AsciiData)); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Version =3D %04x:%04x\n", __F= UNCTION__, __LINE__, EepromGpioHeader->vermajor, EepromGpioHeader->verminor= )); - DEBUG ((DEBUG_INFO, "%a(#%4d) - Length =3D 0x%08x\n", __F= UNCTION__, __LINE__, EepromGpioHeader->length)); - } // // Loop thru GPIO records. We currently only allow 32-bit PAD offset= data records that are in the white-list. // @@ -346,13 +401,24 @@ EepromProgramGpioPads (VOID) } if (OldGpioPadData !=3D GpioPadRead (EepromGpioData->offset)) { DEBUG ((DEBUG_INFO, "%a(#%4d) - WARNING: PAD programming changin= g due to EEPROM binary!\n", __FUNCTION__, __LINE__)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Label =3D %a\n", __FU= NCTION__, __LINE__, AsciiData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - Offset =3D 0x%08x\n", __FU= NCTION__, __LINE__, EepromGpioData->offset)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - DataType =3D 0x%08x\n", __FU= NCTION__, __LINE__, EepromGpioData->datatype)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - DataSize =3D 0x%08x\n", __FU= NCTION__, __LINE__, EepromGpioData->datasize)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - AndData =3D 0x%08x\n", __FU= NCTION__, __LINE__, EepromGpioData->anddata)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - OrData =3D 0x%08x\n", __FU= NCTION__, __LINE__, EepromGpioData->ordata)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - OldData =3D 0x%08x\n", __FU= NCTION__, __LINE__, OldGpioPadData)); + DEBUG ((DEBUG_INFO, "%a(#%4d) - NewData =3D 0x%08x\n", __FU= NCTION__, __LINE__, GpioPadRead (EepromGpioData->offset))); + DEBUG ((DEBUG_INFO, "\n")); } EepromGpioData++; } + GpioDataFound =3D TRUE; } EepromFreePool (EepromGpioHeader); - Status =3D EFI_SUCCESS; } + if (GpioDataFound) Status =3D EFI_SUCCESS; + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Returni= ng %r...\n", __FUNCTION__, __LINE__, Status)); return Status; } diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromPlatformLib.inf b/Platform/BroxtonPlatformPkg/Common/Features/= Eeprom/EepromPlatformLib/EepromPlatformLib.inf index d7cf14d251..5da60ea2d5 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformLib.inf @@ -26,6 +26,7 @@ [Guids] gEepromVariableGuid + gEfiAcpiTableStorageGuid [LibraryClasses] BaseLib @@ -34,7 +35,6 @@ EepromDataLib EepromLib GpioLib - I2cLib MemoryAllocationLib PcdLib UefiBootServicesTableLib @@ -53,7 +53,10 @@ gPlatformModuleTokenSpaceGuid.PcdEepromBus gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList +[Protocols] + gEfiAcpiSupportProtocolGuid + [Sources] - EepromAcpi.c + EepromPlatformDxeLib.c EepromPlatformLib.c EepromPlatformLib.h diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromPlatformNullLib.c b/Platform/BroxtonPlatformPkg/Common/Feature= s/Eeprom/EepromPlatformLib/EepromPlatformNullLib.c deleted file mode 100644 index 55a78328e7..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformNullLib.c +++ /dev/null @@ -1,95 +0,0 @@ -/** @file - Common EEPROM library instance. - - Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
- - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#include "EepromPlatformLib.h" - -BOOLEAN mEepromPlatformLibDebugFlag =3D FALSE; - -/** - Returns the $BrdInfo structure - - @param[out] BoardInfo Buffer containing the BOARD_INFO_TABLE stru= cture - - Up to the caller to free the buffer - - @retval EFI_SUCCESS $BrdInfo structure found - @retval EFI_NOT_FOUND $BrdInfo structure not found - @retval EFI_NOT_READY $BrdInfo structure not ready yet -**/ -EFI_STATUS -EepromGetBoardInfo ( - OUT BOARD_INFO_TABLE **BoardInfo - ) -{ - if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - return EFI_NOT_READY; -} - -/** - Returns the $Logo$ data - - @param[out] LogoData Buffer containing the $Logo$ data - @param[out] LogoSize Size of the LogoData buffer - - @retval EFI_SUCCESS $Logo$ data found - @retval EFI_NOT_FOUND $Logo$ data not found - @retval EFI_NOT_READY $Logo$ data not ready yet -**/ -EFI_STATUS -EepromGetLogo ( - OUT UINT8 **LogoData, - OUT UINT32 *LogoSize - ) -{ - if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - return EFI_NOT_READY; -} - -/** - Returns the $Video$ data - - @param[out] VideoData Buffer containing the $Video$ data - @param[out] VideoSize Size of the VideoData buffer - - @retval EFI_SUCCESS $Video$ data found - @retval EFI_NOT_FOUND $Video$ data not found - @retval EFI_NOT_READY $Video$ data not ready yet -**/ - -EFI_STATUS -EepromGetVbt ( - OUT UINT8 **VideoData, - OUT UINT32 *VideoSize - ) -{ - if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - return EFI_NOT_READY; -} - -/** - Program GPIOs per binary and whitelist. The $GpioDat structure could be = used to program things other than - GPIOs, but that is all it is used for at this point. - - @param[in] VOID - - @retval EFI_SUCCESS GPIOs programmed successfully - @retval EFI_NOT_FOUND GPIO data not found - @retval EFI_NOT_READY GPIO data not ready yet -**/ -EFI_STATUS -EepromProgramGpioPads (VOID) -{ - if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); - return EFI_NOT_READY; -} diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromPlatformNullLib.inf b/Platform/BroxtonPlatformPkg/Common/Featu= res/Eeprom/EepromPlatformLib/EepromPlatformNullLib.inf index ee0ea1905c..a68a837a2f 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformNullLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformNullLib.inf @@ -28,14 +28,9 @@ gEepromVariableGuid [LibraryClasses] - BaseLib - BaseMemoryLib DebugLib EepromDataLib EepromLib - GpioLib - I2cLib - MemoryAllocationLib PcdLib [Packages] @@ -45,13 +40,9 @@ BroxtonSiPkg/BroxtonSiPkg.dec [Pcd] - gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress ## SOMETIMES_CONSUME= S - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## SOMETIMES_CONSUME= S - gPlatformModuleTokenSpaceGuid.PcdEepromAddress - gPlatformModuleTokenSpaceGuid.PcdEepromBus gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList [Sources] - EepromAcpiNull.c - EepromPlatformNullLib.c EepromPlatformLib.h + Null/EepromAcpiNull.c + Null/EepromPlatformNullLib.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromPlatformPeiLib.inf b/Platform/BroxtonPlatformPkg/Common/Featur= es/Eeprom/EepromPlatformLib/EepromPlatformPeiLib.inf index 99011637d6..c088ac79eb 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformPeiLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromPlatformPeiLib.inf @@ -34,7 +34,6 @@ EepromDataLib EepromLib GpioLib - I2cLib MemoryAllocationLib PcdLib @@ -52,6 +51,6 @@ gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList [Sources] - EepromAcpiPei.c EepromPlatformLib.c EepromPlatformLib.h + Pei/EepromPlatformPeiLib.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromAcpiNull.c b/Platform/BroxtonPlatformPkg/Common/Features/Eepro= m/EepromPlatformLib/Null/EepromAcpiNull.c similarity index 100% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatfo= rmLib/EepromAcpiNull.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatform= Lib/Null/EepromAcpiNull.c diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/Null/EepromPlatformNullLib.c b/Platform/BroxtonPlatformPkg/Common/Fe= atures/Eeprom/EepromPlatformLib/Null/EepromPlatformNullLib.c new file mode 100644 index 0000000000..34ca9f546f --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= Null/EepromPlatformNullLib.c @@ -0,0 +1,241 @@ +/** @file + Common EEPROM library instance. + + Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include "EepromPlatformLib.h" + +BOOLEAN mEepromPlatformLibDebugFlag =3D FALSE; + +/** + Returns the $BrdInfo structure + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] BoardInfo Buffer containing the BOARD_INFO_TABLE stru= cture + - Up to the caller to free the buffer + + @retval EFI_SUCCESS $BrdInfo structure found + @retval EFI_NOT_FOUND $BrdInfo structure not found + @retval EFI_NOT_READY $BrdInfo structure not ready yet +**/ +EFI_STATUS +EepromGetBoardInfo ( + IN OUT UINT32 *StructureIndex, + OUT BOARD_INFO_TABLE **BoardInfo + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Returns the $HdCodec data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $HdCodec data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the HdaData buffer + + @retval EFI_SUCCESS $HdCodec data found + @retval EFI_NOT_FOUND $HdCodec data not found + @retval EFI_NOT_READY $HdCodec data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetHdaCodec ( + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Returns the $Logo$ data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Logo$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the LogoData buffer + + @retval EFI_SUCCESS $Logo$ data found + @retval EFI_NOT_FOUND $Logo$ data not found + @retval EFI_NOT_READY $Logo$ data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetLogo ( + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Returns the $MemCnfg data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] SpdSlotFlag Flags of which SPD this data is valid for + @param[out] Buffer Buffer containing the $MemCnfg data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the MemoryData buffer + + @retval EFI_SUCCESS $MemCnfg data found + @retval EFI_NOT_FOUND $MemCnfg data not found + @retval EFI_NOT_READY $MemCnfg data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetMemoryData ( + IN OUT UINT32 *StructureIndex, + OUT UINT16 *SpdSlotFlag, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Returns the $Video$ data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Video$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the VideoData buffer + + @retval EFI_SUCCESS $Video$ data found + @retval EFI_NOT_FOUND $Video$ data not found + @retval EFI_NOT_READY $Video$ data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetVbt ( + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Checks whether the PadOffset is in the platform GPIO whitelist. + + @param[in] PadOffset The PAD offset to check against the platform wh= itelist + + @retval TRUE PAD offset is in the whitelist + @retval FALSE PAD offset is not in the whitelist +**/ +BOOLEAN +EepromPadCheck ( + IN UINT32 PadOffset + ) +{ + UINT32 AlignedPadOffset; + UINTN GpioCount; + UINT32 *GpioWhiteListPtr; + UINTN GpioWhiteListLength; + BOOLEAN ReturnValue; + + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + + // + // Initialize variables + // + GpioCount =3D 0; + GpioWhiteListPtr =3D (UINT32 *) PcdGetPtr (PcdGpioWhiteList); + GpioWhiteListLength =3D (UINTN) PcdGetSize (PcdGpioWhiteList) / sizeof (= UINT32); + ReturnValue =3D FALSE; + + // + // Force to PAD offset so the whitelist only needs to account for the DW= 0 value and not both DW0 and DW1 + // + AlignedPadOffset =3D PadOffset - (PadOffset % 0x08); + + // + // Sanity checks + // + if (GpioWhiteListPtr =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a() - ERROR: GpioWhiteListPtr =3D=3D NULL\n", _= _FUNCTION__)); + goto Exit; + } + if (GpioWhiteListLength =3D=3D 0) { + DEBUG ((DEBUG_ERROR, "%a() - ERROR: GpioWhiteListLength =3D=3D 0\n", _= _FUNCTION__)); + goto Exit; + } + if (AlignedPadOffset =3D=3D 0) { + DEBUG ((DEBUG_ERROR, "%a() - ERROR: AlignedPadOffset =3D=3D 0\n", __FU= NCTION__)); + goto Exit; + } + + // + // Verify PAD offset is in white list + // + while ((GpioWhiteListPtr[GpioCount] !=3D END_OF_GPIO_ARRAY) && (GpioCoun= t < GpioWhiteListLength)) { + if (GpioWhiteListPtr[GpioCount] =3D=3D AlignedPadOffset) { + ReturnValue =3D TRUE; + break; + } + GpioCount++; + } + + if (ReturnValue =3D=3D FALSE) { + DEBUG ((DEBUG_INFO, "%a() - WARNING: 0x%08x [0x%08x] was not found in = the whitelist.\n", __FUNCTION__, AlignedPadOffset, PadOffset)); + } + +Exit: + return ReturnValue; +} + +/** + Program GPIOs per binary and whitelist. The $GpioDat structure could be = used to program things other than + GPIOs, but that is all it is used for at this point. + + @param[in] VOID + + @retval EFI_SUCCESS GPIOs programmed successfully + @retval EFI_NOT_FOUND GPIO data not found + @retval EFI_NOT_READY GPIO data not ready yet +**/ +EFI_STATUS +EepromProgramGpioPads (VOID) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return EFI_NOT_READY; +} + +/** + Reset the system using the platform desired reset method. + + @param[in] ResetType The reset type to perform + + @retval None +**/ +VOID +EFIAPI +EepromResetSystem ( + IN EFI_RESET_TYPE ResetType + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return; +} + diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatf= ormLib/EepromAcpiPei.c b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom= /EepromPlatformLib/Pei/EepromPlatformPeiLib.c similarity index 72% rename from Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatfo= rmLib/EepromAcpiPei.c rename to Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatform= Lib/Pei/EepromPlatformPeiLib.c index 0ce136affe..56f61ec9da 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= EepromAcpiPei.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/EepromPlatformLib/= Pei/EepromPlatformPeiLib.c @@ -30,3 +30,20 @@ EepromProgramAcpi (VOID) if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); return EFI_NOT_READY; } + +/** + Reset the system using the platform desired reset method. + + @param[in] ResetType The reset type to perform + + @retval None +**/ +VOID +EFIAPI +EepromResetSystem ( + IN EFI_RESET_TYPE ResetType + ) +{ + if (mEepromPlatformLibDebugFlag) DEBUG ((DEBUG_INFO, "%a(#%4d) - Startin= g...\n", __FUNCTION__, __LINE__)); + return; +} diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Lib= rary/EepromLib.h b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Inclu= de/Library/EepromLib.h index f9bcdb60c3..4836b2577e 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Library/Ee= promLib.h +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Library/Ee= promLib.h @@ -20,6 +20,7 @@ #include #include +#include //// @@ -29,8 +30,30 @@ //// +//// Externs +//// +extern BOOLEAN mEepromLibDebugFlag; + + +//// //// Functions //// +VOID +EepromDumpParagraph ( + IN UINTN DebugMask, + IN VOID *Ptr, + IN UINTN Count + ); + +// +// Desc: Registers the raw data libraries +// Variables: None +// Return: EFI_SUCCESS +// +EFI_STATUS +EFIAPI +EepromInitConstructor (VOID); + EFI_STATUS EFIAPI EraseEeprom ( @@ -42,10 +65,46 @@ EFIAPI GetEepromStructure ( IN UINT8 LibraryIndex, IN OUT CHAR8 Signature[EEPROM_SIGNATURE_SIZE], + IN OUT UINT32 *StructureIndex, IN OUT UINT8 **Buffer, IN OUT UINT32 *Size ); +/** + Returns the EEPROM structure data + + @param[in] LibraryIndex Which library to use to get the struct= ure + @param[in] Signature Signature of the structure we are look= ing for + @param[out] StructureIndex Index of where to start looking for th= e next structure + @param[in] HeaderSize Size of the structure header + @param[out] StructureHeader Header of the structure we're looking = for + NOTE: Caller is responsible for freein= g this memory. + @param[out] StructureData Buffer containing the structure data + @param[out] DataSize Size of the StructureData buffer + + @retval EFI_SUCCESS Structure data found + @retval EFI_NOT_FOUND Structure data not found + @retval EFI_NOT_READY Structure data not ready yet +**/ +EFI_STATUS +EFIAPI +GetEepromStructureData ( + IN UINT8 *LibraryIndex, + IN CHAR8 Signature[EEPROM_SIGNATURE_SIZE], + IN OUT UINT32 *StructureIndex, + IN UINT32 HeaderSize, + OUT UINT8 **StructureHeader, + OUT UINT8 **StructureData, + OUT UINT32 *DataSize + ); + +/** + Returns the EEPROM image size + + @param[in] LibraryIndex Which library to use to get the struct= ure + + @retval UINT32 Size of that image +**/ UINT32 EFIAPI GetImageSize ( @@ -77,14 +136,5 @@ ValidateEeprom ( IN UINT8 LibraryIndex ); -// -// Desc: Registers the raw data libraries -// Variables: None -// Return: EFI_SUCCESS -// -EFI_STATUS -EFIAPI -EepromInitConstructor (VOID); - #endif // _EEPROM_LIB_ diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Lib= rary/EepromPlatformLib.h b/Platform/BroxtonPlatformPkg/Common/Features/Eepr= om/Include/Library/EepromPlatformLib.h index b585327c4f..4ad8a78061 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Library/Ee= promPlatformLib.h +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/Include/Library/Ee= promPlatformLib.h @@ -35,6 +35,7 @@ /** Returns the $BrdInfo structure + @param[out] StructureIndex Index of where to start looking for the nex= t structure @param[out] BoardInfo Buffer containing the BOARD_INFO_TABLE stru= cture - Up to the caller to free the buffer @@ -42,39 +43,91 @@ @retval EFI_NOT_FOUND $BrdInfo structure not found **/ EFI_STATUS +EFIAPI EepromGetBoardInfo ( - OUT BOARD_INFO_TABLE **BoardInfo + IN OUT UINT32 *StructureIndex, + OUT BOARD_INFO_TABLE **BoardInfo + ); + +/** + Returns the $HdCodec data + + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $HdCodec data + @param[out] BufferSize Size of the HdaData buffer + + @retval EFI_SUCCESS $HdCodec data found + @retval EFI_NOT_FOUND $HdCodec data not found + @retval EFI_NOT_READY $HdCodec data not ready yet +**/ +EFI_STATUS +EFIAPI +EepromGetHdaCodec ( + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize ); /** Returns the $Logo$ data - @param[out] LogoData Buffer containing the $Logo$ data - @param[out] LogoSize Size of the LogoData buffer + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Logo$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the LogoData buffer @retval EFI_SUCCESS $Logo$ data found @retval EFI_NOT_FOUND $Logo$ data not found + @retval EFI_NOT_READY $Logo$ data not ready yet **/ EFI_STATUS +EFIAPI EepromGetLogo ( - OUT UINT8 **LogoData, - OUT UINT32 *LogoSize + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize ); /** - Returns the $Video$ data + Returns the $MemCnfg data - @param[out] VideoData Buffer containing the $Video$ data - @param[out] VideoSize Size of the VideoData buffer + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] SpdSlotFlag Flags of which SPD this data is valid for + @param[out] Buffer Buffer containing the $MemCnfg data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the MemoryData buffer - @retval EFI_SUCCESS $Logo$ data found - @retval EFI_NOT_FOUND $Logo$ data not found + @retval EFI_SUCCESS $MemCnfg data found + @retval EFI_NOT_FOUND $MemCnfg data not found + @retval EFI_NOT_READY $MemCnfg data not ready yet **/ +EFI_STATUS +EFIAPI +EepromGetMemoryData ( + IN OUT UINT32 *StructureIndex, + OUT UINT16 *SpdSlotFlag, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize + ); + +/** + Returns the $Video$ data + @param[out] StructureIndex Index of where to start looking for the nex= t structure + @param[out] Buffer Buffer containing the $Video$ data + - Up to the caller to free the buffer + @param[out] BufferSize Size of the VideoData buffer + + @retval EFI_SUCCESS $Video$ data found + @retval EFI_NOT_FOUND $Video$ data not found + @retval EFI_NOT_READY $Video$ data not ready yet +**/ EFI_STATUS +EFIAPI EepromGetVbt ( - OUT UINT8 **VideoData, - OUT UINT32 *VideoSize + IN OUT UINT32 *StructureIndex, + OUT UINT8 **Buffer, + OUT UINT32 *BufferSize ); /** @@ -86,6 +139,7 @@ EepromGetVbt ( @retval FALSE PAD offset is not in the whitelist **/ BOOLEAN +EFIAPI EepromPadCheck ( IN UINT32 PadOffset ); @@ -100,6 +154,7 @@ EepromPadCheck ( @retval EFI_NOT_READY $AcpiTbl data not ready to be programmed **/ EFI_STATUS +EFIAPI EepromProgramAcpi (VOID); /** @@ -111,7 +166,21 @@ EepromProgramAcpi (VOID); @retval EFI_NOT_FOUND GPIO data not found. **/ EFI_STATUS +EFIAPI EepromProgramGpioPads (VOID); +/** + Reset the system using the platform desired reset method. + + @param[in] ResetType The reset type to perform + + @retval None +**/ +VOID +EFIAPI +EepromResetSystem ( + IN EFI_RESET_TYPE ResetType + ); + #endif // _EEPROM_PLATFORM_LIB_ diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/ReadMe.txt = b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/ReadMe.txt index 5179b97e3d..5cb9ba2b03 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/ReadMe.txt +++ b/Platform/BroxtonPlatformPkg/Common/Features/Eeprom/ReadMe.txt @@ -27,6 +27,11 @@ gPlatformModuleTokenSpaceGuid.PcdEepromPublicKeyFile|{0xA3, 0x38, 0x8A, = 0x5D, 0xBD, 0xFB, 0x77, 0x40, 0x81, 0x05, 0x11, 0x17, 0x0C, 0x2A, 0xF5, 0x4= D}|VOID*|0xEEEE2003 ## FV EEPROM Image file GUID - BFBD3DAC-01EB-4FEB-A9DE-BCC9D1BA5531 gPlatformModuleTokenSpaceGuid.PcdEepromFvImageFile|{0xAC, 0x3D, 0xBD, 0x= BF, 0xEB, 0x01, 0xEB, 0x4F, 0xA9, 0xDE, 0xBC, 0xC9, 0xD1, 0xBA, 0x55, 0x31}= |VOID*|0xEEEE2004 + ## GPIO PAD whitelist | END OF ARRAY | + gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList|{0xFF, 0xFF, 0xFF, 0xFF}|= VOID*|0xEEEE2005 + ## EEPROM security violation policy action + ## 0x00 - CPU dead loop + gPlatformModuleTokenSpaceGuid.PcdEepromSecurityViolationPolicy|0x00|UINT= 8|0xEEEE2006 [PcdsDynamic, PcdsDynamicEx] ## Used to store the EEPROM memory buffer pointer @@ -45,6 +50,8 @@ gPlatformModuleTokenSpaceGuid.PcdEepromInMemoryFlag|0|BOOLEAN|0xEEEE0006 ## Flag to tell if EEPROM Map is in HOB gPlatformModuleTokenSpaceGuid.PcdEepromMapHobValid|0|BOOLEAN|0xEEEE0007 + ## Flag to tell if EEPROM image require DXE verification or not + gPlatformModuleTokenSpaceGuid.PcdEepromDxeVerificationRequired|0|BOOLEAN= |0xEEEE0008 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib= /PeiFspPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiFs= pPolicyInitLib/PeiFspPolicyInitLib.inf index 630408580b..5eef2aa88f 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFsp= PolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFsp= PolicyInitLib.inf @@ -71,6 +71,7 @@ PeiPolicyInitLib ScPlatformLib PcdLib + EepromPlatformLib [Pcd] diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib= /PeiFspSaPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFs= pPolicyInitLib/PeiFspSaPolicyInitLib.c index 4d08061208..2fb3bd9d3e 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFsp= SaPolicyInitLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFsp= SaPolicyInitLib.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -243,13 +244,15 @@ PeiFspSaPolicyInit ( // // Update VbtGuid. // - CopyMem (&PeiVbtGuid, PcdGetPtr (PcdBoardVbtFileGuid), sizeof (EFI_GUID)= ); - CopyMem (&PeiLogoGuid, PcdGetPtr (PcdOemLogoFileGuid), sizeof (EFI_GUID)= ); - - // - // Update UPD:LogoPtr - // - PeiGetSectionFromFv (PeiVbtGuid, &Buffer, &Size); + Status =3D EepromGetVbt (NULL, (UINT8**) &Buffer, &Size); + if (EFI_ERROR (Status)) { + CopyMem (&PeiVbtGuid, PcdGetPtr (PcdBoardVbtFileGuid), sizeof (EFI_GUI= D)); + + // + // Update VbtPtr + // + PeiGetSectionFromFv (PeiVbtGuid, &Buffer, &Size); + } if (Buffer =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "Could not locate VBT")); } @@ -262,7 +265,14 @@ PeiFspSaPolicyInit ( DEBUG ((DEBUG_INFO, "VbtPtr from PeiGetSectionFromFv is 0x%x\n", FspsUpd= ->FspsConfig.GraphicsConfigPtr)); DEBUG ((DEBUG_INFO, "VbtSize from PeiGetSectionFromFv is 0x%x\n", Size))= ; - PeiGetSectionFromFv (PeiLogoGuid, &Buffer, &Size); + // + // Get Logo + // + Status =3D EepromGetLogo (NULL, (UINT8**) &Buffer, &Size); + if (EFI_ERROR (Status)) { + CopyMem (&PeiLogoGuid, PcdGetPtr (PcdOemLogoFileGuid), sizeof (EFI_GUI= D)); + PeiGetSectionFromFv (PeiLogoGuid, &Buffer, &Size); + } if (Buffer =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "Could not locate Logo")); } diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPo= stMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettin= gs/PlatformPostMemPei/PlatformInit.c index eceecdf730..5ff92d7e2e 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPe= i/PlatformInit.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPe= i/PlatformInit.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #ifdef __GNUC__ @@ -273,12 +274,16 @@ BXTPolicyInit ( EFI_GUID PeiLogoGuid =3D { 0x7BB28B99, 0x6= 1BB, 0x11D5, {0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }; EFI_GUID VbtGuid; VBT_INFO VbtInfo; + EFI_STATUS Status; DEBUG ((DEBUG_INFO, " BXTPolicyInit: SystemAgent PEI Platform Policy Ini= tialization begin \n")); - PeiGetSectionFromFv (PeiLogoGuid, &Buffer, &Size); + Status =3D EepromGetLogo (NULL, (UINT8**) &Buffer, &Size); + if (EFI_ERROR (Status)) { + PeiGetSectionFromFv (PeiLogoGuid, &Buffer, &Size); + } if (Buffer =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "Could not locate PeiLogo")); } @@ -286,9 +291,11 @@ BXTPolicyInit ( // // May need a different VBT depending on PanelSel // - CopyMem (&VbtGuid, PcdGetPtr (PcdBoardVbtFileGuid), sizeof (EFI_GUID)); - PeiGetSectionFromFv (VbtGuid, &Buffer, &Size); - + Status =3D EepromGetVbt (NULL, (UINT8**) &Buffer, &Size); + if (EFI_ERROR (Status)) { + CopyMem (&VbtGuid, PcdGetPtr (PcdBoardVbtFileGuid), sizeof (EFI_GUID))= ; + PeiGetSectionFromFv (VbtGuid, &Buffer, &Size); + } if (Buffer =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "Could not locate VBT")); } diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPo= stMemPei/PlatformPostMemPei.inf b/Platform/BroxtonPlatformPkg/Common/Platfo= rmSettings/PlatformPostMemPei/PlatformPostMemPei.inf index 4a50131764..d27f3aea45 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPe= i/PlatformPostMemPei.inf +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPe= i/PlatformPostMemPei.inf @@ -56,6 +56,7 @@ TimerLib ScPlatformLib SeCUmaLib + EepromPlatformLib [Ppis] gEfiPeiStallPpiGuid diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPr= eMemPei/PlatformInitPreMem.c b/Platform/BroxtonPlatformPkg/Common/PlatformS= ettings/PlatformPreMemPei/PlatformInitPreMem.c index a0c5e82e5c..270e6baa57 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei= /PlatformInitPreMem.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei= /PlatformInitPreMem.c @@ -228,7 +228,7 @@ CopyMemSse4 ( { #ifdef __GNUC__ - CopyMem (Dst, Src, SizeInBytes); + CopyMem (Dst, Src, SizeInBytes); #else _asm { // @@ -1086,7 +1086,7 @@ PlatformInitPreMemEntryPoint ( ASSERT_EFI_ERROR (Status); return Status; } - + VariableSize =3D sizeof (AcpiVariableSetCompatibility); Status =3D VariableServices->GetVariable ( VariableServices, @@ -1104,7 +1104,7 @@ PlatformInitPreMemEntryPoint ( sizeof (AcpiVarHobSize) ); - DEBUG ((DEBUG_INFO, "AcpiVariableAddr : 0x%08x\n", AcpiVariableSetComp= atibility)); + DEBUG ((DEBUG_INFO, "AcpiVariableAddr : 0x%08x\n", AcpiVariableSetComp= atibility)); PERF_START_EX (NULL, "RstVctr", "IBBL", 1, 0x1000); Tick =3D CarMap->IbblPerfRecord0; @@ -1348,11 +1348,13 @@ PlatformInitPreMemEntryPoint ( DEBUG ((DEBUG_INFO, "IBBM address: %x\n", Memory)); PeiServicesInstallFvInfoPpi ( NULL, - (VOID *) Memory, + Memory, PcdGet32 (PcdFlashFvIBBMSize), NULL, NULL ); + // Added this so that IBBM is available during DXE so the EEPROM lib= rary can find the FV copy of the EEPROM binary + BuildFvHob ((EFI_PHYSICAL_ADDRESS) Memory, PcdGet32 (PcdFlashFvIBBMS= ize)); } else { ASSERT (FALSE); } @@ -1409,7 +1411,7 @@ ReadBxtIPlatformIds ( /** Description: - This function finds the matched default data and create GUID hob for it. + This function finds the matched default data and create GUID hob for it. Arguments: @@ -1553,7 +1555,7 @@ PlatformCreateDefaultVariableHob ( DefaultInfo ++; } // - // Size is 24 bits wide so mask upper 8 bits. + // Size is 24 bits wide so mask upper 8 bits. // SectionLength is adjusted it is 4 byte aligned. // Go to the next section // diff --git a/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMem= oryConfig.c b/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMe= moryConfig.c index 58b19c0236..a264f38548 100644 --- a/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMemoryConf= ig.c +++ b/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMemoryConf= ig.c @@ -2,7 +2,7 @@ This is the driver that locates the MemoryConfigurationData HOB, if it exists, and saves the data to NVRAM. - Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -30,6 +30,7 @@ #include #include #include +#include #define MRC_DATA_REQUIRED_FROM_OUTSIDE #include "MmrcData.h" @@ -297,6 +298,12 @@ SaveMemoryConfigEntryPoint ( } // + // Do some EEPROM checking here and install valid image into memory. We = perform the check here so that + // if a reset is required, it is after the MRC training data has been sa= ved so that the next POST isn't as slow. + // + GetValidEepromLibrary (TRUE); + + // // This driver does not produce any protocol services, so always unload = it. // return EFI_UNLOAD_IMAGE; diff --git a/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMem= oryConfigDxe.inf b/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/S= aveMemoryConfigDxe.inf index 919f16779a..168e07234a 100644 --- a/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMemoryConf= igDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/SaveMemoryConfigDxe/SaveMemoryConf= igDxe.inf @@ -1,7 +1,7 @@ ## @file # Component description for driver that locates the MemoryConfigurationDat= a HOB, which saves the data to NVRAM. # -# Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License @@ -40,6 +40,7 @@ UefiLib BaseLib HeciMsgLib + EepromLib [Protocols] gMemInfoProtocolGuid diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc b/= Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc index dd65c37dcd..56f4d63789 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc @@ -110,7 +110,6 @@ !if $(TARGET) =3D=3D DEBUG gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2E - gPlatformModuleTokenSpaceGuid.PcdFlashFvIBBMBase|0xFEF30000 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc b/Platform= /BroxtonPlatformPkg/PlatformDsc/Defines.dsc index a2da30bf72..a07b8778dc 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc @@ -150,17 +150,18 @@ DEFINE FTPM_ENABLE =3D TRUE DEFINE TPM12_ENABLE =3D TRUE - DEFINE FSP_IBBL_SIZE =3D 0x2000 - DEFINE BLD_IBBL_SIZE =3D 0x6000 - DEFINE FSP_IBBM_SIZE =3D 0x58000 - DEFINE BLD_IBBM_SIZE =3D 0x35000 - + # + # NOTE: These last defines are tied to InitNEM.asm. Be sure and update= that file if they change. + # + DEFINE FSP_IBBM_SIZE =3D 0x00059000 # Size of FSP_M= .fv + DEFINE BLD_IBBM_SIZE =3D 0x00039000 # Size of IBBM = FV DEFINE CAR_BASE_ADDRESS =3D 0xFEF00000 # @PcdTemporary= RamBase - DEFINE BLD_RAM_DATA_SIZE =3D 0x16000 # BOOTLOADER te= mp memory size - DEFINE FSP_RAM_DATA_SIZE =3D 0x2A000 # FSP temp memo= ry size - DEFINE FSP_EMP_DATA_SIZE =3D 0x05000 # Free space - DEFINE BLD_RAM_CODE_SIZE =3D $(BLD_IBBM_SIZE) - DEFINE FSP_RAM_CODE_SIZE =3D $(FSP_IBBM_SIZE) - DEFINE CAR_REGION_SIZE =3D 0x100000 + DEFINE BLD_RAM_DATA_SIZE =3D 0x00016000 # BOOTLOADER te= mp memory size + DEFINE FSP_RAM_DATA_SIZE =3D 0x0002A000 # FSP temp memo= ry size + DEFINE FSP_EMP_DATA_SIZE =3D 0x00005000 # Free space + DEFINE CAR_REGION_SIZE =3D 0x00100000 DEFINE SOURCE_DEBUG_ENABLE =3D FALSE + DEFINE EXT_BIOS_ENABLE =3D FALSE # False =3D 3MB BIOS; True = =3D 5MB BIOS + DEFINE EEPROM_CODE_ENABLE =3D FALSE + diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PE= I.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc index 86767bf278..678250d884 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc @@ -67,8 +67,14 @@ # # EEPROM binary libs # - BaseCryptLib | CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf - EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromDat= aLib/EepromDataPeiLib.inf - EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromLib= /EepromPeiLib.inf - EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromPla= tformLib/EepromPlatformPeiLib.inf + BaseCryptLib | CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf + !if $(EEPROM_CODE_ENABLE) =3D=3D TRUE + EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromD= ataLib/EepromDataPeiLib.inf + EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromL= ib/EepromPeiLib.inf + EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromP= latformLib/EepromPlatformPeiLib.inf + !else + EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromD= ataLib/EepromDataPeiNullLib.inf + EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromL= ib/EepromNullLib.inf + EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromP= latformLib/EepromPlatformNullLib.inf + !endif diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc b/P= latform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc index ad5a70d498..cd8df538cd 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc @@ -101,7 +101,7 @@ PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.= inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.in= f - + # # Generic Modules # @@ -279,9 +279,15 @@ # # EEPROM binary libs # - BaseCryptLib | CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromDat= aLib/EepromDataLib.inf - EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromLib= /EepromLib.inf - EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromPla= tformLib/EepromPlatformLib.inf - I2cLib | $(PLATFORM_SI_PACKAGE)/SouthCluster/Library/I2cLib/I= 2cLib.inf + BaseCryptLib | CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + I2cLib | $(PLATFORM_SI_PACKAGE)/SouthCluster/Library/I2cLib= /I2cLib.inf + !if $(EEPROM_CODE_ENABLE) =3D=3D TRUE + EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromD= ataLib/EepromDataLib.inf + EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromL= ib/EepromLib.inf + EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromP= latformLib/EepromPlatformLib.inf + !else + EepromDataLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromD= ataLib/EepromDataNullLib.inf + EepromLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromL= ib/EepromNullLib.inf + EepromPlatformLib | $(PLATFORM_PACKAGE_COMMON)/Features/Eeprom/EepromP= latformLib/EepromPlatformNullLib.inf + !endif diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b= /Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc index 2346ce47d9..42056a617f 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc @@ -88,7 +88,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|115200 - !if $(MINNOW3_MODULE_BOARD) =3D=3D TRUE + !if $(EEPROM_CODE_ENABLE) =3D=3D TRUE # # I2C bus the master EEPROM is hanging on gPlatformModuleTokenSpaceGuid.PcdEepromBus|0x08 diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/Broxton= PlatformPkg/PlatformPkg.dec index aecaae9e5b..a19a57b90e 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec @@ -192,7 +192,7 @@ gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid|{ 0x00, 0x00, 0x00, 0x= 00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 = }|VOID*|0x80000014 ## This PCD used to enable or disable SueCreek gPlatformModuleTokenSpaceGuid.PcdSueCreek|FALSE|BOOLEAN|0x80000015 - ## This PCD used for QR code display under EFI Shell + ## This PCD used for QR code display under EFI Shell gPlatformModuleTokenSpaceGuid.PcdLogoDisplay|FALSE|BOOLEAN|0x80000016 ## This PCD used to select bluetooth device gPlatformModuleTokenSpaceGuid.PcdBtDevice|0x00|UINT8|0x80000017 @@ -255,6 +255,9 @@ gPlatformModuleTokenSpaceGuid.PcdEepromInMemoryFlag|0|BOOLEAN|0xEEEE0006 ## Flag to tell if EEPROM Map is in HOB gPlatformModuleTokenSpaceGuid.PcdEepromMapHobValid|0|BOOLEAN|0xEEEE0007 + ## Flag to tell if EEPROM image require DXE verification or not + gPlatformModuleTokenSpaceGuid.PcdEepromDxeVerificationRequired|0|BOOLEAN= |0xEEEE0008 + [PcdsFeatureFlag] # 0x10000000 ## This PCD specifies whether StatusCode is reported via ISA Serial port= . gEfiSerialPortTokenSpaceGuid.PcdStatusCodeUseIsaSerial|TRUE|BOOLEAN|0x00= 000020 @@ -349,7 +352,8 @@ ## EEPROM PCDs ## ## I2C bus the master EEPROM is hanging on - gPlatformModuleTokenSpaceGuid.PcdEepromBus|0x06|UINT8|0xEEEE2000 + ## 0-7 =3D I2C 8 =3D SmBus as I2C7 + gPlatformModuleTokenSpaceGuid.PcdEepromBus|0x08|UINT8|0xEEEE2000 ## 7-bit address of the master EEPROM gPlatformModuleTokenSpaceGuid.PcdEepromAddress|0x50|UINT8|0xEEEE2001 ## Priority order of EEPROM data libraries @@ -362,6 +366,9 @@ gPlatformModuleTokenSpaceGuid.PcdEepromFvImageFile|{0xAC, 0x3D, 0xBD, 0x= BF, 0xEB, 0x01, 0xEB, 0x4F, 0xA9, 0xDE, 0xBC, 0xC9, 0xD1, 0xBA, 0x55, 0x31}= |VOID*|0xEEEE2004 ## GPIO PAD whitelist | END OF ARRAY | gPlatformModuleTokenSpaceGuid.PcdGpioWhiteList|{0xFF, 0xFF, 0xFF, 0xFF}|= VOID*|0xEEEE2005 + ## EEPROM security violation policy action + ## 0x00 - CPU dead loop + gPlatformModuleTokenSpaceGuid.PcdEepromSecurityViolationPolicy|0x00|UINT= 8|0xEEEE2006 [PcdsPatchableInModule] ## MemoryCheck value for checking memory before boot OS. diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/Broxton= PlatformPkg/PlatformPkg.fdf index ca080bc472..a9b37249fd 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf @@ -14,6 +14,20 @@ ## [Defines] + #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + # FV label | Base | Offset | Size + #--------------------------|------------|------------|------------------= --------------------- + # FV_IBBL | 0xFFFFF000 | 0x00316000 | 0x00001000 + # Empty | 0xFFFFA000 | 0x00311000 | 0x00005000 + # FV_IBBM | 0xFFFC1000 | 0x002D8000 | 0x00039000 + # FTW_SPARE | 0xFFF81000 | 0x00298000 | 0x00040000 + # FTW_WORKING | 0xFFF7F000 | 0x00296000 | 0x00002000 + # FV_VPD | 0xFFF41000 | 0x00258000 | 0x0003E000 + # Empty | 0xFFF34000 | 0x0024B000 | 0x0000D000 + # FV_OBBX | 0xFFDBA000 | 0x000D1000 | 0x0017A000 + # FV_OBB | 0xFFD44000 | 0x0005B000 | 0x00076000 + # FV_IBBR | 0xFFCE9000 | 0x00000000 | 0x0005B000 + #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D !if $(EXT_BIOS_ENABLE) =3D=3D FALSE #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -37,7 +51,7 @@ DEFINE FLASH_AREA_SIZE =3D 0x0080= 0000 DEFINE FLASH_REGION_FV_IBBR_OFFSET =3D 0x0000= 0000 - DEFINE FLASH_REGION_FV_IBBR_SIZE =3D 0x0005= 0000 + DEFINE FLASH_REGION_FV_IBBR_SIZE =3D 0x0005= B000 DEFINE FLASH_REGION_OBB_OFFSET =3D $(FLAS= H_REGION_FV_IBBR_OFFSET) + $(FLASH_REGION_FV_IBBR_SIZE) DEFINE FLASH_REGION_OBB_SIZE =3D 0x0007= 6000 DEFINE FLASH_REGION_OBBX_OFFSET =3D $(FLAS= H_REGION_OBB_OFFSET) + $(FLASH_REGION_OBB_SIZE) @@ -236,37 +250,37 @@ # VBT For Leaf Hill (File Guid is gPeiLeafHillVbtGuid) FILE FREEFORM =3D 6AE80680-5E3F-4E63-A5F5-78E5214F13FE { SECTION RAW =3D $(PLATFORM_NAME)/Board/LeafHill/Vbt/VbtBxtMipi.bin - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtLeafHill" } # VBT For Minnowboard 3 (File Guid is gPeiMinnowBoard3VbtGuid) FILE FREEFORM =3D E08CA6D5-8D02-43ae-ABB1-952CC787C933 { SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3/Vbt/VbtBxtMipi.bin - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtMinnow3" } # VBT For Minnowboard 3 Module (File Guid is gPeiMinnow3ModuleVbtGuid) FILE FREEFORM =3D 1F9CBB42-107E-46A4-A2CB-92F586F9FB31 { SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3Module/Vbt/VbtBxtMi= pi.bin - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtMinnow3Module" } # VBT For Benson Glacier (File Guid is gPeiBensonGlacierVbtGuid) FILE FREEFORM =3D BFDE308E-2D5A-4CA7-AA76-19938AAAE4DA { SECTION RAW =3D $(PLATFORM_NAME)/Board/BensonGlacier/Vbt/VbtBxtMipi.bi= n - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtBensonGlacier" } # VBT For Aurora Glacier (File Guid is gPeiAuroraGlacierVbtGuid) FILE FREEFORM =3D AA80B0B1-BA1E-4D4F-83E0-CCF47AAA3CD8 { SECTION RAW =3D $(PLATFORM_NAME)/Board/AuroraGlacier/Vbt/VbtBxtMipi.bi= n - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtAuroaGlacier" } # VBT For Up2 (File Guid is gPeiUp2VbtGuid) FILE FREEFORM =3D 16667736-B2FE-49b3-A0EB-D6B9D7F9657B { SECTION RAW =3D $(PLATFORM_NAME)/Board/UP2/Vbt/Vbt.bin - SECTION UI =3D "IntelGopVbt1" + SECTION UI =3D "IntelGopVbtUp2" } !endif @@ -305,7 +319,7 @@ [FV.FVIBBM] BlockSize =3D $(FLASH_BLOCK_SIZE) - FvBaseAddress =3D 0xFEF45000 + FvBaseAddress =3D 0xFEF45000 # This should match InitNEM.asm .IBBB= ase FvAlignment =3D 16 #FV alignment and FV attributes settin= g. ERASE_POLARITY =3D 1 @@ -350,9 +364,12 @@ APRIORI PEI { INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/IntelFsp2WrapperPkg/FspmWrappe= rPeim/FspmWrapperPeim.inf INF RuleOverride =3D RESET_VECTOR USE =3D IA32 BroxtonSiPkg/Cpu/ResetVe= ctor/Vtf1/Bin/ResetVector.inf - FILE FREEFORM =3D PCD (gPlatformModuleTokenSpaceGuid.PcdEepromFvImageFil= e) { - SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3Module/Eeprom/MB3-E= eprom.bin - } + !if $(EEPROM_CODE_ENABLE) =3D=3D TRUE + FILE FREEFORM =3D PCD (gPlatformModuleTokenSpaceGuid.PcdEepromFvImageF= ile) { + SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3Module/Eeprom/MB3= -Eeprom.bin + } + !endif + [FV.FVIBBL] BlockSize =3D $(FLASH_BLOCK_SIZE) FvAlignment =3D 16 #FV alignment and FV attributes settin= g. @@ -420,9 +437,11 @@ APRIORI DXE { !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE INF SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf !endif - FILE FREEFORM =3D PCD (gPlatformModuleTokenSpaceGuid.PcdEepromPublicKeyF= ile) { - SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3Module/Eeprom/RSA-k= eys/MB3-public.bin - } + !if $(EEPROM_CODE_ENABLE) =3D=3D TRUE + FILE FREEFORM =3D PCD (gPlatformModuleTokenSpaceGuid.PcdEepromPublicKe= yFile) { + SECTION RAW =3D $(PLATFORM_NAME)/Board/MinnowBoard3Module/Eeprom/RSA= -keys/MB3-public.bin + } + !endif INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatu= sCodeRouterRuntimeDxe.inf diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc b/Platform/Bro= xtonPlatformPkg/PlatformPkgIA32.dsc index 262aca7606..f842ec6309 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformPkgIA32.dsc @@ -123,6 +123,7 @@ [LibraryClasses.Common.UEFI_APPLICATION] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + HeciMsgLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/HeciMsgLib/DxeSmmHeciMsgLi= b.inf ##########################################################################= ###### # diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc b/Platform/Brox= tonPlatformPkg/PlatformPkgX64.dsc index 483d23c234..6e1be38553 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64.dsc @@ -123,6 +123,7 @@ [LibraryClasses.Common.UEFI_APPLICATION] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + HeciMsgLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/HeciMsgLib/DxeSmmHeciMsgLi= b.inf ##########################################################################= ###### # diff --git a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc b/Platform/B= roxtonPlatformPkg/PlatformPkgX64Gcc.dsc index ab15dcc33d..2e978aed57 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformPkgX64Gcc.dsc @@ -1,170 +1,171 @@ -## @file -# Platform description. -# -# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
-# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the B= SD License -# which accompanies this distribution. The full text of the license may b= e found at -# http://opensource.org/licenses/bsd-license.php. -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. -# -## - -##########################################################################= ###### -# -# Defines Section - statements that will be processed to create a Makefile= . -# -##########################################################################= ###### -[Defines] - PLATFORM_NAME =3D BroxtonPlatformPkg - PLATFORM_GUID =3D 1D3686CF-D2CE-4B6E-9F59-28F61976= CB73 - PLATFORM_VERSION =3D 0.1 - DSC_SPECIFICATION =3D 0x00010005 - - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) - SUPPORTED_ARCHITECTURES =3D IA32|X64 - BUILD_TARGETS =3D DEBUG|RELEASE - SKUID_IDENTIFIER =3D DEFAULT - - # - # Set platform specific package/folder names, same as passed from PREBUI= LD script. - # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package= build folder - # The CORE_PACKAGES value could be set to '.' if Core packages get moved= to Workspace root - # - DEFINE SILICON_NAME =3D BroxtonSoC - DEFINE PLATFORM_PACKAGE_COMMON =3D $(PLATFORM_NAME)/Common - DEFINE PLATFORM_SI_PACKAGE =3D $(SILICON_NAME)/BroxtonSiPkg - - !include DefineAtBuildMacros.dsc - !include PlatformDsc/Defines.dsc - -##########################################################################= ###### -# -# SKU Identification section - list of all SKU IDs supported by this Platf= orm. -# -##########################################################################= ###### -[SkuIds] - 0|DEFAULT # The entry: 0|DEFAULT is reserved and always req= uired. - -##########################################################################= ###### -# -# Library Class section - list of all Library Classes needed by this Platf= orm. -# -##########################################################################= ###### -[LibraryClasses.Common] - # - # RC Package - # - !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gCommonLib.dsc - # - # Platform - # - !include PlatformDsc/LibraryClasses.dsc - -[LibraryClasses.IA32.SEC] - !if $(PERFORMANCE_ENABLE) =3D=3D TRUE - PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLi= bNull.inf - !endif - -[LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA= 32.SEC] -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE - !if $(INTEL_FPDT_ENABLE) =3D=3D TRUE - PerformanceLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiFpdtPerformanceLi= b/PeiFpdtPerformanceLib.inf - !else - PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLi= b.inf - !endif -!endif - # - # RC Package - # - !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gPeiLib.dsc - - !include PlatformDsc/LibraryClasses.IA32.PEI.dsc - -[LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE] -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE - !if $(INTEL_FPDT_ENABLE) =3D=3D TRUE - PerformanceLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiFpdtPerformanceLi= b/PeiFpdtPerformanceLib.inf - !else - PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLi= b.inf - !endif - TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTi= merLib.inf -!endif - -[LibraryClasses.IA32.DXE_DRIVER] - !if $(PERFORMANCE_ENABLE) =3D=3D TRUE - PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLi= b.inf - TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTsc= TimerLib.inf - !endif - -[LibraryClasses.Common.DXE_DRIVER, LibraryClasses.Common.DXE_CORE, Library= Classes.Common.DXE_SMM_DRIVER, LibraryClasses.Common.SMM_CORE, LibraryClass= es.Common.DXE_RUNTIME_DRIVER] - # - # RC Package - # - !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gDxeLib.dsc - -[LibraryClasses.Common.DXE_DRIVER] - !include PlatformDsc/LibraryClasses.DxeDriver.dsc - -[LibraryClasses.Common.DXE_CORE] - !include PlatformDsc/LibraryClasses.DxeCore.dsc - -[LibraryClasses.Common.DXE_SMM_DRIVER] - !include PlatformDsc/LibraryClasses.DxeSmmDriver.dsc - -[LibraryClasses.Common.SMM_CORE] - !include PlatformDsc/LibraryClasses.SmmCore.dsc - -[LibraryClasses.Common.DXE_RUNTIME_DRIVER] - !include PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc - -[LibraryClasses.Common.UEFI_APPLICATION] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - -##########################################################################= ###### -# -# Pcd Section - list of all EDK II PCD Entries defined by this Platform -# -##########################################################################= ###### -[PcdsFeatureFlag.Common] - !include PlatformDsc/PcdsFeatureFlag.dsc - -[PcdsFixedAtBuild.Common] - gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|0x9 - !include PlatformDsc/PcdsFixedAtBuild.dsc - -[PcdsPatchableInModule.Common] - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x807B05FF - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x$(PLATFORM_PCIEXPRES= S_BASE) - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion= |FALSE - ## Default Creator ID for ACPI table creation, override to "BRXT" - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x54585242 - -[PcdsDynamicHii.Common.DEFAULT] - !include PlatformDsc/PcdsDynamicHii.Default.dsc - -[PcdsDynamicDefault.Common.DEFAULT] - !include PlatformDsc/PcdsDynamicDefault.Default.dsc - -[Components.IA32] - !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gPei.dsc - !include PlatformDsc/Components.IA32.dsc - -[Components.X64] - !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gDxe.dsc - !include PlatformDsc/Components.dsc - $(PLATFORM_SI_PACKAGE)/SouthCluster/ScInit/Dxe/ScInitDxe.inf - -##########################################################################= ###### -# -# Build Options section - list of all Build Flags used by this Platform. -# -##########################################################################= ###### -#[BuildOptions.Common] - -[BuildOptions.Common.EDKII] - !include PlatformDsc/BuildOptions.EDKII.Gcc.dsc - +## @file +# Platform description. +# +# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may b= e found at +# http://opensource.org/licenses/bsd-license.php. +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +##########################################################################= ###### +# +# Defines Section - statements that will be processed to create a Makefile= . +# +##########################################################################= ###### +[Defines] + PLATFORM_NAME =3D BroxtonPlatformPkg + PLATFORM_GUID =3D 1D3686CF-D2CE-4B6E-9F59-28F61976= CB73 + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x00010005 + + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D IA32|X64 + BUILD_TARGETS =3D DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + + # + # Set platform specific package/folder names, same as passed from PREBUI= LD script. + # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package= build folder + # The CORE_PACKAGES value could be set to '.' if Core packages get moved= to Workspace root + # + DEFINE SILICON_NAME =3D BroxtonSoC + DEFINE PLATFORM_PACKAGE_COMMON =3D $(PLATFORM_NAME)/Common + DEFINE PLATFORM_SI_PACKAGE =3D $(SILICON_NAME)/BroxtonSiPkg + + !include DefineAtBuildMacros.dsc + !include PlatformDsc/Defines.dsc + +##########################################################################= ###### +# +# SKU Identification section - list of all SKU IDs supported by this Platf= orm. +# +##########################################################################= ###### +[SkuIds] + 0|DEFAULT # The entry: 0|DEFAULT is reserved and always req= uired. + +##########################################################################= ###### +# +# Library Class section - list of all Library Classes needed by this Platf= orm. +# +##########################################################################= ###### +[LibraryClasses.Common] + # + # RC Package + # + !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gCommonLib.dsc + # + # Platform + # + !include PlatformDsc/LibraryClasses.dsc + +[LibraryClasses.IA32.SEC] + !if $(PERFORMANCE_ENABLE) =3D=3D TRUE + PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLi= bNull.inf + !endif + +[LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA= 32.SEC] +!if $(PERFORMANCE_ENABLE) =3D=3D TRUE + !if $(INTEL_FPDT_ENABLE) =3D=3D TRUE + PerformanceLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiFpdtPerformanceLi= b/PeiFpdtPerformanceLib.inf + !else + PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLi= b.inf + !endif +!endif + # + # RC Package + # + !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gPeiLib.dsc + + !include PlatformDsc/LibraryClasses.IA32.PEI.dsc + +[LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE] +!if $(PERFORMANCE_ENABLE) =3D=3D TRUE + !if $(INTEL_FPDT_ENABLE) =3D=3D TRUE + PerformanceLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiFpdtPerformanceLi= b/PeiFpdtPerformanceLib.inf + !else + PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLi= b.inf + !endif + TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTi= merLib.inf +!endif + +[LibraryClasses.IA32.DXE_DRIVER] + !if $(PERFORMANCE_ENABLE) =3D=3D TRUE + PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLi= b.inf + TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTsc= TimerLib.inf + !endif + +[LibraryClasses.Common.DXE_DRIVER, LibraryClasses.Common.DXE_CORE, Library= Classes.Common.DXE_SMM_DRIVER, LibraryClasses.Common.SMM_CORE, LibraryClass= es.Common.DXE_RUNTIME_DRIVER] + # + # RC Package + # + !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gDxeLib.dsc + +[LibraryClasses.Common.DXE_DRIVER] + !include PlatformDsc/LibraryClasses.DxeDriver.dsc + +[LibraryClasses.Common.DXE_CORE] + !include PlatformDsc/LibraryClasses.DxeCore.dsc + +[LibraryClasses.Common.DXE_SMM_DRIVER] + !include PlatformDsc/LibraryClasses.DxeSmmDriver.dsc + +[LibraryClasses.Common.SMM_CORE] + !include PlatformDsc/LibraryClasses.SmmCore.dsc + +[LibraryClasses.Common.DXE_RUNTIME_DRIVER] + !include PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc + +[LibraryClasses.Common.UEFI_APPLICATION] + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + HeciMsgLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/HeciMsgLib/DxeSmmHeciMsgLi= b.inf + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### +[PcdsFeatureFlag.Common] + !include PlatformDsc/PcdsFeatureFlag.dsc + +[PcdsFixedAtBuild.Common] + gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported|0x9 + !include PlatformDsc/PcdsFixedAtBuild.dsc + +[PcdsPatchableInModule.Common] + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x807B05FF + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x$(PLATFORM_PCIEXPRES= S_BASE) + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion= |FALSE + ## Default Creator ID for ACPI table creation, override to "BRXT" + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x54585242 + +[PcdsDynamicHii.Common.DEFAULT] + !include PlatformDsc/PcdsDynamicHii.Default.dsc + +[PcdsDynamicDefault.Common.DEFAULT] + !include PlatformDsc/PcdsDynamicDefault.Default.dsc + +[Components.IA32] + !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gPei.dsc + !include PlatformDsc/Components.IA32.dsc + +[Components.X64] + !include $(WORKSPACE)/edk2-platforms/Silicon/$(PLATFORM_SI_PACKAGE)/SiPk= gDxe.dsc + !include PlatformDsc/Components.dsc + $(PLATFORM_SI_PACKAGE)/SouthCluster/ScInit/Dxe/ScInitDxe.inf + +##########################################################################= ###### +# +# Build Options section - list of all Build Flags used by this Platform. +# +##########################################################################= ###### +#[BuildOptions.Common] + +[BuildOptions.Common.EDKII] + !include PlatformDsc/BuildOptions.EDKII.Gcc.dsc + diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/ResetVector/Vtf0/Ia32/Init= NEM.asm b/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/ResetVector/Vtf0/Ia32/InitNEM= .asm index 905e615a2c..0ec3e82f90 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/ResetVector/Vtf0/Ia32/InitNEM.asm +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/ResetVector/Vtf0/Ia32/InitNEM.asm @@ -1,7 +1,7 @@ ;; @file ; Search for the Boot Firmware Volume (BFV) base address. ; -; Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.
+; Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
; ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BS= D License @@ -178,18 +178,31 @@ sub %1, fourGigabytes - %2 ALIGN 16 HOBStructure: istruc HobStruc + ; + ; NOTE: The $(Variable) values come from defines.dsc + ; + ; .CarBase =3D $(CAR_BASE_ADDRESS) + ; .CarSize =3D $(CAR_REGION_SIZE) + ; .StackBase =3D .CarBase + ; .StackSize =3D $(BLD_RAM_DATA_SIZE) + ; .IBBLBase =3D .CarBase + .StackSize + $(FSP_RAM_DATA_SIZE) + ; .IBBLSize =3D $(FLASH_REGION_FV_IBBL_SIZE) + ; .FITBase =3D .IBBLBase + .IBBLSize + ; .IBBBase =3D .FitBase + 0x00004000 + ; .IBBSize =3D $(BLD_IBBM_SIZE) + $(FSP_IBBM_SIZE) + ; dd "$SIG" ; .Sign - dd 0xFEF00000 ; .CarBase - dd 0x00100000 ; .CarSize + dd 0xFEF00000 ; .CarBase =3D $(CAR_BASE_ADDRESS) + dd 0x00100000 ; .CarSize =3D $(CAR_REGION_SIZE) dd 0xFFF00000 ; .IBBSource =3D Not used - dd 0xFEF45000 ; .IBBBase =3D .CarBase - dd 0x0008E000 ; .IBBSize =3D size of (FVIBBM.fv+FSP_M.fv) =3D BLD= _IBBM_SIZE + FSP_IBBM_SIZE =3D 0x8D000 + dd 0xFEF45000 ; .IBBBase =3D .FitBase + 0x00004000 + dd 0x00092000 ; .IBBSize =3D $(BLD_IBBM_SIZE) + $(FSP_IBBM_SIZE) dd 0xFFFFF000 ; .IBBLSource =3D 0x100000000 - .IBBLSize =3D PcdFlash= FvIBBLBase - dd 0xFEF40000 ; .IBBLBase =3D .IBBBase + .IBBSize + dd 0xFEF40000 ; .IBBLBase =3D .CarBase + $(BLD_RAM_DATA_SIZE) + $(= FSP_RAM_DATA_SIZE) dd 0x00001000 ; .IBBLSize =3D PcdFlashFvIBBLSize =3D FLASH_REGION_= FV_IBBL_SIZE in .fdf - dd 0xFEF41000 ; .FITBase - dd 0xFEF00000 ; .Stack&Heap Base - dd 0x16000 ; .Stack&Heap Size + dd 0xFEF41000 ; .FITBase =3D .IBBLBase + .IBBLSize + dd 0xFEF00000 ; .StackBase =3D .CarBase + dd 0x00016000 ; .StackSize =3D $(BLD_RAM_DATA_SIZE) dd 0 ; .HostToCse dd 0 ; .CseToHost dd 0 ; .ChunkIndex -- 2.11.0.windows.1