2 ACPI Firmware Performance Data Table (FPDT) implementation specific definitions.
4 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _FIRMWARE_PERFORMANCE_GUID_H_
10 #define _FIRMWARE_PERFORMANCE_GUID_H_
13 #include <IndustryStandard/Acpi.h>
14 #include <Ppi/SecPerformance.h>
17 /// This GUID is used for FPDT implementation specific EFI Variable, LockBox and Hob.
20 /// GUID - gEfiFirmwarePerformanceGuid
21 /// Name - EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME
22 /// Data - FIRMWARE_PERFORMANCE_VARIABLE
25 /// GUID - gEfiFirmwarePerformanceGuid
26 /// Data - EFI_ACPI_BASIC_S3_SUSPEND_PERFORMANCE_RECORD
29 /// GUID - gEfiFirmwarePerformanceGuid
30 /// Data - FIRMWARE_SEC_PERFORMANCE (defined in <Ppi/SecPerformance.h>)
33 /// GUID - gEfiFirmwarePerformanceGuid
34 /// Data - SMM_BOOT_RECORD_COMMUNICATE
37 /// Type - gEfiFirmwarePerformanceGuid
38 /// Data - One or more boot record
40 #define EFI_FIRMWARE_PERFORMANCE_GUID \
42 0xc095791a, 0x3001, 0x47b2, {0x80, 0xc9, 0xea, 0xc7, 0x31, 0x9f, 0x2f, 0xa4 } \
45 #define EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME L"FirmwarePerformance"
48 /// GUID - gFirmwarePerformanceS3PointerGuid
49 /// Data - S3 performance table pointer
51 #define FIRMWARE_PERFORMANCE_S3_POINTER_GUID \
53 0xdc65adc, 0xa973, 0x4130, { 0x8d, 0xf0, 0x2a, 0xdb, 0xeb, 0x9e, 0x4a, 0x31 } \
59 /// Firmware Performance Data Table.
60 /// This structure will be installed into ACPI table as FPDT in normal boot path.
63 EFI_ACPI_DESCRIPTION_HEADER Header
; ///< Common ACPI description table header.
64 EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD BootPointerRecord
; ///< Basic Boot Performance Table Pointer record.
65 EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD S3PointerRecord
; ///< S3 Performance Table Pointer record.
66 } FIRMWARE_PERFORMANCE_TABLE
;
69 /// S3 Performance Data Table.
70 /// This structure contains S3 performance records which will be updated in S3
71 /// suspend and S3 resume boot path.
74 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header
; ///< Common ACPI table header.
75 EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD S3Resume
; ///< Basic S3 Resume performance record.
76 EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD S3Suspend
; ///< Basic S3 Suspend performance record.
77 } S3_PERFORMANCE_TABLE
;
80 /// Basic Boot Performance Data Table.
81 /// This structure contains BasicBoot performance record.
84 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header
; ///< Common ACPI table header.
85 EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD BasicBoot
; ///< Basic Boot Resume performance record.
87 // one or more boot performance records.
89 } BOOT_PERFORMANCE_TABLE
;
92 /// Boot performance table for the performance record in SMM phase.
96 EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header
; ///< Common ACPI table header.
98 // one or more boot performance records.
100 } SMM_BOOT_PERFORMANCE_TABLE
;
103 /// Performance data pointed by Performance Pointer Record.
106 BOOT_PERFORMANCE_TABLE BootPerformance
; ///< Basic Boot Performance.
107 S3_PERFORMANCE_TABLE S3Performance
; ///< S3 performance.
108 } FIRMWARE_PERFORMANCE_RUNTIME_DATA
;
111 /// Variable defined for FPDT implementation.
112 /// This Variable is produced by FPDT DXE module.
115 EFI_PHYSICAL_ADDRESS BootPerformanceTablePointer
; ///< Pointer to Boot Performance Table.
116 EFI_PHYSICAL_ADDRESS S3PerformanceTablePointer
; ///< Pointer to S3 Performance Table.
117 } FIRMWARE_PERFORMANCE_VARIABLE
;
122 // Log BOOT RECORD from SMM driver on boot time.
124 #define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE 1
125 #define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA 2
126 #define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET 3
130 EFI_STATUS ReturnStatus
;
131 UINTN BootRecordSize
;
132 VOID
*BootRecordData
;
133 UINTN BootRecordOffset
;
134 } SMM_BOOT_RECORD_COMMUNICATE
;
136 extern EFI_GUID gEfiFirmwarePerformanceGuid
;
137 extern EFI_GUID gFirmwarePerformanceS3PointerGuid
;