2 This file defines edk2 extended firmware performance records.
3 These records will be added into ACPI FPDT Firmware Basic Boot Performance Table.
5 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __EXTENDED_FIRMWARE_PERFORMANCE_H__
17 #define __EXTENDED_FIRMWARE_PERFORMANCE_H__
19 #include <IndustryStandard/Acpi.h>
22 // Known performance tokens
24 #define SEC_TOK "SEC" ///< SEC Phase
25 #define DXE_TOK "DXE" ///< DXE Phase
26 #define PEI_TOK "PEI" ///< PEI Phase
27 #define BDS_TOK "BDS" ///< BDS Phase
28 #define DRIVERBINDING_START_TOK "DB:Start:" ///< Driver Binding Start() function call
29 #define DRIVERBINDING_SUPPORT_TOK "DB:Support:" ///< Driver Binding Support() function call
30 #define DRIVERBINDING_STOP_TOK "DB:Stop:" ///< Driver Binding Stop() function call
31 #define LOAD_IMAGE_TOK "LoadImage:" ///< Load a dispatched module
32 #define START_IMAGE_TOK "StartImage:" ///< Dispatched Modules Entry Point execution
33 #define PEIM_TOK "PEIM" ///< PEIM Modules Entry Point execution
38 #define FPDT_RECORD_REVISION_1 (0x01)
41 // Length field in EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER is a UINT8, thus:
43 #define FPDT_MAX_PERF_RECORD_SIZE (MAX_UINT8)
48 #define FPDT_GUID_EVENT_TYPE 0x1010
49 #define FPDT_DYNAMIC_STRING_EVENT_TYPE 0x1011
50 #define FPDT_DUAL_GUID_STRING_EVENT_TYPE 0x1012
51 #define FPDT_GUID_QWORD_EVENT_TYPE 0x1013
52 #define FPDT_GUID_QWORD_STRING_EVENT_TYPE 0x1014
55 // EDKII extended Fpdt record structures
57 #define FPDT_STRING_EVENT_RECORD_NAME_LENGTH 24
61 // FPDT Boot Performance Guid Event Record Structure
64 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header
;
66 /// ProgressID < 0x10 are reserved for core performance entries.
67 /// Start measurement point shall have lowered one nibble set to zero and
68 /// corresponding end points shall have lowered one nibble set to non-zero value;
69 /// keeping other nibbles same as start point.
73 /// APIC ID for the processor in the system used as a timestamp clock source.
74 /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
78 /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
82 /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
85 } FPDT_GUID_EVENT_RECORD
;
88 // FPDT Boot Performance Dynamic String Event Record Structure
91 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header
;
93 /// ProgressID < 0x10 are reserved for core performance entries.
94 /// Start measurement point shall have lowered one nibble set to zero and
95 /// corresponding end points shall have lowered one nibble set to non-zero value;
96 /// keeping other nibbles same as start point.
100 /// APIC ID for the processor in the system used as a timestamp clock source.
101 /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
105 /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
109 /// If ProgressID < 0x10, GUID of the referenced module; otherwise, GUID of the module logging the event.
113 /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
114 /// It may be module name, function name, or token name.
117 } FPDT_DYNAMIC_STRING_EVENT_RECORD
;
120 // FPDT Boot Performance Dual GUID String Event Record Structure
123 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header
;
125 /// ProgressID < 0x10 are reserved for core performance entries.
126 /// Start measurement point shall have lowered one nibble set to zero and
127 /// corresponding end points shall have lowered one nibble set to non-zero value;
128 /// keeping other nibbles same as start point.
132 /// APIC ID for the processor in the system used as a timestamp clock source.
133 /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
137 /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
141 /// GUID of the module logging the event.
145 /// Event or Ppi or Protocol GUID for Callback.
149 /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
150 /// It is the function name.
153 } FPDT_DUAL_GUID_STRING_EVENT_RECORD
;
156 // FPDT Boot Performance GUID Qword Event Record Structure
159 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header
;
161 /// ProgressID < 0x10 are reserved for core performance entries.
162 /// Start measurement point shall have lowered one nibble set to zero and
163 /// corresponding end points shall have lowered one nibble set to non-zero value;
164 /// keeping other nibbles same as start point.
168 /// APIC ID for the processor in the system used as a timestamp clock source.
169 /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
173 /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
177 /// GUID of the module logging the event
181 /// Qword of misc data, meaning depends on the ProgressId
184 } FPDT_GUID_QWORD_EVENT_RECORD
;
187 // FPDT Boot Performance GUID Qword String Event Record Structure
190 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header
;
192 /// ProgressID < 0x10 are reserved for core performance entries.
193 /// Start measurement point shall have lowered one nibble set to zero and
194 /// corresponding end points shall have lowered one nibble set to non-zero value;
195 /// keeping other nibbles same as start point.
199 /// APIC ID for the processor in the system used as a timestamp clock source.
200 /// If only one timestamp clock source is used, this field is Reserved and populated as 0.
204 /// 64-bit value (nanosecond) describing elapsed time since the most recent deassertion of processor reset.
208 /// GUID of the module logging the event
212 /// Qword of misc data, meaning depends on the ProgressId
216 /// ASCII string describing the module. Padding supplied at the end if necessary with null characters (0x00).
219 } FPDT_GUID_QWORD_STRING_EVENT_RECORD
;
224 // Union of all FPDT records
227 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER RecordHeader
;
228 FPDT_GUID_EVENT_RECORD GuidEvent
;
229 FPDT_DYNAMIC_STRING_EVENT_RECORD DynamicStringEvent
;
230 FPDT_DUAL_GUID_STRING_EVENT_RECORD DualGuidStringEvent
;
231 FPDT_GUID_QWORD_EVENT_RECORD GuidQwordEvent
;
232 FPDT_GUID_QWORD_STRING_EVENT_RECORD GuidQwordStringEvent
;
236 // Union of all pointers to FPDT records
239 EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER
*RecordHeader
;
240 FPDT_GUID_EVENT_RECORD
*GuidEvent
;
241 FPDT_DYNAMIC_STRING_EVENT_RECORD
*DynamicStringEvent
;
242 FPDT_DUAL_GUID_STRING_EVENT_RECORD
*DualGuidStringEvent
;
243 FPDT_GUID_QWORD_EVENT_RECORD
*GuidQwordEvent
;
244 FPDT_GUID_QWORD_STRING_EVENT_RECORD
*GuidQwordStringEvent
;
249 /// GUID - gEdkiiFpdtExtendedFirmwarePerformanceGuid;
250 /// Data - FPDT_PEI_EXT_PERF_HEADER + one or more FPDT records
253 UINT32 SizeOfAllEntries
;
254 UINT32 LoadImageCount
;
256 } FPDT_PEI_EXT_PERF_HEADER
;
258 extern EFI_GUID gEdkiiFpdtExtendedFirmwarePerformanceGuid
;