]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Guid/FirmwarePerformance.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Guid / FirmwarePerformance.h
CommitLineData
0284e90c
LG
1/** @file\r
2 ACPI Firmware Performance Data Table (FPDT) implementation specific definitions.\r
3\r
73fef64f 4 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
0284e90c
LG
6\r
7**/\r
8\r
9#ifndef _FIRMWARE_PERFORMANCE_GUID_H_\r
10#define _FIRMWARE_PERFORMANCE_GUID_H_\r
11\r
0284e90c 12#include <PiPei.h>\r
96f0d1ca 13#include <IndustryStandard/Acpi.h>\r
0284e90c
LG
14#include <Ppi/SecPerformance.h>\r
15\r
16///\r
17/// This GUID is used for FPDT implementation specific EFI Variable, LockBox and Hob.\r
18///\r
19/// EFI Variable:\r
20/// GUID - gEfiFirmwarePerformanceGuid\r
21/// Name - EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME\r
22/// Data - FIRMWARE_PERFORMANCE_VARIABLE\r
23///\r
24/// LockBox:\r
25/// GUID - gEfiFirmwarePerformanceGuid\r
26/// Data - EFI_ACPI_BASIC_S3_SUSPEND_PERFORMANCE_RECORD\r
27///\r
28/// Hob:\r
29/// GUID - gEfiFirmwarePerformanceGuid\r
30/// Data - FIRMWARE_SEC_PERFORMANCE (defined in <Ppi/SecPerformance.h>)\r
31///\r
1c0cc375
LG
32/// SMI:\r
33/// GUID - gEfiFirmwarePerformanceGuid\r
34/// Data - SMM_BOOT_RECORD_COMMUNICATE\r
35///\r
36/// StatusCodeData:\r
37/// Type - gEfiFirmwarePerformanceGuid\r
38/// Data - One or more boot record\r
39///\r
0284e90c
LG
40#define EFI_FIRMWARE_PERFORMANCE_GUID \\r
41 { \\r
42 0xc095791a, 0x3001, 0x47b2, {0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 } \\r
43 }\r
44\r
45#define EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME L"FirmwarePerformance"\r
46\r
db91c620
SZ
47/// LockBox:\r
48/// GUID - gFirmwarePerformanceS3PointerGuid\r
49/// Data - S3 performance table pointer\r
50///\r
51#define FIRMWARE_PERFORMANCE_S3_POINTER_GUID \\r
52 { \\r
53 0xdc65adc, 0xa973, 0x4130, { 0x8d, 0xf0, 0x2a, 0xdb, 0xeb, 0x9e, 0x4a, 0x31 } \\r
54 }\r
55\r
0284e90c
LG
56#pragma pack(1)\r
57\r
58///\r
59/// Firmware Performance Data Table.\r
60/// This structure will be installed into ACPI table as FPDT in normal boot path.\r
61///\r
62typedef struct {\r
1436aea4
MK
63 EFI_ACPI_DESCRIPTION_HEADER Header; ///< Common ACPI description table header.\r
64 EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD BootPointerRecord; ///< Basic Boot Performance Table Pointer record.\r
65 EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD S3PointerRecord; ///< S3 Performance Table Pointer record.\r
0284e90c
LG
66} FIRMWARE_PERFORMANCE_TABLE;\r
67\r
68///\r
69/// S3 Performance Data Table.\r
70/// This structure contains S3 performance records which will be updated in S3\r
71/// suspend and S3 resume boot path.\r
72///\r
73typedef struct {\r
1436aea4
MK
74 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.\r
75 EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD S3Resume; ///< Basic S3 Resume performance record.\r
76 EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD S3Suspend; ///< Basic S3 Suspend performance record.\r
0284e90c
LG
77} S3_PERFORMANCE_TABLE;\r
78\r
79///\r
80/// Basic Boot Performance Data Table.\r
81/// This structure contains BasicBoot performance record.\r
82///\r
83typedef struct {\r
1436aea4
MK
84 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.\r
85 EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD BasicBoot; ///< Basic Boot Resume performance record.\r
1c0cc375
LG
86 //\r
87 // one or more boot performance records.\r
88 //\r
0284e90c
LG
89} BOOT_PERFORMANCE_TABLE;\r
90\r
73fef64f
LG
91///\r
92/// Boot performance table for the performance record in SMM phase.\r
93///\r
94///\r
95typedef struct {\r
1436aea4 96 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; ///< Common ACPI table header.\r
73fef64f
LG
97 //\r
98 // one or more boot performance records.\r
99 //\r
100} SMM_BOOT_PERFORMANCE_TABLE;\r
101\r
0284e90c
LG
102///\r
103/// Performance data pointed by Performance Pointer Record.\r
104///\r
105typedef struct {\r
1436aea4
MK
106 BOOT_PERFORMANCE_TABLE BootPerformance; ///< Basic Boot Performance.\r
107 S3_PERFORMANCE_TABLE S3Performance; ///< S3 performance.\r
0284e90c
LG
108} FIRMWARE_PERFORMANCE_RUNTIME_DATA;\r
109\r
110///\r
111/// Variable defined for FPDT implementation.\r
db91c620 112/// This Variable is produced by FPDT DXE module.\r
0284e90c
LG
113///\r
114typedef struct {\r
1436aea4
MK
115 EFI_PHYSICAL_ADDRESS BootPerformanceTablePointer; ///< Pointer to Boot Performance Table.\r
116 EFI_PHYSICAL_ADDRESS S3PerformanceTablePointer; ///< Pointer to S3 Performance Table.\r
0284e90c
LG
117} FIRMWARE_PERFORMANCE_VARIABLE;\r
118\r
119#pragma pack()\r
120\r
1c0cc375
LG
121//\r
122// Log BOOT RECORD from SMM driver on boot time.\r
123//\r
1436aea4
MK
124#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE 1\r
125#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA 2\r
126#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET 3\r
1c0cc375
LG
127\r
128typedef struct {\r
1436aea4
MK
129 UINTN Function;\r
130 EFI_STATUS ReturnStatus;\r
131 UINTN BootRecordSize;\r
132 VOID *BootRecordData;\r
133 UINTN BootRecordOffset;\r
1c0cc375
LG
134} SMM_BOOT_RECORD_COMMUNICATE;\r
135\r
1436aea4
MK
136extern EFI_GUID gEfiFirmwarePerformanceGuid;\r
137extern EFI_GUID gFirmwarePerformanceS3PointerGuid;\r
0284e90c
LG
138\r
139#endif\r