for Firmware Basic Boot Performance Record and other boot performance records, \r
and install FPDT to ACPI table.\r
\r
- Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2011 - 2014, 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
#include <Library/LockBoxLib.h>\r
#include <Library/UefiLib.h>\r
\r
-//\r
-// ACPI table information used to initialize tables.\r
-//\r
-#define EFI_ACPI_OEM_ID "INTEL"\r
-#define EFI_ACPI_OEM_TABLE_ID 0x2020204F4E414954ULL // "TIANO "\r
-#define EFI_ACPI_OEM_REVISION 0x00000001\r
-#define EFI_ACPI_CREATOR_ID 0x5446534D // TBD "MSFT"\r
-#define EFI_ACPI_CREATOR_REVISION 0x01000013 // TBD\r
#define EXTENSION_RECORD_SIZE 0x10000\r
#define SMM_BOOT_RECORD_COMM_SIZE OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data) + sizeof(SMM_BOOT_RECORD_COMMUNICATE)\r
\r
EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION, // Revision\r
0x00, // Checksum will be updated at runtime\r
//\r
- // It is expected that these values will be updated at runtime.\r
+ // It is expected that these values will be updated at EntryPoint.\r
//\r
- EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field\r
- EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)\r
- EFI_ACPI_OEM_REVISION, // OEM revision number\r
- EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID\r
- EFI_ACPI_CREATOR_REVISION, // ASL compiler revision number\r
+ {0x00}, // OEM ID is a 6 bytes long field\r
+ 0x00, // OEM Table ID(8 bytes long)\r
+ 0x00, // OEM Revision\r
+ 0x00, // Creator ID\r
+ 0x00, // Creator Revision\r
},\r
//\r
// Firmware Basic Boot Performance Table Pointer Record.\r
mFirmwarePerformanceTableTemplate.S3PointerRecord.S3PerformanceTablePointer = (UINT64) (UINTN) mAcpiS3PerformanceTable;\r
//\r
// Save Runtime Performance Table pointers to Variable.\r
+ // Don't check SetVariable return status. It doesn't impact FPDT table generation. \r
//\r
- Status = gRT->SetVariable (\r
- EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME,\r
- &gEfiFirmwarePerformanceGuid,\r
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
- sizeof (PerformanceVariable),\r
- &PerformanceVariable\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
+ gRT->SetVariable (\r
+ EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME,\r
+ &gEfiFirmwarePerformanceGuid,\r
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
+ sizeof (PerformanceVariable),\r
+ &PerformanceVariable\r
+ );\r
\r
//\r
// Publish Firmware Performance Data Table.\r
EFI_HOB_GUID_TYPE *GuidHob;\r
FIRMWARE_SEC_PERFORMANCE *Performance;\r
VOID *Registration;\r
+ UINT64 OemTableId;\r
+\r
+ CopyMem (\r
+ mFirmwarePerformanceTableTemplate.Header.OemId,\r
+ PcdGetPtr (PcdAcpiDefaultOemId),\r
+ sizeof (mFirmwarePerformanceTableTemplate.Header.OemId)\r
+ );\r
+ OemTableId = PcdGet64 (PcdAcpiDefaultOemTableId);\r
+ CopyMem (&mFirmwarePerformanceTableTemplate.Header.OemTableId, &OemTableId, sizeof (UINT64));\r
+ mFirmwarePerformanceTableTemplate.Header.OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);\r
+ mFirmwarePerformanceTableTemplate.Header.CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);\r
+ mFirmwarePerformanceTableTemplate.Header.CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);\r
\r
//\r
// Get Report Status Code Handler Protocol.\r