64 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
65 &gEfiEndOfPeiSignalPpiGuid,
90 DEBUG ((DEBUG_INFO,
"S3EndOfPeiNotify enter\n"));
94 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase AfterPciEnumeration status: 0x%x\n", Status));
99 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
100 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase AfterPciEnumeration requested reset 0x%x\n", Status));
106 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase ReadyToBoot status: 0x%x\n", Status));
111 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
112 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase ReadyToBoot requested reset 0x%x\n", Status));
118 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase EndOfFirmware status: 0x%x\n", Status));
123 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
124 DEBUG ((DEBUG_INFO,
"FSP S3NotifyPhase EndOfFirmware requested reset 0x%x\n", Status));
145 OUT VOID **FspHobList
153 EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
154 &gFspSiliconInitDonePpiGuid,
155 &mFspSiliconInitDonePpi
172 OUT VOID **FspHobList
178 if (GuidHob !=
NULL) {
179 *FspHobList = *(VOID **)GET_GUID_HOB_DATA (GuidHob);
182 return EFI_NOT_FOUND;
196 if (
PcdGet64 (PcdFspsUpdDataAddress64) != 0) {
241 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
242 &gEfiEndOfPeiSignalPpiGuid,
265 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
266 &gEfiPeiMemoryDiscoveredPpiGuid,
289 UINT64 TimeStampCounterStart;
296 DEBUG ((DEBUG_INFO,
"PeiMemoryDiscoveredNotify enter\n"));
297 FspsUpdDataPtr =
NULL;
300 DEBUG ((DEBUG_INFO,
"FspsHeaderPtr - 0x%x\n", FspsHeaderPtr));
301 if (FspsHeaderPtr ==
NULL) {
302 return EFI_DEVICE_ERROR;
310 ASSERT (FspsUpdDataPtr !=
NULL);
315 ASSERT (FspsUpdDataPtr !=
NULL);
321 PERF_START_EX (&gFspApiPerformanceGuid,
"EventRec",
NULL, 0, FSP_STATUS_CODE_SILICON_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);
327 if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
328 DEBUG ((DEBUG_INFO,
"FspSiliconInitApi requested reset %r\n", Status));
332 if ((Status != FSP_STATUS_VARIABLE_REQUEST) && EFI_ERROR (Status)) {
333 DEBUG ((DEBUG_ERROR,
"ERROR - Failed to execute FspSiliconInitApi(), Status = %r\n", Status));
337 DEBUG ((DEBUG_INFO,
"FspSiliconInit status: %r\n", Status));
343 ASSERT (GuidHob !=
NULL);
344 FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);
345 DEBUG ((DEBUG_INFO,
"FspHobListPtr - 0x%x\n", FspHobListPtr));
347 if (Status == FSP_STATUS_VARIABLE_REQUEST) {
359 PERF_END_EX (&gFspApiPerformanceGuid,
"EventRec",
NULL, 0, FSP_STATUS_CODE_SILICON_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
364 DEBUG ((DEBUG_ERROR,
"ERROR - TestFspSiliconInitApiOutput () fail, Status = %r\n", Status));
401 if (BootMode == BOOT_ON_S3_RESUME) {
423 MeasurementExcludedFvPpi =
AllocatePool (
sizeof (*MeasurementExcludedFvPpi));
424 if (MeasurementExcludedFvPpi ==
NULL) {
425 ASSERT (MeasurementExcludedFvPpi !=
NULL);
426 return EFI_OUT_OF_RESOURCES;
429 MeasurementExcludedFvPpi->Count = 1;
430 MeasurementExcludedFvPpi->Fv[0].FvBase =
PcdGet32 (PcdFspsBaseAddress);
433 MeasurementExcludedPpiList =
AllocatePool (
sizeof (*MeasurementExcludedPpiList));
434 if (MeasurementExcludedPpiList ==
NULL) {
435 ASSERT (MeasurementExcludedPpiList !=
NULL);
436 FreePool (MeasurementExcludedFvPpi);
437 return EFI_OUT_OF_RESOURCES;
440 MeasurementExcludedPpiList->
Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
441 MeasurementExcludedPpiList->
Guid = &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid;
442 MeasurementExcludedPpiList->
Ppi = MeasurementExcludedFvPpi;
484 (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
507 UINT32 FspMeasureMask;
509 DEBUG ((DEBUG_INFO,
"TcgPpiNotify FSPS\n"));
511 FspMeasureMask =
PcdGet32 (PcdFspMeasurementConfig);
513 if ((FspMeasureMask & FSP_MEASURE_FSPS) != 0) {
542 DEBUG ((DEBUG_INFO,
"FspsWrapperPeimEntryPoint\n"));
547 if (
PcdGet8 (PcdFspModeSelection) == 1) {
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
UINT64 EFIAPI AsmReadTsc(VOID)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI PeiServicesGetBootMode(OUT EFI_BOOT_MODE *BootMode)
VOID EFIAPI PeiServicesInstallFvInfoPpi(IN CONST EFI_GUID *FvFormat OPTIONAL, IN CONST VOID *FvInfo, IN UINT32 FvInfoSize, IN CONST EFI_GUID *ParentFvName OPTIONAL, IN CONST EFI_GUID *ParentFileName OPTIONAL)
EFI_STATUS EFIAPI PeiServicesNotifyPpi(IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
@ EnumInitPhaseAfterPciEnumeration
@ EnumInitPhaseReadyToBoot
@ EnumInitPhaseEndOfFirmware
EFI_STATUS EFIAPI MeasureFspFirmwareBlob(IN UINT32 PcrIndex, IN CHAR8 *Description OPTIONAL, IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, IN UINT64 FirmwareBlobLength)
EFI_STATUS EFIAPI CallFspSiliconInit(IN VOID *FspsUpdDataPtr)
EFI_STATUS EFIAPI CallFspNotifyPhase(IN NOTIFY_PHASE_PARAMS *NotifyPhaseParams)
FSP_INFO_HEADER *EFIAPI FspFindFspHeader(IN EFI_PHYSICAL_ADDRESS FlashFvFspBase)
EFI_STATUS EFIAPI TestFspSiliconInitApiOutput(IN VOID *FspsUpdDataPtr)
EFI_STATUS EFIAPI PostFspsHobProcess(IN VOID *FspHobList)
EFI_STATUS EFIAPI FspWrapperVariableRequestHandler(IN OUT VOID **FspHobListPtr, IN UINT8 ComponentIndex)
EFI_STATUS EFIAPI FspWrapperMultiPhaseHandler(IN OUT VOID **FspHobListPtr, IN UINT8 ComponentIndex)
EFI_STATUS EFIAPI FspsWrapperPeimEntryPoint(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
EFI_STATUS FspsWrapperInitDispatchMode(VOID)
EFI_STATUS EFIAPI TcgPpiNotify(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
EFI_STATUS EFIAPI FspsWrapperEndOfPeiNotify(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
UINTN GetFspsUpdDataAddress(VOID)
EFI_STATUS EFIAPI S3EndOfPeiNotify(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
EFI_STATUS FspsWrapperInitApiMode(VOID)
EFI_STATUS EFIAPI PeiMemoryDiscoveredNotify(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
EFI_STATUS EFIAPI FspSiliconInitDoneGetFspHobList(IN CONST EFI_PEI_SERVICES **PeiServices, IN FSP_SILICON_INIT_DONE_PPI *This, OUT VOID **FspHobList)
#define RETURN_ERROR(StatusCode)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGet64(TokenName)
#define PcdGet8(TokenName)
#define PcdGet32(TokenName)
VOID * EFI_PEI_FILE_HANDLE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)