Reviewed-by: Chasel Chiu <chasel.c...@intel.com>
> -----Original Message----- > From: Desimone, Nathaniel L <nathaniel.l.desim...@intel.com> > Sent: Thursday, November 21, 2019 4:59 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel <chasel.c...@intel.com>; Kubacki, Michael A > <michael.a.kuba...@intel.com> > Subject: [edk2-platforms] [PATCH V2 08/14] WhiskeylakeOpenBoardPkg: > Whitespace cleanup in BoardInitLib > > Cc: Chasel Chiu <chasel.c...@intel.com> > Cc: Michael Kubacki <michael.a.kuba...@intel.com> > Signed-off-by: Nate DeSimone <nathaniel.l.desim...@intel.com> > --- > .../PeiWhiskeylakeURvpInitPostMemLib.c | 185 ++++++------- > .../PeiWhiskeylakeURvpInitPreMemLib.c | 257 +++++++++--------- > 2 files changed, 216 insertions(+), 226 deletions(-) > > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPostMemLib.c > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPostMemLib.c > index 248a6657d5..827af6bb57 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPostMemLib.c > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPostMemLib.c > @@ -33,16 +33,16 @@ > #include "WhiskeylakeURvpInit.h" > > > > EFI_STATUS > > -BoardFunctionInit( > > +BoardFunctionInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > /** > > -GPIO init function for PEI post memory phase. > > + GPIO init function for PEI post memory phase. > > > > -@param[in] BoardId An unsigned integrer represent the board id. > > + @param[in] BoardId An unsigned integrer represent the board > id. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > BoardGpioInit( > > @@ -72,48 +72,48 @@ BoardGpioInit( > } > > > > /** > > -Touch panel GPIO init function for PEI post memory phase. > > + Touch panel GPIO init function for PEI post memory phase. > > > > -@param[in] BoardId An unsigned integrer represent the board id. > > + @param[in] BoardId An unsigned integrer represent the board > id. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > -TouchPanelGpioInit( > > +TouchPanelGpioInit ( > > IN UINT16 BoardId > > -) > > + ) > > { > > switch (BoardId) { > > default: > > - PcdSet32S(PcdBoardGpioTableTouchPanel, 0); > > + PcdSet32S (PcdBoardGpioTableTouchPanel, 0); > > break; > > } > > return EFI_SUCCESS; > > } > > > > /** > > -Misc. init function for PEI post memory phase. > > + Misc. init function for PEI post memory phase. > > > > -@param[in] BoardId An unsigned integrer represent the board id. > > + @param[in] BoardId An unsigned integrer represent the board > id. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > -BoardMiscInit( > > +BoardMiscInit ( > > IN UINT16 BoardId > > -) > > + ) > > { > > - PcdSetBoolS(PcdDebugUsbUartEnable, FALSE); > > + PcdSetBoolS (PcdDebugUsbUartEnable, FALSE); > > > > switch (BoardId) { > > > > case BoardIdWhiskeyLakeRvp: > > > > - PcdSetBoolS(PcdMipiCamGpioEnable, TRUE); > > + PcdSetBoolS (PcdMipiCamGpioEnable, TRUE); > > break; > > > > default: > > - PcdSetBoolS(PcdMipiCamGpioEnable, FALSE); > > + PcdSetBoolS (PcdMipiCamGpioEnable, FALSE); > > break; > > } > > > > @@ -121,25 +121,22 @@ BoardMiscInit( > } > > > > /** > > -Security GPIO init function for PEI post memory phase. > > + Security GPIO init function for PEI post memory phase. > > > > -@param[in] BoardId An unsigned integrer represent the board id. > > + @param[in] BoardId An unsigned integrer represent the board > id. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > BoardSecurityInit ( > > IN UINT16 BoardId > > -) > > + ) > > { > > switch (BoardId) { > > - > > case BoardIdWhiskeyLakeRvp: > > - > > // TPM interrupt connects to GPIO_CNL_H_GPP_A_7 > > PcdSet32S (PcdTpm2CurrentIrqNum, 0x1F); > > break; > > - > > } > > > > return EFI_SUCCESS; > > @@ -147,7 +144,6 @@ BoardSecurityInit ( > > > /** > > Board configuration initialization in the post-memory boot phase. > > - > > **/ > > VOID > > BoardConfigInit ( > > @@ -178,27 +174,26 @@ BoardConfigInit ( > ASSERT_EFI_ERROR (Status); > > } > > > > -//@todo Review this functionality and if it is required for WHL SDS > > /** > > -Create the HOB for hotkey status for 'Attempt USB First' feature > > + Create the HOB for hotkey status for 'Attempt USB First' feature > > > > -@retval EFI_SUCCESS HOB Creating successful. > > -@retval Others HOB Creating failed. > > + @retval EFI_SUCCESS HOB Creating successful. > > + @retval Others HOB Creating failed. > > **/ > > EFI_STATUS > > -CreateAttemptUsbFirstHotkeyInfoHob( > > +CreateAttemptUsbFirstHotkeyInfoHob ( > > VOID > > -) > > + ) > > { > > EFI_STATUS Status; > > ATTEMPT_USB_FIRST_HOTKEY_INFO AttemptUsbFirstHotkeyInfo; > > > > Status = EFI_SUCCESS; > > > > - ZeroMem( > > + ZeroMem ( > > &AttemptUsbFirstHotkeyInfo, > > - sizeof(AttemptUsbFirstHotkeyInfo) > > - ); > > + sizeof (AttemptUsbFirstHotkeyInfo) > > + ); > > > > AttemptUsbFirstHotkeyInfo.RevisonId = 0; > > AttemptUsbFirstHotkeyInfo.HotkeyTriggered = FALSE; > > @@ -206,29 +201,29 @@ CreateAttemptUsbFirstHotkeyInfoHob( > /// > > /// Build HOB for Attempt USB First feature > > /// > > - BuildGuidDataHob( > > + BuildGuidDataHob ( > > &gAttemptUsbFirstHotkeyInfoHobGuid, > > &(AttemptUsbFirstHotkeyInfo), > > - sizeof(ATTEMPT_USB_FIRST_HOTKEY_INFO) > > - ); > > + sizeof (ATTEMPT_USB_FIRST_HOTKEY_INFO) > > + ); > > > > return Status; > > } > > > > /** > > -Search and identify the physical address of a > > -file module inside the FW_BINARIES_FV_SIGNED FV > > + Search and identify the physical address of a > > + file module inside the FW_BINARIES_FV_SIGNED FV > > > > -@retval EFI_SUCCESS If address has been found > > -@retval Others If address has not been found > > + @retval EFI_SUCCESS If address has been found > > + @retval Others If address has not been found > > **/ > > EFI_STATUS > > -FindModuleInFlash2( > > +FindModuleInFlash2 ( > > IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader, > > IN EFI_GUID *GuidPtr, > > IN OUT UINT32 *ModulePtr, > > IN OUT UINT32 *ModuleSize > > -) > > + ) > > { > > EFI_FFS_FILE_HEADER *FfsHeader; > > EFI_FV_FILE_INFO FileInfo; > > @@ -246,57 +241,57 @@ FindModuleInFlash2( > // > > // Locate FV_IMAGE file type in the FW_BINARIES_FV_SIGNED firmware > volume > > // > > - Status = > PeiServicesFfsFindNextFile(EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE, > FvHeader, &FileHandle); > > - if (EFI_ERROR(Status)) { > > + Status = PeiServicesFfsFindNextFile > (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE, FvHeader, &FileHandle); > > + if (EFI_ERROR (Status)) { > > // unable to find FV_IMAGE file in this FV > > break; > > } > > > > FfsHeader = (EFI_FFS_FILE_HEADER*)FileHandle; > > - DEBUG((DEBUG_INFO, "FfsHeader 0x%X:\n", FfsHeader)); > > - DEBUG((DEBUG_INFO, " Name = 0x%g\n", &FfsHeader->Name)); > > - DEBUG((DEBUG_INFO, " Type = 0x%X\n", FfsHeader->Type)); > > - if (IS_FFS_FILE2(FfsHeader)) { > > - DEBUG((DEBUG_INFO, " Size = 0x%X\n", FFS_FILE2_SIZE(FfsHeader))); > > + DEBUG ((DEBUG_INFO, "FfsHeader 0x%X:\n", FfsHeader)); > > + DEBUG ((DEBUG_INFO, " Name = 0x%g\n", &FfsHeader->Name)); > > + DEBUG ((DEBUG_INFO, " Type = 0x%X\n", FfsHeader->Type)); > > + if (IS_FFS_FILE2 (FfsHeader)) { > > + DEBUG ((DEBUG_INFO, " Size = 0x%X\n", > FFS_FILE2_SIZE(FfsHeader))); > > } > > else { > > - DEBUG((DEBUG_INFO, " Size = 0x%X\n", FFS_FILE_SIZE(FfsHeader))); > > + DEBUG ((DEBUG_INFO, " Size = 0x%X\n", FFS_FILE_SIZE(FfsHeader))); > > } > > > > // > > // Locate FW_BINARIES_FV FV_IMAGE Section > > // > > - Status = > PeiServicesFfsFindSectionData(EFI_SECTION_FIRMWARE_VOLUME_IMAGE, > FileHandle, &FileBuffer); > > - if (EFI_ERROR(Status)) { > > + Status = PeiServicesFfsFindSectionData > (EFI_SECTION_FIRMWARE_VOLUME_IMAGE, FileHandle, &FileBuffer); > > + if (EFI_ERROR (Status)) { > > // continue to search for the next FV_IMAGE file > > - DEBUG((DEBUG_INFO, "FW_BINARIES_FV section not found. Status = > %r\n", Status)); > > + DEBUG ((DEBUG_INFO, "FW_BINARIES_FV section not found. Status > = %r\n", Status)); > > continue; > > } > > > > SectionHeader = (EFI_COMMON_SECTION_HEADER *)FileBuffer; > > - DEBUG((DEBUG_INFO, "GUIDED SectionHeader 0x%X:\n", > > + DEBUG ((DEBUG_INFO, "GUIDED SectionHeader 0x%X:\n", > > (UINT32)(UINT8 *)SectionHeader)); > > if (IS_SECTION2(SectionHeader)) { > > - DEBUG((DEBUG_INFO, " Guid = 0x%g\n", > > + DEBUG ((DEBUG_INFO, " Guid = 0x%g\n", > > &((EFI_GUID_DEFINED_SECTION2 > *)SectionHeader)->SectionDefinitionGuid)); > > - DEBUG((DEBUG_INFO, " DataOfset = 0x%X\n", > > + DEBUG ((DEBUG_INFO, " DataOfset = 0x%X\n", > > ((EFI_GUID_DEFINED_SECTION2 *)SectionHeader)->DataOffset)); > > } > > else { > > - DEBUG((DEBUG_INFO, " Guid = 0x%g\n", > > + DEBUG ((DEBUG_INFO, " Guid = 0x%g\n", > > &((EFI_GUID_DEFINED_SECTION > *)SectionHeader)->SectionDefinitionGuid)); > > - DEBUG((DEBUG_INFO, " DataOfset = 0x%X\n", > > + DEBUG ((DEBUG_INFO, " DataOfset = 0x%X\n", > > ((EFI_GUID_DEFINED_SECTION *)SectionHeader)->DataOffset)); > > } > > - DEBUG((DEBUG_INFO, " Type = 0x%X\n", SectionHeader->Type)); > > + DEBUG ((DEBUG_INFO, " Type = 0x%X\n", > SectionHeader->Type)); > > > > // > > // Locate Firmware File System file within Firmware Volume > > // > > - Status = PeiServicesFfsFindFileByName(GuidPtr, FileBuffer, (VOID > **)&FfsHeader); > > - if (EFI_ERROR(Status)) { > > + Status = PeiServicesFfsFindFileByName (GuidPtr, FileBuffer, (VOID > **)&FfsHeader); > > + if (EFI_ERROR (Status)) { > > // continue to search for the next FV_IMAGE file > > - DEBUG((DEBUG_INFO, "Module not found. Status = %r\n", Status)); > > + DEBUG ((DEBUG_INFO, "Module not found. Status = %r\n", Status)); > > continue; > > } > > > > @@ -305,10 +300,10 @@ FindModuleInFlash2( > // > > // Get File Information > > // > > - Status = PeiServicesFfsGetFileInfo(FfsHeader, &FileInfo); > > - if (!EFI_ERROR(Status)) { > > + Status = PeiServicesFfsGetFileInfo (FfsHeader, &FileInfo); > > + if (!EFI_ERROR (Status)) { > > *ModuleSize = (UINT32)FileInfo.BufferSize; > > - DEBUG((DEBUG_INFO, "Module {0x%g} found at = 0x%X, Size = > 0x%X\n", > > + DEBUG ((DEBUG_INFO, "Module {0x%g} found at = 0x%X, Size = > 0x%X\n", > > &FfsHeader->Name, *ModulePtr, *ModuleSize)); > > return Status; > > } > > @@ -318,15 +313,15 @@ FindModuleInFlash2( > } > > > > /** > > -Get the ChipsetInit Binary pointer. > > + Get the ChipsetInit Binary pointer. > > > > -@retval EFI_SUCCESS - ChipsetInit Binary found. > > -@retval EFI_NOT_FOUND - ChipsetInit Binary not found. > > + @retval EFI_SUCCESS - ChipsetInit Binary found. > > + @retval EFI_NOT_FOUND - ChipsetInit Binary not found. > > **/ > > EFI_STATUS > > -UpdateChipsetInitPtr( > > +UpdateChipsetInitPtr ( > > VOID > > -) > > + ) > > { > > EFI_STATUS Status; > > PCH_STEPPING PchStep; > > @@ -339,18 +334,18 @@ UpdateChipsetInitPtr( > > > ModuleAddr = 0; > > ModuleSize = 0; > > - PchStep = PchStepping(); > > + PchStep = PchStepping (); > > > > - Status = PeiServicesLocatePpi( > > + Status = PeiServicesLocatePpi ( > > &gSiPolicyPpiGuid, > > 0, > > NULL, > > (VOID **)&SiPolicyPpi > > - ); > > - ASSERT_EFI_ERROR(Status); > > + ); > > + ASSERT_EFI_ERROR (Status); > > > > - Status = GetConfigBlock((VOID *)SiPolicyPpi, &gHsioConfigGuid, (VOID > *)&HsioConfig); > > - ASSERT_EFI_ERROR(Status); > > + Status = GetConfigBlock ((VOID *)SiPolicyPpi, &gHsioConfigGuid, (VOID > *)&HsioConfig); > > + ASSERT_EFI_ERROR (Status); > > > > ChipsetInitBinaryGuidPtr = NULL; > > if (IsPchLp()) { > > @@ -358,22 +353,20 @@ UpdateChipsetInitPtr( > case PCH_D0: > > case PCH_D1: > > ChipsetInitBinaryGuidPtr = &gCnlPchLpChipsetInitTableDxGuid; > > - DEBUG((DEBUG_INFO, "Using CnlPchLpChipsetInitTable_Dx table > \n")); > > + DEBUG ((DEBUG_INFO, "Using CnlPchLpChipsetInitTable_Dx table > \n")); > > break; > > default: > > return EFI_NOT_FOUND; > > } > > - } > > - else { > > + } else { > > return EFI_NOT_FOUND; > > } > > > > // > > // Locate Firmware Volume header > > // > > - // FvHeader = (EFI_FIRMWARE_VOLUME_HEADER > *)(UINTN)GetFvBinaryBase(); > > - FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) > FixedPcdGet32(PcdFlashFvPostMemoryBase); > > - Status = FindModuleInFlash2(FvHeader, ChipsetInitBinaryGuidPtr, > &ModuleAddr, &ModuleSize); > > + FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) FixedPcdGet32 > (PcdFlashFvPostMemoryBase); > > + Status = FindModuleInFlash2 (FvHeader, ChipsetInitBinaryGuidPtr, > &ModuleAddr, &ModuleSize); > > // > > // Get ChipsetInit Binary Pointer > > // > > @@ -384,8 +377,8 @@ UpdateChipsetInitPtr( > // > > HsioConfig->ChipsetInitBinLen = ModuleSize; > > > > - DEBUG((DEBUG_INFO, "ChipsetInit Binary Location: %x\n", > HsioConfig->ChipsetInitBinPtr)); > > - DEBUG((DEBUG_INFO, "ChipsetInit Binary Size: %x\n", > HsioConfig->ChipsetInitBinLen)); > > + DEBUG ((DEBUG_INFO, "ChipsetInit Binary Location: %x\n", > HsioConfig->ChipsetInitBinPtr)); > > + DEBUG ((DEBUG_INFO, "ChipsetInit Binary Size: %x\n", > HsioConfig->ChipsetInitBinLen)); > > > > return Status; > > } > > @@ -401,34 +394,34 @@ WhiskeylakeURvpBoardInitBeforeSiliconInit ( > VOID > > ) > > { > > - EFI_STATUS Status; > > - UINT8 FwConfig; > > + EFI_STATUS Status; > > + UINT8 FwConfig; > > > > - BoardConfigInit(); > > + BoardConfigInit (); > > // > > // Configure GPIO and SIO > > // > > - Status = BoardInit(); > > - ASSERT_EFI_ERROR(Status); > > + Status = BoardInit (); > > + ASSERT_EFI_ERROR (Status); > > > > FwConfig = FwConfigProduction; > > - PeiPolicyInit(FwConfig); > > + PeiPolicyInit (FwConfig); > > > > // > > // Create USB Boot First hotkey information HOB > > // > > - CreateAttemptUsbFirstHotkeyInfoHob(); > > + CreateAttemptUsbFirstHotkeyInfoHob (); > > > > // > > // Initializing Platform Specific Programming > > // > > - Status = PlatformSpecificInit(); > > + Status = PlatformSpecificInit (); > > ASSERT_EFI_ERROR(Status); > > > > // > > // Update ChipsetInitPtr > > // > > - Status = UpdateChipsetInitPtr(); > > + Status = UpdateChipsetInitPtr (); > > > > /// > > /// Do Late PCH init > > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPreMemLib.c > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPreMemLib.c > index 055d731651..75813ff351 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPreMemLib.c > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/Boar > dInitLib/PeiWhiskeylakeURvpInitPreMemLib.c > @@ -68,84 +68,84 @@ GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 > RcompResistorSklRvp1[SA_MRC_MAX_RCOMP > GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 > RcompTargetSklRvp1[SA_MRC_MAX_RCOMP_TARGETS] = { 100, 40, 40, 23, > 40 }; > > > > GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_MAP MmioMap[] = { > > - { FixedPcdGet64(PcdApicLocalAddress), > FixedPcdGet32(PcdApicLocalMmioSize) }, > > - { FixedPcdGet64(PcdMchBaseAddress), > FixedPcdGet32(PcdMchMmioSize) }, > > - { FixedPcdGet64(PcdDmiBaseAddress), FixedPcdGet32(PcdDmiMmioSize) }, > > - { FixedPcdGet64(PcdEpBaseAddress), FixedPcdGet32(PcdEpMmioSize) }, > > - { FixedPcdGet64(PcdGdxcBaseAddress), > FixedPcdGet32(PcdGdxcMmioSize) } > > + { FixedPcdGet64 (PcdApicLocalAddress), FixedPcdGet32 > (PcdApicLocalMmioSize) }, > > + { FixedPcdGet64 (PcdMchBaseAddress), FixedPcdGet32 > (PcdMchMmioSize) }, > > + { FixedPcdGet64 (PcdDmiBaseAddress), FixedPcdGet32 > (PcdDmiMmioSize) }, > > + { FixedPcdGet64 (PcdEpBaseAddress), FixedPcdGet32 > (PcdEpMmioSize) }, > > + { FixedPcdGet64 (PcdGdxcBaseAddress), FixedPcdGet32 > (PcdGdxcMmioSize) } > > }; > > > > EFI_STATUS > > -MrcConfigInit( > > +MrcConfigInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > -SaGpioConfigInit( > > +SaGpioConfigInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > - SaMiscConfigInit( > > -IN UINT16 BoardId > > -); > > +SaMiscConfigInit ( > > + IN UINT16 BoardId > > + ); > > > > EFI_STATUS > > - RootPortClkInfoInit( > > -IN UINT16 BoardId > > -); > > +RootPortClkInfoInit ( > > + IN UINT16 BoardId > > + ); > > > > EFI_STATUS > > - UsbConfigInit( > > -IN UINT16 BoardId > > -); > > +UsbConfigInit ( > > + IN UINT16 BoardId > > + ); > > > > EFI_STATUS > > -GpioGroupTierInit( > > +GpioGroupTierInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > -GpioTablePreMemInit( > > +GpioTablePreMemInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > -PchPmConfigInit( > > +PchPmConfigInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > -SaDisplayConfigInit( > > +SaDisplayConfigInit ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > -BoardFunctionInitPreMem( > > +BoardFunctionInitPreMem ( > > IN UINT16 BoardId > > -); > > + ); > > > > EFI_STATUS > > EFIAPI > > -PlatformInitPreMemCallBack( > > +PlatformInitPreMemCallBack ( > > IN CONST EFI_PEI_SERVICES **PeiServices, > > IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, > > IN VOID *Ppi > > -); > > + ); > > > > EFI_STATUS > > EFIAPI > > -MemoryDiscoveredPpiNotify( > > +MemoryDiscoveredPpiNotify ( > > IN CONST EFI_PEI_SERVICES **PeiServices, > > IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, > > IN VOID *Ppi > > -); > > + ); > > > > EFI_STATUS > > EFIAPI > > -PchReset( > > +PchReset ( > > IN CONST EFI_PEI_SERVICES **PeiServices > > -); > > + ); > > > > static EFI_PEI_RESET_PPI mResetPpi = { > > PchReset > > @@ -172,16 +172,16 @@ static EFI_PEI_NOTIFY_DESCRIPTOR > mMemDiscoveredNotifyList = { > }; > > > > /** > > -Board misc init function for PEI pre-memory phase. > > + Board misc init function for PEI pre-memory phase. > > > > -@param[in] BoardId An unsigned integer represent the board id. > > + @param[in] BoardId An unsigned integer represent the board > id. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > -BoardMiscInitPreMem( > > +BoardMiscInitPreMem ( > > IN UINT16 BoardId > > -) > > + ) > > { > > PCD64_BLOB PcdData; > > > > @@ -211,22 +211,22 @@ BoardMiscInitPreMem( > // power. An alternative way to contol modem power is to toggle > FCP_OFF via GPP_D13 > > // but board rework is required. > > // > > - PcdSet32S(PcdWwanFullCardPowerOffGpio, GPIO_CNL_LP_GPP_D16); > > - PcdSet32S(PcdWwanBbrstGpio, GPIO_CNL_LP_GPP_F1); > > - PcdSet32S(PcdWwanPerstGpio, GPIO_CNL_LP_GPP_E15); > > - PcdSet8S(PcdWwanPerstGpioPolarity, 1); > > + PcdSet32S (PcdWwanFullCardPowerOffGpio, > GPIO_CNL_LP_GPP_D16); > > + PcdSet32S (PcdWwanBbrstGpio, GPIO_CNL_LP_GPP_F1); > > + PcdSet32S (PcdWwanPerstGpio, GPIO_CNL_LP_GPP_E15); > > + PcdSet8S (PcdWwanPerstGpioPolarity, 1); > > break; > > > > default: > > break; > > } > > > > - PcdSet64S(PcdRecoveryModeGpio, PcdData.Blob); > > + PcdSet64S (PcdRecoveryModeGpio, PcdData.Blob); > > > > // > > // Pc8374SioKbc Present > > // > > - PcdSetBoolS(PcdPc8374SioKbcPresent, FALSE); > > + PcdSetBoolS (PcdPc8374SioKbcPresent, FALSE); > > > > return EFI_SUCCESS; > > } > > @@ -279,23 +279,23 @@ BoardConfigInitPreMem ( > } > > > > /** > > -This function handles PlatformInit task after PeiReadOnlyVariable2 PPI > produced > > + This function handles PlatformInit task after PeiReadOnlyVariable2 PPI > produced > > > > -@param[in] PeiServices Pointer to PEI Services Table. > > -@param[in] NotifyDesc Pointer to the descriptor for the Notification > event that > > - caused this function to execute. > > -@param[in] Ppi Pointer to the PPI data associated with this > function. > > + @param[in] PeiServices Pointer to PEI Services Table. > > + @param[in] NotifyDesc Pointer to the descriptor for the > Notification event that > > + caused this function to execute. > > + @param[in] Ppi Pointer to the PPI data associated with this > function. > > > > -@retval EFI_SUCCESS The function completes successfully > > -@retval others > > + @retval EFI_SUCCESS The function completes successfully > > + @retval others Failure > > **/ > > EFI_STATUS > > EFIAPI > > -PlatformInitPreMemCallBack( > > +PlatformInitPreMemCallBack ( > > IN CONST EFI_PEI_SERVICES **PeiServices, > > IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, > > IN VOID *Ppi > > -) > > + ) > > { > > EFI_STATUS Status; > > UINT8 FwConfig; > > @@ -303,33 +303,33 @@ PlatformInitPreMemCallBack( > // > > // Init Board Config Pcd. > > // > > - BoardConfigInitPreMem(); > > + BoardConfigInitPreMem (); > > > > - DEBUG((DEBUG_ERROR, "Fail to get System Configuration and set the > configuration to production mode!\n")); > > + DEBUG ((DEBUG_ERROR, "Fail to get System Configuration and set the > configuration to production mode!\n")); > > FwConfig = FwConfigProduction; > > - PcdSetBoolS(PcdPcieWwanEnable, FALSE); > > - PcdSetBoolS(PcdWwanResetWorkaround, FALSE); > > + PcdSetBoolS (PcdPcieWwanEnable, FALSE); > > + PcdSetBoolS (PcdWwanResetWorkaround, FALSE); > > > > // > > // Early Board Configuration before memory is ready. > > // > > - Status = BoardInitEarlyPreMem(); > > - ASSERT_EFI_ERROR(Status); > > + Status = BoardInitEarlyPreMem (); > > + ASSERT_EFI_ERROR (Status); > > > > /// > > /// If there was unexpected reset but no WDT expiration and no resume > from S3/S4, > > /// clear unexpected reset status and enforce expiration. This is to inform > Firmware > > /// which has no access to unexpected reset status bit, that something > went wrong. > > /// > > - OcWdtResetCheck(); > > + OcWdtResetCheck (); > > > > - Status = OcWdtInit(); > > - ASSERT_EFI_ERROR(Status); > > + Status = OcWdtInit (); > > + ASSERT_EFI_ERROR (Status); > > > > // > > // Initialize Intel PEI Platform Policy > > // > > - PeiPolicyInitPreMem(FwConfig); > > + PeiPolicyInitPreMem (FwConfig); > > > > /// > > /// Configure GPIO and SIO > > @@ -340,56 +340,55 @@ PlatformInitPreMemCallBack( > /// > > /// Install Pre Memory PPIs > > /// > > - Status = PeiServicesInstallPpi(&mPreMemPpiList[0]); > > - ASSERT_EFI_ERROR(Status); > > + Status = PeiServicesInstallPpi (&mPreMemPpiList[0]); > > + ASSERT_EFI_ERROR (Status); > > > > return Status; > > } > > > > /** > > -Provide hard reset PPI service. > > -To generate full hard reset, write 0x0E to PCH RESET_GENERATOR_PORT > (0xCF9). > > + Provide hard reset PPI service. > > + To generate full hard reset, write 0x0E to PCH RESET_GENERATOR_PORT > (0xCF9). > > > > -@param[in] PeiServices General purpose services available to > every PEIM. > > + @param[in] PeiServices General purpose services available to > every PEIM. > > > > -@retval Not return System reset occured. > > -@retval EFI_DEVICE_ERROR Device error, could not reset the system. > > + @retval Not return System reset occured. > > + @retval EFI_DEVICE_ERROR Device error, could not reset the > system. > > **/ > > EFI_STATUS > > EFIAPI > > -PchReset( > > +PchReset ( > > IN CONST EFI_PEI_SERVICES **PeiServices > > -) > > + ) > > { > > - DEBUG((DEBUG_INFO, "Perform Cold Reset\n")); > > - IoWrite8(RESET_GENERATOR_PORT, 0x0E); > > + DEBUG ((DEBUG_INFO, "Perform Cold Reset\n")); > > + IoWrite8 (RESET_GENERATOR_PORT, 0x0E); > > > > - CpuDeadLoop(); > > + CpuDeadLoop (); > > > > /// > > /// System reset occured, should never reach at this line. > > /// > > - ASSERT_EFI_ERROR(EFI_DEVICE_ERROR); > > - > > + ASSERT_EFI_ERROR (EFI_DEVICE_ERROR); > > return EFI_DEVICE_ERROR; > > } > > > > /** > > -Install Firmware Volume Hob's once there is main memory > > + Install Firmware Volume Hob's once there is main memory > > > > -@param[in] PeiServices General purpose services available to > every PEIM. > > -@param[in] NotifyDescriptor Notify that this module published. > > -@param[in] Ppi PPI that was installed. > > + @param[in] PeiServices General purpose services available to > every PEIM. > > + @param[in] NotifyDescriptor Notify that this module published. > > + @param[in] Ppi PPI that was installed. > > > > -@retval EFI_SUCCESS The function completed successfully. > > + @retval EFI_SUCCESS The function completed successfully. > > **/ > > EFI_STATUS > > EFIAPI > > -MemoryDiscoveredPpiNotify( > > +MemoryDiscoveredPpiNotify ( > > IN CONST EFI_PEI_SERVICES **PeiServices, > > IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, > > IN VOID *Ppi > > -) > > + ) > > { > > EFI_STATUS Status; > > EFI_BOOT_MODE BootMode; > > @@ -400,12 +399,12 @@ MemoryDiscoveredPpiNotify( > > > Index = 0; > > > > - Status = PeiServicesGetBootMode(&BootMode); > > - ASSERT_EFI_ERROR(Status); > > + Status = PeiServicesGetBootMode (&BootMode); > > + ASSERT_EFI_ERROR (Status); > > > > - AsmCpuid(0x80000000, &RegEax, NULL, NULL, NULL); > > + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); > > if (RegEax >= 0x80000008) { > > - AsmCpuid(0x80000008, &RegEax, NULL, NULL, NULL); > > + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); > > PhysicalAddressBits = (UINT8)RegEax; > > } > > else { > > @@ -415,69 +414,69 @@ MemoryDiscoveredPpiNotify( > /// > > /// Create a CPU hand-off information > > /// > > - BuildCpuHob(PhysicalAddressBits, 16); > > + BuildCpuHob (PhysicalAddressBits, 16); > > > > /// > > /// Build Memory Mapped IO Resource which is used to build E820 Table > in LegacyBios. > > /// > > - PcieMmioMap.BaseAddress = FixedPcdGet64(PcdPciExpressBaseAddress); > > - PcieMmioMap.Length = PcdGet32(PcdPciExpressRegionLength); > > + PcieMmioMap.BaseAddress = FixedPcdGet64 > (PcdPciExpressBaseAddress); > > + PcieMmioMap.Length = PcdGet32 (PcdPciExpressRegionLength); > > > > - BuildResourceDescriptorHob( > > + BuildResourceDescriptorHob ( > > EFI_RESOURCE_MEMORY_MAPPED_IO, > > - (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > + (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > PcieMmioMap.BaseAddress, > > PcieMmioMap.Length > > - ); > > - BuildMemoryAllocationHob( > > + ); > > + BuildMemoryAllocationHob ( > > PcieMmioMap.BaseAddress, > > PcieMmioMap.Length, > > EfiMemoryMappedIO > > - ); > > + ); > > for (Index = 0; Index < sizeof(MmioMap) / (sizeof(MEMORY_MAP)); > Index++) { > > - BuildResourceDescriptorHob( > > + BuildResourceDescriptorHob ( > > EFI_RESOURCE_MEMORY_MAPPED_IO, > > - (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > + (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > MmioMap[Index].BaseAddress, > > MmioMap[Index].Length > > - ); > > - BuildMemoryAllocationHob( > > + ); > > + BuildMemoryAllocationHob ( > > MmioMap[Index].BaseAddress, > > MmioMap[Index].Length, > > EfiMemoryMappedIO > > - ); > > + ); > > } > > > > // > > // Report resource HOB for flash FV > > // > > - BuildResourceDescriptorHob( > > + BuildResourceDescriptorHob ( > > EFI_RESOURCE_MEMORY_MAPPED_IO, > > - (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress), > > - (UINTN)FixedPcdGet32(PcdFlashAreaSize) > > - ); > > - BuildMemoryAllocationHob( > > - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress), > > - (UINTN)FixedPcdGet32(PcdFlashAreaSize), > > + (EFI_RESOURCE_ATTRIBUTE_PRESENT | > > + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > > + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), > > + (UINTN) FixedPcdGet32 (PcdFlashAreaBaseAddress), > > + (UINTN) FixedPcdGet32 (PcdFlashAreaSize) > > + ); > > + > > + BuildMemoryAllocationHob ( > > + (UINTN) FixedPcdGet32 (PcdFlashAreaBaseAddress), > > + (UINTN) FixedPcdGet32 (PcdFlashAreaSize), > > EfiMemoryMappedIO > > - ); > > + ); > > > > - BuildFvHob( > > - (UINTN)FixedPcdGet32(PcdFlashAreaBaseAddress), > > - (UINTN)FixedPcdGet32(PcdFlashAreaSize) > > - ); > > + BuildFvHob ( > > + (UINTN)FixedPcdGet32 (PcdFlashAreaBaseAddress), > > + (UINTN)FixedPcdGet32 (PcdFlashAreaSize) > > + ); > > > > return Status; > > } > > > > - > > /** > > Board configuration init function for PEI pre-memory phase. > > > > @@ -495,26 +494,26 @@ WhiskeylakeURvpInitPreMem ( > /// > > /// Install Stall PPI > > /// > > - Status = InstallStallPpi(); > > - ASSERT_EFI_ERROR(Status); > > + Status = InstallStallPpi (); > > + ASSERT_EFI_ERROR (Status); > > > > // > > // Install PCH RESET PPI and EFI RESET2 PeiService > > // > > - Status = PchInitializeReset(); > > - ASSERT_EFI_ERROR(Status); > > + Status = PchInitializeReset (); > > + ASSERT_EFI_ERROR (Status); > > > > /// > > /// Performing PlatformInitPreMemCallBack after PeiReadOnlyVariable2 > PPI produced > > /// > > - Status = PeiServicesNotifyPpi(&mPreMemNotifyList); > > + Status = PeiServicesNotifyPpi (&mPreMemNotifyList); > > > > /// > > /// After code reorangized, memorycallback will run because the PPI is > already > > /// installed when code run to here, it is supposed that the > InstallEfiMemory is > > /// done before. > > /// > > - Status = PeiServicesNotifyPpi(&mMemDiscoveredNotifyList); > > + Status = PeiServicesNotifyPpi (&mMemDiscoveredNotifyList); > > > > return EFI_SUCCESS; > > } > > @@ -561,5 +560,3 @@ WhiskeylakeURvpBoardBootModeDetect ( > { > > return BOOT_WITH_FULL_CONFIGURATION; > > } > > - > > - > > -- > 2.24.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51138): https://edk2.groups.io/g/devel/message/51138 Mute This Topic: https://groups.io/mt/61073531/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-