From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web10.21388.1574326763463229475 for ; Thu, 21 Nov 2019 00:59:24 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 00:59:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,224,1571727600"; d="scan'208";a="210033057" Received: from nldesimo-desk1.amr.corp.intel.com ([10.7.159.63]) by orsmga006.jf.intel.com with ESMTP; 21 Nov 2019 00:59:20 -0800 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Michael Kubacki Subject: [edk2-platforms] [PATCH V2 08/14] WhiskeylakeOpenBoardPkg: Whitespace cleanup in BoardInitLib Date: Thu, 21 Nov 2019 00:58:47 -0800 Message-Id: <20191121085853.2626-9-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.24.0.windows.2 In-Reply-To: <20191121085853.2626-1-nathaniel.l.desimone@intel.com> References: <20191121085853.2626-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: Chasel Chiu Cc: Michael Kubacki Signed-off-by: Nate DeSimone --- .../PeiWhiskeylakeURvpInitPostMemLib.c | 185 ++++++------- .../PeiWhiskeylakeURvpInitPreMemLib.c | 257 +++++++++--------- 2 files changed, 216 insertions(+), 226 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library= /BoardInitLib/PeiWhiskeylakeURvpInitPostMemLib.c b/Platform/Intel/Whiskeyla= keOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/PeiWhiskeylakeURvpInitP= ostMemLib.c index 248a6657d5..827af6bb57 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardI= nitLib/PeiWhiskeylakeURvpInitPostMemLib.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardI= nitLib/PeiWhiskeylakeURvpInitPostMemLib.c @@ -33,16 +33,16 @@ #include "WhiskeylakeURvpInit.h"=0D =0D EFI_STATUS=0D -BoardFunctionInit(=0D +BoardFunctionInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D /**=0D -GPIO init function for PEI post memory phase.=0D + GPIO init function for PEI post memory phase.=0D =0D -@param[in] BoardId An unsigned integrer represent the board id.=0D + @param[in] BoardId An unsigned integrer represent the board id.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D BoardGpioInit(=0D @@ -72,48 +72,48 @@ BoardGpioInit( }=0D =0D /**=0D -Touch panel GPIO init function for PEI post memory phase.=0D + Touch panel GPIO init function for PEI post memory phase.=0D =0D -@param[in] BoardId An unsigned integrer represent the board id.=0D + @param[in] BoardId An unsigned integrer represent the board id.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D -TouchPanelGpioInit(=0D +TouchPanelGpioInit (=0D IN UINT16 BoardId=0D -)=0D + )=0D {=0D switch (BoardId) {=0D default:=0D - PcdSet32S(PcdBoardGpioTableTouchPanel, 0);=0D + PcdSet32S (PcdBoardGpioTableTouchPanel, 0);=0D break;=0D }=0D return EFI_SUCCESS;=0D }=0D =0D /**=0D -Misc. init function for PEI post memory phase.=0D + Misc. init function for PEI post memory phase.=0D =0D -@param[in] BoardId An unsigned integrer represent the board id.=0D + @param[in] BoardId An unsigned integrer represent the board id.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D -BoardMiscInit(=0D +BoardMiscInit (=0D IN UINT16 BoardId=0D -)=0D + )=0D {=0D - PcdSetBoolS(PcdDebugUsbUartEnable, FALSE);=0D + PcdSetBoolS (PcdDebugUsbUartEnable, FALSE);=0D =0D switch (BoardId) {=0D =0D case BoardIdWhiskeyLakeRvp:=0D =0D - PcdSetBoolS(PcdMipiCamGpioEnable, TRUE);=0D + PcdSetBoolS (PcdMipiCamGpioEnable, TRUE);=0D break;=0D =0D default:=0D - PcdSetBoolS(PcdMipiCamGpioEnable, FALSE);=0D + PcdSetBoolS (PcdMipiCamGpioEnable, FALSE);=0D break;=0D }=0D =0D @@ -121,25 +121,22 @@ BoardMiscInit( }=0D =0D /**=0D -Security GPIO init function for PEI post memory phase.=0D + Security GPIO init function for PEI post memory phase.=0D =0D -@param[in] BoardId An unsigned integrer represent the board id.=0D + @param[in] BoardId An unsigned integrer represent the board id.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D BoardSecurityInit (=0D IN UINT16 BoardId=0D -)=0D + )=0D {=0D switch (BoardId) {=0D -=0D case BoardIdWhiskeyLakeRvp:=0D -=0D // TPM interrupt connects to GPIO_CNL_H_GPP_A_7=0D PcdSet32S (PcdTpm2CurrentIrqNum, 0x1F);=0D break;=0D -=0D }=0D =0D return EFI_SUCCESS;=0D @@ -147,7 +144,6 @@ BoardSecurityInit ( =0D /**=0D Board configuration initialization in the post-memory boot phase.=0D -=0D **/=0D VOID=0D BoardConfigInit (=0D @@ -178,27 +174,26 @@ BoardConfigInit ( ASSERT_EFI_ERROR (Status);=0D }=0D =0D -//@todo Review this functionality and if it is required for WHL SDS=0D /**=0D -Create the HOB for hotkey status for 'Attempt USB First' feature=0D + Create the HOB for hotkey status for 'Attempt USB First' feature=0D =0D -@retval EFI_SUCCESS HOB Creating successful.=0D -@retval Others HOB Creating failed.=0D + @retval EFI_SUCCESS HOB Creating successful.=0D + @retval Others HOB Creating failed.=0D **/=0D EFI_STATUS=0D -CreateAttemptUsbFirstHotkeyInfoHob(=0D +CreateAttemptUsbFirstHotkeyInfoHob (=0D VOID=0D -)=0D + )=0D {=0D EFI_STATUS Status;=0D ATTEMPT_USB_FIRST_HOTKEY_INFO AttemptUsbFirstHotkeyInfo;=0D =0D Status =3D EFI_SUCCESS;=0D =0D - ZeroMem(=0D + ZeroMem (=0D &AttemptUsbFirstHotkeyInfo,=0D - sizeof(AttemptUsbFirstHotkeyInfo)=0D - );=0D + sizeof (AttemptUsbFirstHotkeyInfo)=0D + );=0D =0D AttemptUsbFirstHotkeyInfo.RevisonId =3D 0;=0D AttemptUsbFirstHotkeyInfo.HotkeyTriggered =3D FALSE;=0D @@ -206,29 +201,29 @@ CreateAttemptUsbFirstHotkeyInfoHob( ///=0D /// Build HOB for Attempt USB First feature=0D ///=0D - BuildGuidDataHob(=0D + BuildGuidDataHob (=0D &gAttemptUsbFirstHotkeyInfoHobGuid,=0D &(AttemptUsbFirstHotkeyInfo),=0D - sizeof(ATTEMPT_USB_FIRST_HOTKEY_INFO)=0D - );=0D + sizeof (ATTEMPT_USB_FIRST_HOTKEY_INFO)=0D + );=0D =0D return Status;=0D }=0D =0D /**=0D -Search and identify the physical address of a=0D -file module inside the FW_BINARIES_FV_SIGNED FV=0D + Search and identify the physical address of a=0D + file module inside the FW_BINARIES_FV_SIGNED FV=0D =0D -@retval EFI_SUCCESS If address has been found=0D -@retval Others If address has not been found=0D + @retval EFI_SUCCESS If address has been found=0D + @retval Others If address has not been found=0D **/=0D EFI_STATUS=0D -FindModuleInFlash2(=0D +FindModuleInFlash2 (=0D IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader,=0D IN EFI_GUID *GuidPtr,=0D IN OUT UINT32 *ModulePtr,=0D IN OUT UINT32 *ModuleSize=0D -)=0D + )=0D {=0D EFI_FFS_FILE_HEADER *FfsHeader;=0D EFI_FV_FILE_INFO FileInfo;=0D @@ -246,57 +241,57 @@ FindModuleInFlash2( //=0D // Locate FV_IMAGE file type in the FW_BINARIES_FV_SIGNED firmware vol= ume=0D //=0D - Status =3D PeiServicesFfsFindNextFile(EFI_FV_FILETYPE_FIRMWARE_VOLUME_= IMAGE, FvHeader, &FileHandle);=0D - if (EFI_ERROR(Status)) {=0D + Status =3D PeiServicesFfsFindNextFile (EFI_FV_FILETYPE_FIRMWARE_VOLUME= _IMAGE, FvHeader, &FileHandle);=0D + if (EFI_ERROR (Status)) {=0D // unable to find FV_IMAGE file in this FV=0D break;=0D }=0D =0D FfsHeader =3D (EFI_FFS_FILE_HEADER*)FileHandle;=0D - DEBUG((DEBUG_INFO, "FfsHeader 0x%X:\n", FfsHeader));=0D - DEBUG((DEBUG_INFO, " Name =3D 0x%g\n", &FfsHeader->Name));=0D - DEBUG((DEBUG_INFO, " Type =3D 0x%X\n", FfsHeader->Type));=0D - if (IS_FFS_FILE2(FfsHeader)) {=0D - DEBUG((DEBUG_INFO, " Size =3D 0x%X\n", FFS_FILE2_SIZE(FfsHeader)));= =0D + DEBUG ((DEBUG_INFO, "FfsHeader 0x%X:\n", FfsHeader));=0D + DEBUG ((DEBUG_INFO, " Name =3D 0x%g\n", &FfsHeader->Name));=0D + DEBUG ((DEBUG_INFO, " Type =3D 0x%X\n", FfsHeader->Type));=0D + if (IS_FFS_FILE2 (FfsHeader)) {=0D + DEBUG ((DEBUG_INFO, " Size =3D 0x%X\n", FFS_FILE2_SIZE(FfsHeader)));= =0D }=0D else {=0D - DEBUG((DEBUG_INFO, " Size =3D 0x%X\n", FFS_FILE_SIZE(FfsHeader)));=0D + DEBUG ((DEBUG_INFO, " Size =3D 0x%X\n", FFS_FILE_SIZE(FfsHeader)));= =0D }=0D =0D //=0D // Locate FW_BINARIES_FV FV_IMAGE Section=0D //=0D - Status =3D PeiServicesFfsFindSectionData(EFI_SECTION_FIRMWARE_VOLUME_I= MAGE, FileHandle, &FileBuffer);=0D - if (EFI_ERROR(Status)) {=0D + Status =3D PeiServicesFfsFindSectionData (EFI_SECTION_FIRMWARE_VOLUME_= IMAGE, FileHandle, &FileBuffer);=0D + if (EFI_ERROR (Status)) {=0D // continue to search for the next FV_IMAGE file=0D - DEBUG((DEBUG_INFO, "FW_BINARIES_FV section not found. Status =3D %r\= n", Status));=0D + DEBUG ((DEBUG_INFO, "FW_BINARIES_FV section not found. Status =3D %r= \n", Status));=0D continue;=0D }=0D =0D SectionHeader =3D (EFI_COMMON_SECTION_HEADER *)FileBuffer;=0D - DEBUG((DEBUG_INFO, "GUIDED SectionHeader 0x%X:\n",=0D + DEBUG ((DEBUG_INFO, "GUIDED SectionHeader 0x%X:\n",=0D (UINT32)(UINT8 *)SectionHeader));=0D if (IS_SECTION2(SectionHeader)) {=0D - DEBUG((DEBUG_INFO, " Guid =3D 0x%g\n",=0D + DEBUG ((DEBUG_INFO, " Guid =3D 0x%g\n",=0D &((EFI_GUID_DEFINED_SECTION2 *)SectionHeader)->SectionDefinitionGu= id));=0D - DEBUG((DEBUG_INFO, " DataOfset =3D 0x%X\n",=0D + DEBUG ((DEBUG_INFO, " DataOfset =3D 0x%X\n",=0D ((EFI_GUID_DEFINED_SECTION2 *)SectionHeader)->DataOffset));=0D }=0D else {=0D - DEBUG((DEBUG_INFO, " Guid =3D 0x%g\n",=0D + DEBUG ((DEBUG_INFO, " Guid =3D 0x%g\n",=0D &((EFI_GUID_DEFINED_SECTION *)SectionHeader)->SectionDefinitionGui= d));=0D - DEBUG((DEBUG_INFO, " DataOfset =3D 0x%X\n",=0D + DEBUG ((DEBUG_INFO, " DataOfset =3D 0x%X\n",=0D ((EFI_GUID_DEFINED_SECTION *)SectionHeader)->DataOffset));=0D }=0D - DEBUG((DEBUG_INFO, " Type =3D 0x%X\n", SectionHeader->Type));=0D + DEBUG ((DEBUG_INFO, " Type =3D 0x%X\n", SectionHeader->Type));=0D =0D //=0D // Locate Firmware File System file within Firmware Volume=0D //=0D - Status =3D PeiServicesFfsFindFileByName(GuidPtr, FileBuffer, (VOID **)= &FfsHeader);=0D - if (EFI_ERROR(Status)) {=0D + Status =3D PeiServicesFfsFindFileByName (GuidPtr, FileBuffer, (VOID **= )&FfsHeader);=0D + if (EFI_ERROR (Status)) {=0D // continue to search for the next FV_IMAGE file=0D - DEBUG((DEBUG_INFO, "Module not found. Status =3D %r\n", Status));=0D + DEBUG ((DEBUG_INFO, "Module not found. Status =3D %r\n", Status));=0D continue;=0D }=0D =0D @@ -305,10 +300,10 @@ FindModuleInFlash2( //=0D // Get File Information=0D //=0D - Status =3D PeiServicesFfsGetFileInfo(FfsHeader, &FileInfo);=0D - if (!EFI_ERROR(Status)) {=0D + Status =3D PeiServicesFfsGetFileInfo (FfsHeader, &FileInfo);=0D + if (!EFI_ERROR (Status)) {=0D *ModuleSize =3D (UINT32)FileInfo.BufferSize;=0D - DEBUG((DEBUG_INFO, "Module {0x%g} found at =3D 0x%X, Size =3D 0x%X\n= ",=0D + DEBUG ((DEBUG_INFO, "Module {0x%g} found at =3D 0x%X, Size =3D 0x%X\= n",=0D &FfsHeader->Name, *ModulePtr, *ModuleSize));=0D return Status;=0D }=0D @@ -318,15 +313,15 @@ FindModuleInFlash2( }=0D =0D /**=0D -Get the ChipsetInit Binary pointer.=0D + Get the ChipsetInit Binary pointer.=0D =0D -@retval EFI_SUCCESS - ChipsetInit Binary found.=0D -@retval EFI_NOT_FOUND - ChipsetInit Binary not found.=0D + @retval EFI_SUCCESS - ChipsetInit Binary found.=0D + @retval EFI_NOT_FOUND - ChipsetInit Binary not found.=0D **/=0D EFI_STATUS=0D -UpdateChipsetInitPtr(=0D +UpdateChipsetInitPtr (=0D VOID=0D -)=0D + )=0D {=0D EFI_STATUS Status;=0D PCH_STEPPING PchStep;=0D @@ -339,18 +334,18 @@ UpdateChipsetInitPtr( =0D ModuleAddr =3D 0;=0D ModuleSize =3D 0;=0D - PchStep =3D PchStepping();=0D + PchStep =3D PchStepping ();=0D =0D - Status =3D PeiServicesLocatePpi(=0D + Status =3D PeiServicesLocatePpi (=0D &gSiPolicyPpiGuid,=0D 0,=0D NULL,=0D (VOID **)&SiPolicyPpi=0D - );=0D - ASSERT_EFI_ERROR(Status);=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D =0D - Status =3D GetConfigBlock((VOID *)SiPolicyPpi, &gHsioConfigGuid, (VOID *= )&HsioConfig);=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D GetConfigBlock ((VOID *)SiPolicyPpi, &gHsioConfigGuid, (VOID = *)&HsioConfig);=0D + ASSERT_EFI_ERROR (Status);=0D =0D ChipsetInitBinaryGuidPtr =3D NULL;=0D if (IsPchLp()) {=0D @@ -358,22 +353,20 @@ UpdateChipsetInitPtr( case PCH_D0:=0D case PCH_D1:=0D ChipsetInitBinaryGuidPtr =3D &gCnlPchLpChipsetInitTableDxGuid;=0D - DEBUG((DEBUG_INFO, "Using CnlPchLpChipsetInitTable_Dx table \n"));= =0D + DEBUG ((DEBUG_INFO, "Using CnlPchLpChipsetInitTable_Dx table \n"))= ;=0D break;=0D default:=0D return EFI_NOT_FOUND;=0D }=0D - }=0D - else {=0D + } else {=0D return EFI_NOT_FOUND;=0D }=0D =0D //=0D // Locate Firmware Volume header=0D //=0D - // FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)GetFvBinaryBase();= =0D - FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) FixedPcdGet32(PcdFlashFvPost= MemoryBase);=0D - Status =3D FindModuleInFlash2(FvHeader, ChipsetInitBinaryGuidPtr, &Modul= eAddr, &ModuleSize);=0D + FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) FixedPcdGet32 (PcdFlashFvPos= tMemoryBase);=0D + Status =3D FindModuleInFlash2 (FvHeader, ChipsetInitBinaryGuidPtr, &Modu= leAddr, &ModuleSize);=0D //=0D // Get ChipsetInit Binary Pointer=0D //=0D @@ -384,8 +377,8 @@ UpdateChipsetInitPtr( //=0D HsioConfig->ChipsetInitBinLen =3D ModuleSize;=0D =0D - DEBUG((DEBUG_INFO, "ChipsetInit Binary Location: %x\n", HsioConfig->Chip= setInitBinPtr));=0D - DEBUG((DEBUG_INFO, "ChipsetInit Binary Size: %x\n", HsioConfig->ChipsetI= nitBinLen));=0D + DEBUG ((DEBUG_INFO, "ChipsetInit Binary Location: %x\n", HsioConfig->Chi= psetInitBinPtr));=0D + DEBUG ((DEBUG_INFO, "ChipsetInit Binary Size: %x\n", HsioConfig->Chipset= InitBinLen));=0D =0D return Status;=0D }=0D @@ -401,34 +394,34 @@ WhiskeylakeURvpBoardInitBeforeSiliconInit ( VOID=0D )=0D {=0D - EFI_STATUS Status;=0D - UINT8 FwConfig;=0D + EFI_STATUS Status;=0D + UINT8 FwConfig;=0D =0D - BoardConfigInit();=0D + BoardConfigInit ();=0D //=0D // Configure GPIO and SIO=0D //=0D - Status =3D BoardInit();=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D BoardInit ();=0D + ASSERT_EFI_ERROR (Status);=0D =0D FwConfig =3D FwConfigProduction;=0D - PeiPolicyInit(FwConfig);=0D + PeiPolicyInit (FwConfig);=0D =0D //=0D // Create USB Boot First hotkey information HOB=0D //=0D - CreateAttemptUsbFirstHotkeyInfoHob();=0D + CreateAttemptUsbFirstHotkeyInfoHob ();=0D =0D //=0D // Initializing Platform Specific Programming=0D //=0D - Status =3D PlatformSpecificInit();=0D + Status =3D PlatformSpecificInit ();=0D ASSERT_EFI_ERROR(Status);=0D =0D //=0D // Update ChipsetInitPtr=0D //=0D - Status =3D UpdateChipsetInitPtr();=0D + Status =3D UpdateChipsetInitPtr ();=0D =0D ///=0D /// Do Late PCH init=0D diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library= /BoardInitLib/PeiWhiskeylakeURvpInitPreMemLib.c b/Platform/Intel/Whiskeylak= eOpenBoardPkg/WhiskeylakeURvp/Library/BoardInitLib/PeiWhiskeylakeURvpInitPr= eMemLib.c index 055d731651..75813ff351 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardI= nitLib/PeiWhiskeylakeURvpInitPreMemLib.c +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/BoardI= nitLib/PeiWhiskeylakeURvpInitPreMemLib.c @@ -68,84 +68,84 @@ GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 RcompResisto= rSklRvp1[SA_MRC_MAX_RCOMP GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 RcompTargetSklRvp1[SA_MRC_MAX_R= COMP_TARGETS] =3D { 100, 40, 40, 23, 40 };=0D =0D GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_MAP MmioMap[] =3D {=0D - { FixedPcdGet64(PcdApicLocalAddress), FixedPcdGet32(PcdApicLocalMmioSize= ) },=0D - { FixedPcdGet64(PcdMchBaseAddress), FixedPcdGet32(PcdMchMmioSize) },=0D - { FixedPcdGet64(PcdDmiBaseAddress), FixedPcdGet32(PcdDmiMmioSize) },=0D - { FixedPcdGet64(PcdEpBaseAddress), FixedPcdGet32(PcdEpMmioSize) },=0D - { FixedPcdGet64(PcdGdxcBaseAddress), FixedPcdGet32(PcdGdxcMmioSize) }=0D + { FixedPcdGet64 (PcdApicLocalAddress), FixedPcdGet32 (PcdApicLocalMmioS= ize) },=0D + { FixedPcdGet64 (PcdMchBaseAddress), FixedPcdGet32 (PcdMchMmioSize) }= ,=0D + { FixedPcdGet64 (PcdDmiBaseAddress), FixedPcdGet32 (PcdDmiMmioSize) }= ,=0D + { FixedPcdGet64 (PcdEpBaseAddress), FixedPcdGet32 (PcdEpMmioSize) },= =0D + { FixedPcdGet64 (PcdGdxcBaseAddress), FixedPcdGet32 (PcdGdxcMmioSize) = }=0D };=0D =0D EFI_STATUS=0D -MrcConfigInit(=0D +MrcConfigInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D -SaGpioConfigInit(=0D +SaGpioConfigInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D - SaMiscConfigInit(=0D -IN UINT16 BoardId=0D -);=0D +SaMiscConfigInit (=0D + IN UINT16 BoardId=0D + );=0D =0D EFI_STATUS=0D - RootPortClkInfoInit(=0D -IN UINT16 BoardId=0D -);=0D +RootPortClkInfoInit (=0D + IN UINT16 BoardId=0D + );=0D =0D EFI_STATUS=0D - UsbConfigInit(=0D -IN UINT16 BoardId=0D -);=0D +UsbConfigInit (=0D + IN UINT16 BoardId=0D + );=0D =0D EFI_STATUS=0D -GpioGroupTierInit(=0D +GpioGroupTierInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D -GpioTablePreMemInit(=0D +GpioTablePreMemInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D -PchPmConfigInit(=0D +PchPmConfigInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D -SaDisplayConfigInit(=0D +SaDisplayConfigInit (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D -BoardFunctionInitPreMem(=0D +BoardFunctionInitPreMem (=0D IN UINT16 BoardId=0D -);=0D + );=0D =0D EFI_STATUS=0D EFIAPI=0D -PlatformInitPreMemCallBack(=0D +PlatformInitPreMemCallBack (=0D IN CONST EFI_PEI_SERVICES **PeiServices,=0D IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,=0D IN VOID *Ppi=0D -);=0D + );=0D =0D EFI_STATUS=0D EFIAPI=0D -MemoryDiscoveredPpiNotify(=0D +MemoryDiscoveredPpiNotify (=0D IN CONST EFI_PEI_SERVICES **PeiServices,=0D IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,=0D IN VOID *Ppi=0D -);=0D + );=0D =0D EFI_STATUS=0D EFIAPI=0D -PchReset(=0D +PchReset (=0D IN CONST EFI_PEI_SERVICES **PeiServices=0D -);=0D + );=0D =0D static EFI_PEI_RESET_PPI mResetPpi =3D {=0D PchReset=0D @@ -172,16 +172,16 @@ static EFI_PEI_NOTIFY_DESCRIPTOR mMemDiscoveredNotify= List =3D { };=0D =0D /**=0D -Board misc init function for PEI pre-memory phase.=0D + Board misc init function for PEI pre-memory phase.=0D =0D -@param[in] BoardId An unsigned integer represent the board id.=0D + @param[in] BoardId An unsigned integer represent the board id.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D -BoardMiscInitPreMem(=0D +BoardMiscInitPreMem (=0D IN UINT16 BoardId=0D -)=0D + )=0D {=0D PCD64_BLOB PcdData;=0D =0D @@ -211,22 +211,22 @@ BoardMiscInitPreMem( // power. An alternative way to contol modem power is to toggle FCP_= OFF via GPP_D13=0D // but board rework is required.=0D //=0D - PcdSet32S(PcdWwanFullCardPowerOffGpio, GPIO_CNL_LP_GPP_D16);=0D - PcdSet32S(PcdWwanBbrstGpio, GPIO_CNL_LP_GPP_F1);=0D - PcdSet32S(PcdWwanPerstGpio, GPIO_CNL_LP_GPP_E15);=0D - PcdSet8S(PcdWwanPerstGpioPolarity, 1);=0D + PcdSet32S (PcdWwanFullCardPowerOffGpio, GPIO_CNL_LP_GPP_D16);=0D + PcdSet32S (PcdWwanBbrstGpio, GPIO_CNL_LP_GPP_F1);=0D + PcdSet32S (PcdWwanPerstGpio, GPIO_CNL_LP_GPP_E15);=0D + PcdSet8S (PcdWwanPerstGpioPolarity, 1);=0D break;=0D =0D default:=0D break;=0D }=0D =0D - PcdSet64S(PcdRecoveryModeGpio, PcdData.Blob);=0D + PcdSet64S (PcdRecoveryModeGpio, PcdData.Blob);=0D =0D //=0D // Pc8374SioKbc Present=0D //=0D - PcdSetBoolS(PcdPc8374SioKbcPresent, FALSE);=0D + PcdSetBoolS (PcdPc8374SioKbcPresent, FALSE);=0D =0D return EFI_SUCCESS;=0D }=0D @@ -279,23 +279,23 @@ BoardConfigInitPreMem ( }=0D =0D /**=0D -This function handles PlatformInit task after PeiReadOnlyVariable2 PPI pro= duced=0D + This function handles PlatformInit task after PeiReadOnlyVariable2 PPI p= roduced=0D =0D -@param[in] PeiServices Pointer to PEI Services Table.=0D -@param[in] NotifyDesc Pointer to the descriptor for the Notification e= vent that=0D - caused this function to execute.=0D -@param[in] Ppi Pointer to the PPI data associated with this fun= ction.=0D + @param[in] PeiServices Pointer to PEI Services Table.=0D + @param[in] NotifyDesc Pointer to the descriptor for the Notification= event that=0D + caused this function to execute.=0D + @param[in] Ppi Pointer to the PPI data associated with this f= unction.=0D =0D -@retval EFI_SUCCESS The function completes successfully=0D -@retval others=0D + @retval EFI_SUCCESS The function completes successfully=0D + @retval others Failure=0D **/=0D EFI_STATUS=0D EFIAPI=0D -PlatformInitPreMemCallBack(=0D +PlatformInitPreMemCallBack (=0D IN CONST EFI_PEI_SERVICES **PeiServices,=0D IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,=0D IN VOID *Ppi=0D -)=0D + )=0D {=0D EFI_STATUS Status;=0D UINT8 FwConfig;=0D @@ -303,33 +303,33 @@ PlatformInitPreMemCallBack( //=0D // Init Board Config Pcd.=0D //=0D - BoardConfigInitPreMem();=0D + BoardConfigInitPreMem ();=0D =0D - DEBUG((DEBUG_ERROR, "Fail to get System Configuration and set the config= uration to production mode!\n"));=0D + DEBUG ((DEBUG_ERROR, "Fail to get System Configuration and set the confi= guration to production mode!\n"));=0D FwConfig =3D FwConfigProduction;=0D - PcdSetBoolS(PcdPcieWwanEnable, FALSE);=0D - PcdSetBoolS(PcdWwanResetWorkaround, FALSE);=0D + PcdSetBoolS (PcdPcieWwanEnable, FALSE);=0D + PcdSetBoolS (PcdWwanResetWorkaround, FALSE);=0D =0D //=0D // Early Board Configuration before memory is ready.=0D //=0D - Status =3D BoardInitEarlyPreMem();=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D BoardInitEarlyPreMem ();=0D + ASSERT_EFI_ERROR (Status);=0D =0D ///=0D /// If there was unexpected reset but no WDT expiration and no resume fr= om S3/S4,=0D /// clear unexpected reset status and enforce expiration. This is to inf= orm Firmware=0D /// which has no access to unexpected reset status bit, that something w= ent wrong.=0D ///=0D - OcWdtResetCheck();=0D + OcWdtResetCheck ();=0D =0D - Status =3D OcWdtInit();=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D OcWdtInit ();=0D + ASSERT_EFI_ERROR (Status);=0D =0D //=0D // Initialize Intel PEI Platform Policy=0D //=0D - PeiPolicyInitPreMem(FwConfig);=0D + PeiPolicyInitPreMem (FwConfig);=0D =0D ///=0D /// Configure GPIO and SIO=0D @@ -340,56 +340,55 @@ PlatformInitPreMemCallBack( ///=0D /// Install Pre Memory PPIs=0D ///=0D - Status =3D PeiServicesInstallPpi(&mPreMemPpiList[0]);=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D PeiServicesInstallPpi (&mPreMemPpiList[0]);=0D + ASSERT_EFI_ERROR (Status);=0D =0D return Status;=0D }=0D =0D /**=0D -Provide hard reset PPI service.=0D -To generate full hard reset, write 0x0E to PCH RESET_GENERATOR_PORT (0xCF9= ).=0D + Provide hard reset PPI service.=0D + To generate full hard reset, write 0x0E to PCH RESET_GENERATOR_PORT (0xC= F9).=0D =0D -@param[in] PeiServices General purpose services available to every = PEIM.=0D + @param[in] PeiServices General purpose services available to ever= y PEIM.=0D =0D -@retval Not return System reset occured.=0D -@retval EFI_DEVICE_ERROR Device error, could not reset the system.=0D + @retval Not return System reset occured.=0D + @retval EFI_DEVICE_ERROR Device error, could not reset the system.= =0D **/=0D EFI_STATUS=0D EFIAPI=0D -PchReset(=0D +PchReset (=0D IN CONST EFI_PEI_SERVICES **PeiServices=0D -)=0D + )=0D {=0D - DEBUG((DEBUG_INFO, "Perform Cold Reset\n"));=0D - IoWrite8(RESET_GENERATOR_PORT, 0x0E);=0D + DEBUG ((DEBUG_INFO, "Perform Cold Reset\n"));=0D + IoWrite8 (RESET_GENERATOR_PORT, 0x0E);=0D =0D - CpuDeadLoop();=0D + CpuDeadLoop ();=0D =0D ///=0D /// System reset occured, should never reach at this line.=0D ///=0D - ASSERT_EFI_ERROR(EFI_DEVICE_ERROR);=0D -=0D + ASSERT_EFI_ERROR (EFI_DEVICE_ERROR);=0D return EFI_DEVICE_ERROR;=0D }=0D =0D /**=0D -Install Firmware Volume Hob's once there is main memory=0D + Install Firmware Volume Hob's once there is main memory=0D =0D -@param[in] PeiServices General purpose services available to every = PEIM.=0D -@param[in] NotifyDescriptor Notify that this module published.=0D -@param[in] Ppi PPI that was installed.=0D + @param[in] PeiServices General purpose services available to ever= y PEIM.=0D + @param[in] NotifyDescriptor Notify that this module published.=0D + @param[in] Ppi PPI that was installed.=0D =0D -@retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_SUCCESS The function completed successfully.=0D **/=0D EFI_STATUS=0D EFIAPI=0D -MemoryDiscoveredPpiNotify(=0D +MemoryDiscoveredPpiNotify (=0D IN CONST EFI_PEI_SERVICES **PeiServices,=0D IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,=0D IN VOID *Ppi=0D -)=0D + )=0D {=0D EFI_STATUS Status;=0D EFI_BOOT_MODE BootMode;=0D @@ -400,12 +399,12 @@ MemoryDiscoveredPpiNotify( =0D Index =3D 0;=0D =0D - Status =3D PeiServicesGetBootMode(&BootMode);=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D PeiServicesGetBootMode (&BootMode);=0D + ASSERT_EFI_ERROR (Status);=0D =0D - AsmCpuid(0x80000000, &RegEax, NULL, NULL, NULL);=0D + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);=0D if (RegEax >=3D 0x80000008) {=0D - AsmCpuid(0x80000008, &RegEax, NULL, NULL, NULL);=0D + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);=0D PhysicalAddressBits =3D (UINT8)RegEax;=0D }=0D else {=0D @@ -415,69 +414,69 @@ MemoryDiscoveredPpiNotify( ///=0D /// Create a CPU hand-off information=0D ///=0D - BuildCpuHob(PhysicalAddressBits, 16);=0D + BuildCpuHob (PhysicalAddressBits, 16);=0D =0D ///=0D /// Build Memory Mapped IO Resource which is used to build E820 Table in= LegacyBios.=0D ///=0D - PcieMmioMap.BaseAddress =3D FixedPcdGet64(PcdPciExpressBaseAddress);=0D - PcieMmioMap.Length =3D PcdGet32(PcdPciExpressRegionLength);=0D + PcieMmioMap.BaseAddress =3D FixedPcdGet64 (PcdPciExpressBaseAddress);=0D + PcieMmioMap.Length =3D PcdGet32 (PcdPciExpressRegionLength);=0D =0D - BuildResourceDescriptorHob(=0D + BuildResourceDescriptorHob (=0D EFI_RESOURCE_MEMORY_MAPPED_IO,=0D - (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D - EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D + (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D + EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D PcieMmioMap.BaseAddress,=0D PcieMmioMap.Length=0D - );=0D - BuildMemoryAllocationHob(=0D + );=0D + BuildMemoryAllocationHob (=0D PcieMmioMap.BaseAddress,=0D PcieMmioMap.Length,=0D EfiMemoryMappedIO=0D - );=0D + );=0D for (Index =3D 0; Index < sizeof(MmioMap) / (sizeof(MEMORY_MAP)); Index+= +) {=0D - BuildResourceDescriptorHob(=0D + BuildResourceDescriptorHob (=0D EFI_RESOURCE_MEMORY_MAPPED_IO,=0D - (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D - EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D + (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D + EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D MmioMap[Index].BaseAddress,=0D MmioMap[Index].Length=0D - );=0D - BuildMemoryAllocationHob(=0D + );=0D + BuildMemoryAllocationHob (=0D MmioMap[Index].BaseAddress,=0D MmioMap[Index].Length,=0D EfiMemoryMappedIO=0D - );=0D + );=0D }=0D =0D //=0D // Report resource HOB for flash FV=0D //=0D - BuildResourceDescriptorHob(=0D + BuildResourceDescriptorHob (=0D EFI_RESOURCE_MEMORY_MAPPED_IO,=0D - (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D - EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress),=0D - (UINTN)FixedPcdGet32(PcdFlashAreaSize)=0D - );=0D - BuildMemoryAllocationHob(=0D - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress),=0D - (UINTN)FixedPcdGet32(PcdFlashAreaSize),=0D + (EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D + EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),=0D + (UINTN) FixedPcdGet32 (PcdFlashAreaBaseAddress),=0D + (UINTN) FixedPcdGet32 (PcdFlashAreaSize)=0D + );=0D +=0D + BuildMemoryAllocationHob (=0D + (UINTN) FixedPcdGet32 (PcdFlashAreaBaseAddress),=0D + (UINTN) FixedPcdGet32 (PcdFlashAreaSize),=0D EfiMemoryMappedIO=0D - );=0D + );=0D =0D - BuildFvHob(=0D - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress),=0D - (UINTN)FixedPcdGet32(PcdFlashAreaSize)=0D - );=0D + BuildFvHob (=0D + (UINTN)FixedPcdGet32 (PcdFlashAreaBaseAddress),=0D + (UINTN)FixedPcdGet32 (PcdFlashAreaSize)=0D + );=0D =0D return Status;=0D }=0D =0D -=0D /**=0D Board configuration init function for PEI pre-memory phase.=0D =0D @@ -495,26 +494,26 @@ WhiskeylakeURvpInitPreMem ( ///=0D /// Install Stall PPI=0D ///=0D - Status =3D InstallStallPpi();=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D InstallStallPpi ();=0D + ASSERT_EFI_ERROR (Status);=0D =0D //=0D // Install PCH RESET PPI and EFI RESET2 PeiService=0D //=0D - Status =3D PchInitializeReset();=0D - ASSERT_EFI_ERROR(Status);=0D + Status =3D PchInitializeReset ();=0D + ASSERT_EFI_ERROR (Status);=0D =0D ///=0D /// Performing PlatformInitPreMemCallBack after PeiReadOnlyVariable2 PPI= produced=0D ///=0D - Status =3D PeiServicesNotifyPpi(&mPreMemNotifyList);=0D + Status =3D PeiServicesNotifyPpi (&mPreMemNotifyList);=0D =0D ///=0D /// After code reorangized, memorycallback will run because the PPI is a= lready=0D /// installed when code run to here, it is supposed that the InstallEfiM= emory is=0D /// done before.=0D ///=0D - Status =3D PeiServicesNotifyPpi(&mMemDiscoveredNotifyList);=0D + Status =3D PeiServicesNotifyPpi (&mMemDiscoveredNotifyList);=0D =0D return EFI_SUCCESS;=0D }=0D @@ -561,5 +560,3 @@ WhiskeylakeURvpBoardBootModeDetect ( {=0D return BOOT_WITH_FULL_CONFIGURATION;=0D }=0D -=0D -=0D --=20 2.24.0.windows.2