72 UINT8 *BootPerformanceTable;
76 UINT8 *FirmwarePerformanceData;
77 UINT8 *FirmwarePerformanceTablePtr;
83 (Value != (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_OS_WAKE)))
85 return EFI_UNSUPPORTED;
96 S3PerformanceTablePointer = 0;
98 Status =
RestoreLockBox (&gFirmwarePerformanceS3PointerGuid, &S3PerformanceTablePointer, &VarSize);
102 ASSERT (AcpiS3PerformanceTable !=
NULL);
104 DEBUG ((DEBUG_ERROR,
"FPDT S3 performance data in ACPI memory get corrupted\n"));
108 AcpiS3ResumeRecord = &AcpiS3PerformanceTable->
S3Resume;
117 DEBUG ((DEBUG_INFO,
"\nFPDT: S3 Resume Performance - AverageResume = 0x%x\n", AcpiS3ResumeRecord->
AverageResume));
119 DEBUG ((DEBUG_ERROR,
"\nFPDT: S3 ResumeCount reaches the MAX_UINT32 value. S3 ResumeCount record reset to Zero."));
122 DEBUG ((DEBUG_INFO,
"FPDT: S3 Resume Performance - ResumeCount = 0x%x\n", AcpiS3ResumeRecord->
ResumeCount));
123 DEBUG ((DEBUG_INFO,
"FPDT: S3 Resume Performance - FullResume = 0x%x\n", AcpiS3ResumeRecord->
FullResume));
128 AcpiS3SuspendRecord = &AcpiS3PerformanceTable->
S3Suspend;
132 &gEfiFirmwarePerformanceGuid,
141 DEBUG ((DEBUG_INFO,
"FPDT: S3 Suspend Performance - SuspendStart = %ld\n", AcpiS3SuspendRecord->
SuspendStart));
142 DEBUG ((DEBUG_INFO,
"FPDT: S3 Suspend Performance - SuspendEnd = %ld\n", AcpiS3SuspendRecord->
SuspendEnd));
145 &gEfiPeiReadOnlyVariable2PpiGuid,
148 (VOID **)&VariableServices
155 VarSize =
sizeof (PerformanceVariable);
156 Status = VariableServices->GetVariable (
158 EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME,
159 &gEfiFirmwarePerformanceGuid,
164 if (EFI_ERROR (Status)) {
174 GuidHob =
GetFirstGuidHob (&gEdkiiFpdtExtendedFirmwarePerformanceGuid);
175 while (GuidHob !=
NULL) {
176 FirmwarePerformanceData = GET_GUID_HOB_DATA (GuidHob);
181 GuidHob =
GetNextGuidHob (&gEdkiiFpdtExtendedFirmwarePerformanceGuid, GET_NEXT_HOB (GuidHob));
183 FirmwarePerformanceTablePtr += (
UINTN)(PeiPerformanceLogHeader->SizeOfAllEntries);
215 if (
FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {
220 &gEfiPeiRscHandlerPpiGuid,
#define EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
UINT64 EFIAPI GetPerformanceCounter(VOID)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
RETURN_STATUS EFIAPI RestoreLockBox(IN GUID *Guid, IN VOID *Buffer OPTIONAL, IN OUT UINTN *Length OPTIONAL)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define FeaturePcdGet(TokenName)
VOID * EFI_PEI_FILE_HANDLE
UINT32 EFI_STATUS_CODE_VALUE
#define EFI_PROGRESS_CODE
UINT32 EFI_STATUS_CODE_TYPE
#define EFI_STATUS_CODE_TYPE_MASK
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PHYSICAL_ADDRESS BootPerformanceTablePointer
Pointer to Boot Performance Table.
EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD S3Suspend
Basic S3 Suspend performance record.
EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header
Common ACPI table header.
EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD S3Resume
Basic S3 Resume performance record.