## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
gEfiFileInfoGuid ## CONSUMES ## GUID\r
gEfiPcAnsiGuid ## CONSUMES ## GUID (The type of terminal)\r
- gEfiGenericPlatformVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
+ gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
gEfiUartDevicePathGuid ## CONSUMES ## GUID (Identify the device path for UARD device)\r
gEfiSasDevicePathGuid ## CONSUMES ## GUID (Identify the device path for SAS device)\r
\r
#include <Protocol/FirmwareVolume2.h>\r
#include <Protocol/PciIo.h>\r
#include <Protocol/AcpiS3Save.h>\r
-#include <Protocol/Performance.h>\r
#include <Protocol/FirmwareVolumeDispatch.h>\r
#include <Protocol/OEMBadging.h>\r
#include <Protocol/ConsoleControl.h>\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/HiiImage.h>\r
\r
-\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
#include <Guid/PcAnsi.h>\r
#include <Guid/ShellFile.h>\r
-#include <Guid/GenericPlatformVariable.h>\r
#include <Guid/Bmp.h>\r
+#include <Guid/Performance.h>\r
\r
#include <Library/PrintLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/DxeServicesLib.h>\r
\r
-#define PERFORMANCE_SIGNATURE SIGNATURE_32 ('P', 'e', 'r', 'f')\r
-#define PERF_TOKEN_SIZE 28\r
-#define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)\r
-#define PERF_PEI_ENTRY_MAX_NUM 50\r
-\r
-typedef struct {\r
- CHAR8 Token[PERF_TOKEN_SIZE];\r
- UINT32 Duration;\r
-} PERF_DATA;\r
-\r
-typedef struct {\r
- UINT64 BootToOs;\r
- UINT64 S3Resume;\r
- UINT32 S3EntryNum;\r
- PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];\r
- UINT64 CpuFreq;\r
- UINT64 BDSRaw;\r
- UINT32 Count;\r
- UINT32 Signiture;\r
-} PERF_HEADER;\r
\r
/**\r
\r
BOOLEAN CountUp;\r
\r
//\r
- // Retrive time stamp count as early as possilbe\r
+ // Retrieve time stamp count as early as possible\r
//\r
Ticker = GetPerformanceCounter ();\r
\r
\r
gRT->SetVariable (\r
L"PerfDataMemAddr",\r
- &gEfiGenericPlatformVariableGuid,\r
+ &gPerformanceProtocolGuid,\r
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
sizeof (EFI_PHYSICAL_ADDRESS),\r
&AcpiLowMemoryBase\r