Changeset 108794 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg
- Timestamp:
- Mar 31, 2025 11:31:09 AM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168237
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 3 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-164365 /vendor/edk2/current 103735-103757,103769-103776,129194-168232
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
r105670 r108794 4 4 notify to call FspSiliconInit API. 5 5 6 Copyright (c) 2014 - 202 2, Intel Corporation. All rights reserved.<BR>6 Copyright (c) 2014 - 2024, Intel Corporation. All rights reserved.<BR> 7 7 SPDX-License-Identifier: BSD-2-Clause-Patent 8 8 … … 39 39 #include <FspGlobalData.h> 40 40 #include <Library/FspCommonLib.h> 41 #include <Guid/MigratedFvInfo.h> 41 42 42 43 extern EFI_GUID gFspHobGuid; … … 125 126 126 127 // 127 // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status128 //129 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {130 DEBUG ((DEBUG_INFO, "FspMemoryInitApi requested reset %r\n", Status));131 CallFspWrapperResetSystem (Status);132 }133 134 if ((Status != FSP_STATUS_VARIABLE_REQUEST) && EFI_ERROR (Status)) {135 DEBUG ((DEBUG_ERROR, "ERROR - Failed to execute FspMemoryInitApi(), Status = %r\n", Status));136 ASSERT_EFI_ERROR (Status);137 }138 139 DEBUG ((DEBUG_INFO, "FspMemoryInit status: %r\n", Status));140 if (Status == FSP_STATUS_VARIABLE_REQUEST) {141 //142 // call to Variable request handler143 //144 FspWrapperVariableRequestHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex);145 }146 147 //148 // See if MultiPhase process is required or not149 //150 FspWrapperMultiPhaseHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex); // FspM MultiPhase151 152 //153 // Create hobs after memory initialization and not in temp RAM. Hence passing the recorded timestamp here154 //155 PERF_START_EX (&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);156 PERF_END_EX (&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);157 DEBUG ((DEBUG_INFO, "Total time spent executing FspMemoryInitApi: %d millisecond\n", DivU64x32 (GetTimeInNanoSecond (AsmReadTsc () - TimeStampCounterStart), 1000000)));158 159 Status = TestFspMemoryInitApiOutput (FspmUpdDataPtr, &FspHobListPtr);160 if (EFI_ERROR (Status)) {161 DEBUG ((DEBUG_ERROR, "ERROR - TestFspMemoryInitApiOutput () fail, Status = %r\n", Status));162 }163 164 DEBUG ((DEBUG_INFO, " FspHobListPtr (returned) - 0x%x\n", FspHobListPtr));165 ASSERT (FspHobListPtr != NULL);166 167 PostFspmHobProcess (FspHobListPtr);168 169 //170 128 // FspHobList is not complete at this moment. 171 129 // Save FspHobList pointer to hob, so that it can be got later … … 177 135 ASSERT (HobData != NULL); 178 136 CopyMem (HobData, &FspHobListPtr, sizeof (FspHobListPtr)); 137 138 // 139 // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status 140 // 141 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) { 142 DEBUG ((DEBUG_INFO, "FspMemoryInitApi requested reset %r\n", Status)); 143 CallFspWrapperResetSystem (Status); 144 } 145 146 if ((Status != FSP_STATUS_VARIABLE_REQUEST) && EFI_ERROR (Status)) { 147 DEBUG ((DEBUG_ERROR, "ERROR - Failed to execute FspMemoryInitApi(), Status = %r\n", Status)); 148 ASSERT_EFI_ERROR (Status); 149 } 150 151 DEBUG ((DEBUG_INFO, "FspMemoryInit status: %r\n", Status)); 152 if (Status == FSP_STATUS_VARIABLE_REQUEST) { 153 // 154 // call to Variable request handler 155 // 156 FspWrapperVariableRequestHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex); 157 } 158 159 // 160 // See if MultiPhase process is required or not 161 // 162 FspWrapperMultiPhaseHandler (&FspHobListPtr, FspMultiPhaseMemInitApiIndex); // FspM MultiPhase 163 164 // 165 // Create hobs after memory initialization and not in temp RAM. Hence passing the recorded timestamp here 166 // 167 PERF_START_EX (&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY); 168 PERF_END_EX (&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT); 169 DEBUG ((DEBUG_INFO, "Total time spent executing FspMemoryInitApi: %d millisecond\n", DivU64x32 (GetTimeInNanoSecond (AsmReadTsc () - TimeStampCounterStart), 1000000))); 170 171 Status = TestFspMemoryInitApiOutput (FspmUpdDataPtr, &FspHobListPtr); 172 if (EFI_ERROR (Status)) { 173 DEBUG ((DEBUG_ERROR, "ERROR - TestFspMemoryInitApiOutput () fail, Status = %r\n", Status)); 174 } 175 176 DEBUG ((DEBUG_INFO, " FspHobListPtr (returned) - 0x%x\n", FspHobListPtr)); 177 ASSERT (FspHobListPtr != NULL); 178 179 PostFspmHobProcess (FspHobListPtr); 179 180 180 181 return Status; … … 279 280 ) 280 281 { 281 UINT32 FspMeasureMask; 282 UINT32 FspMeasureMask; 283 EFI_PHYSICAL_ADDRESS FsptBaseAddress; 284 EFI_PHYSICAL_ADDRESS FspmBaseAddress; 285 EDKII_MIGRATED_FV_INFO *MigratedFvInfo; 286 EFI_PEI_HOB_POINTERS Hob; 282 287 283 288 DEBUG ((DEBUG_INFO, "TcgPpiNotify FSPM\n")); 284 289 285 FspMeasureMask = PcdGet32 (PcdFspMeasurementConfig); 290 FspMeasureMask = PcdGet32 (PcdFspMeasurementConfig); 291 FsptBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFsptBaseAddress); 292 FspmBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFspmBaseAddress); 293 Hob.Raw = GetFirstGuidHob (&gEdkiiMigratedFvInfoGuid); 294 while (Hob.Raw != NULL) { 295 MigratedFvInfo = GET_GUID_HOB_DATA (Hob); 296 if ((MigratedFvInfo->FvOrgBase == PcdGet32 (PcdFsptBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) { 297 // 298 // Found the migrated FspT raw data 299 // 300 FsptBaseAddress = MigratedFvInfo->FvDataBase; 301 } 302 303 if ((MigratedFvInfo->FvOrgBase == PcdGet32 (PcdFspmBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) { 304 FspmBaseAddress = MigratedFvInfo->FvDataBase; 305 } 306 307 Hob.Raw = GET_NEXT_HOB (Hob); 308 Hob.Raw = GetNextGuidHob (&gEdkiiMigratedFvInfoGuid, Hob.Raw); 309 } 286 310 287 311 if ((FspMeasureMask & FSP_MEASURE_FSPT) != 0) { … … 289 313 0, 290 314 "FSPT", 291 PcdGet32 (PcdFsptBaseAddress),292 (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN) PcdGet32 (PcdFsptBaseAddress))->FvLength315 FsptBaseAddress, 316 (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FsptBaseAddress)->FvLength 293 317 ); 294 318 } … … 298 322 0, 299 323 "FSPM", 300 PcdGet32 (PcdFspmBaseAddress),301 (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength324 FspmBaseAddress, 325 (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FspmBaseAddress)->FvLength 302 326 ); 303 327 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
r101291 r108794 7 7 # notify to call FspSiliconInit API. 8 8 # 9 # Copyright (c) 2014 - 202 1, Intel Corporation. All rights reserved.<BR>9 # Copyright (c) 2014 - 2024, Intel Corporation. All rights reserved.<BR> 10 10 # 11 11 # SPDX-License-Identifier: BSD-2-Clause-Patent … … 70 70 gFspHobGuid ## PRODUCES ## HOB 71 71 gFspApiPerformanceGuid ## SOMETIMES_CONSUMES ## GUID 72 gEdkiiMigratedFvInfoGuid ## SOMETIMES_CONSUMES ## HOB 72 73 73 74 [Ppis] -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
r101291 r108794 422 422 423 423 MeasurementExcludedFvPpi = AllocatePool (sizeof (*MeasurementExcludedFvPpi)); 424 ASSERT (MeasurementExcludedFvPpi != NULL); 424 if (MeasurementExcludedFvPpi == NULL) { 425 ASSERT (MeasurementExcludedFvPpi != NULL); 426 return EFI_OUT_OF_RESOURCES; 427 } 428 425 429 MeasurementExcludedFvPpi->Count = 1; 426 430 MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32 (PcdFspsBaseAddress); … … 428 432 429 433 MeasurementExcludedPpiList = AllocatePool (sizeof (*MeasurementExcludedPpiList)); 430 ASSERT (MeasurementExcludedPpiList != NULL); 434 if (MeasurementExcludedPpiList == NULL) { 435 ASSERT (MeasurementExcludedPpiList != NULL); 436 FreePool (MeasurementExcludedFvPpi); 437 return EFI_OUT_OF_RESOURCES; 438 } 439 431 440 MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; 432 441 MeasurementExcludedPpiList->Guid = &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid; -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
r99404 r108794 14 14 #define FSP_MEASURE_FSPM BIT2 15 15 #define FSP_MEASURE_FSPS BIT3 16 #define FSP_MEASURE_FSPI BIT4 16 17 #define FSP_MEASURE_FSPUPD BIT31 17 18 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h
r99404 r108794 79 79 ); 80 80 81 /** 82 Call FSP API - FspSmmInit. 83 84 @param[in] FspiUpdDataPtr Pointer to the FSPI_UPD data structure. 85 86 @return EFI status returned by FspSmmInit API. 87 **/ 88 EFI_STATUS 89 EFIAPI 90 CallFspSmmInit ( 91 IN VOID *FspiUpdDataPtr 92 ); 93 81 94 #endif -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiTestLib.h
r99404 r108794 53 53 ); 54 54 55 /** 56 Test the output of FSP API - FspSmmInit. 57 58 @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure. 59 60 @return test result on output of FspSmmInit API. 61 **/ 62 EFI_STATUS 63 EFIAPI 64 TestFspSmmInitApiOutput ( 65 IN VOID *FspiUpdDataPtr 66 ); 67 55 68 #endif -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperHobProcessLib.h
r99404 r108794 36 36 ); 37 37 38 /** 39 Post FSP-I HOB process. 40 41 @param[in] FspHobList Pointer to the HOB data structure produced by FSP. 42 43 @return If platform process the FSP hob list successfully. 44 **/ 45 EFI_STATUS 46 EFIAPI 47 PostFspiHobProcess ( 48 IN VOID *FspHobList 49 ); 50 38 51 #endif -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Include/Library/FspWrapperPlatformLib.h
r99404 r108794 78 78 ); 79 79 80 /** 81 This function overrides the default configurations in the FSP-I UPD data region. 82 83 @param[in,out] FspUpdRgnPtr A pointer to the UPD data region data structure. 84 85 **/ 86 VOID 87 EFIAPI 88 UpdateFspiUpdData ( 89 IN OUT VOID *FspUpdRgnPtr 90 ); 91 80 92 #endif -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
r99404 r108794 91 91 gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi|0x00000000|UINT32|0x40000009 92 92 93 ## This PCD decides how FSP is measured94 # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM.95 # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT.96 # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered97 # as configuration block, and it may be updated by OEM by design.98 # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region.99 # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2.100 # BIT1: Need measure FSPT. (for FSP 2.x)101 # BIT2: Need measure FSPM. (for FSP 2.x)102 # BIT3: Need measure FSPS. (for FSP 2.x)103 # BIT4~30: reserved.104 # BIT31: Need isolate UPD region measurement.105 #0: measure FSP[T|M|S] as one binary in one record (PCR0).106 #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0).107 #108 gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x4000000B109 110 93 [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] 111 94 ## This PCD decides how Wrapper code utilizes FSP … … 116 99 117 100 # 118 ## These are the base address of FSP-M/S 101 ## These are the base address of FSP-M/S/I 119 102 # 120 103 gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x00000000|UINT32|0x00001000 121 104 gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x00000000|UINT32|0x00001001 105 gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress|0x00000000|UINT32|0x00001002 122 106 # 123 107 # To provide flexibility for platform to pre-allocate FSP UPD buffer … … 138 122 # 139 123 gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64|0x00000000|UINT64|0x50000003 124 125 ## This PCD decides how FSP is measured 126 # 1) The BootGuard ACM may already measured the FSP component, such as FSPT/FSPM. 127 # We need a flag (PCD) to indicate if there is need to do such FSP measurement or NOT. 128 # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is considered 129 # as configuration block, and it may be updated by OEM by design. 130 # This flag (PCD) is to indicate if we need isolate the UPD region from the FSP code region. 131 # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2. 132 # BIT1: Need measure FSPT. (for FSP 2.x) 133 # BIT2: Need measure FSPM. (for FSP 2.x) 134 # BIT3: Need measure FSPS. (for FSP 2.x) 135 # BIT4~30: reserved. 136 # BIT31: Need isolate UPD region measurement. 137 #0: measure FSP[T|M|S] as one binary in one record (PCR0). 138 #1: measure FSP UPD region in one record (PCR1), the FSP code without UPD in another record (PCR0). 139 # 140 gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x00000000|UINT32|0x50000004 141 # 142 # To provide flexibility for platform to pre-allocate FSP UPD buffer 143 # 144 # The PCDs define the pre-allocated FSPI UPD Data Buffer Address. 145 # 0x00000000 - Platform will not pre-allocate UPD buffer before FspWrapper module 146 # non-zero - Platform will pre-allocate UPD buffer and patch this value to 147 # buffer address before FspWrapper module executing. 148 # 149 gIntelFsp2WrapperTokenSpaceGuid.PcdFspiUpdDataAddress|0x00000000|UINT64|0x50000005 -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
r101291 r108794 79 79 HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf 80 80 81 [Components.Ia32 ]81 [Components.Ia32, Components.X64] 82 82 IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/BaseFspWrapperApiTestLibNull.inf 83 83 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspWrapperPlatformSecLibSample.inf … … 88 88 IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf 89 89 IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf 90 IntelFsp2WrapperPkg/FspiWrapperPeim/FspiWrapperPeim.inf 90 91 91 92 [Components.IA32, Components.X64] -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf
r80721 r108794 64 64 gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES 65 65 gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES 66 gIntelFsp2WrapperTokenSpaceGuid.PcdFspiBaseAddress ## CONSUMES -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApiLib.c
r99404 r108794 231 231 return Status; 232 232 } 233 234 /** 235 Call FSP API - FspSmmInit. 236 237 @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure. 238 239 @return EFI status returned by FspSmmInit API. 240 **/ 241 EFI_STATUS 242 EFIAPI 243 CallFspSmmInit ( 244 IN VOID *FspiUpdDataPtr 245 ) 246 { 247 FSP_INFO_HEADER *FspHeader; 248 FSP_SMM_INIT FspSmmInitApi; 249 EFI_STATUS Status; 250 BOOLEAN InterruptState; 251 252 FspHeader = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32 (PcdFspiBaseAddress)); 253 if (FspHeader == NULL) { 254 return EFI_DEVICE_ERROR; 255 } 256 257 FspSmmInitApi = (FSP_SMM_INIT)((UINTN)FspHeader->ImageBase + FspHeader->FspSmmInitEntryOffset); 258 InterruptState = SaveAndDisableInterrupts (); 259 if ((FspHeader->ImageAttribute & IMAGE_ATTRIBUTE_64BIT_MODE_SUPPORT) == FSP_IA32) { 260 Status = Execute32BitCode ((UINTN)FspSmmInitApi, (UINTN)FspiUpdDataPtr, (UINTN)NULL); 261 } else { 262 Status = Execute64BitCode ((UINTN)FspSmmInitApi, (UINTN)FspiUpdDataPtr, (UINTN)NULL); 263 } 264 265 SetInterruptState (InterruptState); 266 267 return Status; 268 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/FspWrapperApiTestNull.c
r99404 r108794 58 58 return RETURN_UNSUPPORTED; 59 59 } 60 61 /** 62 Test the output of FSP API - FspSmmInit. 63 64 @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure. 65 66 @return test result on output of FspSmmInit API. 67 **/ 68 EFI_STATUS 69 EFIAPI 70 TestFspSmmInitApiOutput ( 71 IN VOID *FspiUpdDataPtr 72 ) 73 { 74 return RETURN_SUCCESS; 75 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c
r99404 r108794 96 96 CpuDeadLoop (); 97 97 } 98 99 /** 100 This function overrides the default configurations in the FSP-I UPD data region. 101 102 @param[in,out] FspUpdRgnPtr A pointer to the UPD data region data structure. 103 104 **/ 105 VOID 106 EFIAPI 107 UpdateFspiUpdData ( 108 IN OUT VOID *FspUpdRgnPtr 109 ) 110 { 111 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/FspWrapperMultiPhaseProcessLib.inf
r99404 r108794 39 39 PeiServicesLib 40 40 FspWrapperPlatformMultiPhaseLib 41 BaseMemoryLib 42 HobLib 41 43 42 44 [Ppis] … … 44 46 gEdkiiPeiVariablePpiGuid 45 47 48 [Guids] 49 gFspHobGuid ## CONSUMES 50 46 51 [Pcd] 47 52 gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/PeiFspWrapperMultiPhaseProcessLib.c
r105670 r108794 18 18 #include <Library/PeiServicesLib.h> 19 19 #include <Library/FspWrapperPlatformMultiPhaseLib.h> 20 #include <Library/BaseMemoryLib.h> 21 #include <Library/HobLib.h> 20 22 21 23 /** … … 157 159 BOOLEAN WriteVariableSupport; 158 160 FSP_MULTI_PHASE_COMPLETE_VARIABLE_REQUEST_PARAMS CompleteVariableRequestParams; 161 VOID *GuidHob; 162 VOID *HobData; 159 163 160 164 WriteVariableSupport = TRUE; … … 290 294 291 295 // 296 // Refresh FspHobList pointer stored in HOB. 297 // 298 GuidHob = GetFirstGuidHob (&gFspHobGuid); 299 ASSERT (GuidHob != NULL); 300 if (GuidHob != NULL) { 301 HobData = GET_GUID_HOB_DATA (GuidHob); 302 CopyMem (HobData, FspHobListPtr, sizeof (*FspHobListPtr)); 303 } 304 305 // 292 306 // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status 293 307 // … … 322 336 UINT32 Index; 323 337 UINT32 NumOfPhases; 338 VOID *GuidHob; 339 VOID *HobData; 324 340 325 341 // … … 353 369 Status = CallFspMultiPhaseEntry (&FspMultiPhaseParams, FspHobListPtr, ComponentIndex); 354 370 371 // 372 // Refresh FspHobList pointer stored in HOB. 373 // 374 GuidHob = GetFirstGuidHob (&gFspHobGuid); 375 ASSERT (GuidHob != NULL); 376 if (GuidHob != NULL) { 377 HobData = GET_GUID_HOB_DATA (GuidHob); 378 CopyMem (HobData, FspHobListPtr, sizeof (*FspHobListPtr)); 379 } 380 355 381 if (Status == FSP_STATUS_VARIABLE_REQUEST) { 356 382 // -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/FspWrapperApiTest.c
r99404 r108794 84 84 return RETURN_SUCCESS; 85 85 } 86 87 /** 88 Test the output of FSP API - FspSmmInit. 89 90 @param[in] FspiUpdDataPtr Address pointer to the Smm Init parameters structure. 91 92 @return test result on output of FspSmmInit API. 93 **/ 94 EFI_STATUS 95 EFIAPI 96 TestFspSmmInitApiOutput ( 97 IN VOID *FspiUpdDataPtr 98 ) 99 { 100 return RETURN_SUCCESS; 101 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/FspWrapperHobProcessLibSample.c
r99404 r108794 401 401 return EFI_SUCCESS; 402 402 } 403 404 /** 405 Post FSP-I HOB process. 406 407 @param[in] FspHobList Pointer to the HOB data structure produced by FSP. 408 409 @return If platform process the FSP hob list successfully. 410 **/ 411 EFI_STATUS 412 EFIAPI 413 PostFspiHobProcess ( 414 IN VOID *FspHobList 415 ) 416 { 417 return EFI_SUCCESS; 418 }
Note:
See TracChangeset
for help on using the changeset viewer.