]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Guid/FirmwarePerformance.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Guid / FirmwarePerformance.h
index 7da07f9ea736a6abb93e853cc337c879ee5bb639..3ce146eba194e83c54e14884e515d8e7464db0ba 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   ACPI Firmware Performance Data Table (FPDT) implementation specific definitions.\r
 \r
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 \r
 #define EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME  L"FirmwarePerformance"\r
 \r
+/// LockBox:\r
+///   GUID - gFirmwarePerformanceS3PointerGuid\r
+///   Data - S3 performance table pointer\r
+///\r
+#define FIRMWARE_PERFORMANCE_S3_POINTER_GUID \\r
+  { \\r
+    0xdc65adc, 0xa973, 0x4130, { 0x8d, 0xf0, 0x2a, 0xdb, 0xeb, 0x9e, 0x4a, 0x31 } \\r
+  }\r
+\r
 #pragma pack(1)\r
 \r
 ///\r
@@ -57,9 +60,9 @@
 /// This structure will be installed into ACPI table as FPDT in normal boot path.\r
 ///\r
 typedef struct {\r
-  EFI_ACPI_DESCRIPTION_HEADER                             Header;            ///< Common ACPI description table header.\r
-  EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD BootPointerRecord; ///< Basic Boot Performance Table Pointer record.\r
-  EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD   S3PointerRecord;   ///< S3 Performance Table Pointer record.\r
+  EFI_ACPI_DESCRIPTION_HEADER                                Header;            ///< Common ACPI description table header.\r
+  EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD    BootPointerRecord; ///< Basic Boot Performance Table Pointer record.\r
+  EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD      S3PointerRecord;   ///< S3 Performance Table Pointer record.\r
 } FIRMWARE_PERFORMANCE_TABLE;\r
 \r
 ///\r
@@ -68,9 +71,9 @@ typedef struct {
 /// suspend and S3 resume boot path.\r
 ///\r
 typedef struct {\r
-  EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER  Header;    ///< Common ACPI table header.\r
-  EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD          S3Resume;  ///< Basic S3 Resume performance record.\r
-  EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD         S3Suspend; ///< Basic S3 Suspend performance record.\r
+  EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER    Header;    ///< Common ACPI table header.\r
+  EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD            S3Resume;  ///< Basic S3 Resume performance record.\r
+  EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD           S3Suspend; ///< Basic S3 Suspend performance record.\r
 } S3_PERFORMANCE_TABLE;\r
 \r
 ///\r
@@ -78,28 +81,39 @@ typedef struct {
 /// This structure contains BasicBoot performance record.\r
 ///\r
 typedef struct {\r
-  EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER   Header;     ///< Common ACPI table header.\r
-  EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD BasicBoot;  ///< Basic Boot Resume performance record.\r
+  EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER      Header;    ///< Common ACPI table header.\r
+  EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD    BasicBoot; ///< Basic Boot Resume performance record.\r
   //\r
   // one or more boot performance records.\r
   //\r
 } BOOT_PERFORMANCE_TABLE;\r
 \r
+///\r
+/// Boot performance table for the performance record in SMM phase.\r
+///\r
+///\r
+typedef struct {\r
+  EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER    Header;    ///< Common ACPI table header.\r
+  //\r
+  // one or more boot performance records.\r
+  //\r
+} SMM_BOOT_PERFORMANCE_TABLE;\r
+\r
 ///\r
 /// Performance data pointed by Performance Pointer Record.\r
 ///\r
 typedef struct {\r
-  BOOT_PERFORMANCE_TABLE         BootPerformance; ///< Basic Boot Performance.\r
-  S3_PERFORMANCE_TABLE           S3Performance;   ///< S3 performance.\r
+  BOOT_PERFORMANCE_TABLE    BootPerformance;      ///< Basic Boot Performance.\r
+  S3_PERFORMANCE_TABLE      S3Performance;        ///< S3 performance.\r
 } FIRMWARE_PERFORMANCE_RUNTIME_DATA;\r
 \r
 ///\r
 /// Variable defined for FPDT implementation.\r
-/// This Variable is produced by FPDT DXE module and consumed by FPDT PEIM.\r
+/// This Variable is produced by FPDT DXE module.\r
 ///\r
 typedef struct {\r
-  EFI_PHYSICAL_ADDRESS  BootPerformanceTablePointer; ///< Pointer to Boot Performance Table.\r
-  EFI_PHYSICAL_ADDRESS  S3PerformanceTablePointer;   ///< Pointer to S3 Performance Table.\r
+  EFI_PHYSICAL_ADDRESS    BootPerformanceTablePointer; ///< Pointer to Boot Performance Table.\r
+  EFI_PHYSICAL_ADDRESS    S3PerformanceTablePointer;   ///< Pointer to S3 Performance Table.\r
 } FIRMWARE_PERFORMANCE_VARIABLE;\r
 \r
 #pragma pack()\r
@@ -107,16 +121,19 @@ typedef struct {
 //\r
 // Log BOOT RECORD from SMM driver on boot time.\r
 //\r
-#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE          1\r
-#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA          2\r
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE            1\r
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA            2\r
+#define SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET  3\r
 \r
 typedef struct {\r
-  UINTN             Function;\r
-  EFI_STATUS        ReturnStatus;\r
-  UINTN             BootRecordSize;\r
-  VOID              *BootRecordData;\r
+  UINTN         Function;\r
+  EFI_STATUS    ReturnStatus;\r
+  UINTN         BootRecordSize;\r
+  VOID          *BootRecordData;\r
+  UINTN         BootRecordOffset;\r
 } SMM_BOOT_RECORD_COMMUNICATE;\r
 \r
-extern EFI_GUID gEfiFirmwarePerformanceGuid;\r
+extern EFI_GUID  gEfiFirmwarePerformanceGuid;\r
+extern EFI_GUID  gFirmwarePerformanceS3PointerGuid;\r
 \r
 #endif\r