mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
MdePkg, SecurityPkg, OvmfPkg: Move CCEL table defs to ACPI header
Although Table 5.5 "DESCRIPTION_HEADER Signatures for tables defined by ACPI" and the "Links to ACPI-Related Documents" still reference the "Virtual Firmware Confidential Computing Event Log Table," the CCEL table has now been formally included in the ACPI specification, see https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html# description-header-signatures-for-tables-defined-by-acpi The CCEL (CC Event Log) table is defined in the ACPI 6.5 specification, section 5.2.34 "CC Event Log ACPI Table": https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html# cc-event-log-acpi-table Therefore, move the CCEL table and related definitions to the standard ACPI header files and update the relevant code to reflect the structure and macro renaming. Also add the definitions to the ACPI 6.6 headers. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
0809aa4dce
commit
4ae84e3e87
5 changed files with 89 additions and 36 deletions
|
|
@ -3069,6 +3069,36 @@ typedef struct {
|
|||
#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_POWER_LOSS 0x24
|
||||
#define EFI_ACPI_6_5_PHAT_RESET_REASON_REASON_POWER_BUTTON 0x25
|
||||
|
||||
///
|
||||
/// Confidential Computing Type definitions.
|
||||
///
|
||||
#define EFI_ACPI_6_5_CC_TYPE_NONE 0
|
||||
#define EFI_ACPI_6_5_CC_TYPE_SEV 1
|
||||
#define EFI_ACPI_6_5_CC_TYPE_TDX 2
|
||||
#define EFI_ACPI_6_5_CC_TYPE_APTEE 3
|
||||
|
||||
///
|
||||
/// Confidential Computing Event Log ACPI Table (CCEL).
|
||||
///
|
||||
typedef struct {
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
/// Confidential Computing (CC) type.
|
||||
UINT8 Type;
|
||||
/// Confidential Computing (CC) sub type.
|
||||
UINT8 SubType;
|
||||
/// Reserved.
|
||||
UINT16 Reserved;
|
||||
/// Log Area Minimum Length.
|
||||
UINT64 Laml;
|
||||
/// Log Area Start Address.
|
||||
UINT64 Lasa;
|
||||
} EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE;
|
||||
|
||||
///
|
||||
/// CCEL Revision (as defined in ACPI 6.5 spec.)
|
||||
///
|
||||
#define EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_REVISION 0x01
|
||||
|
||||
//
|
||||
// Known table signatures
|
||||
//
|
||||
|
|
@ -3098,6 +3128,11 @@ typedef struct {
|
|||
///
|
||||
#define EFI_ACPI_6_5_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('B', 'G', 'R', 'T')
|
||||
|
||||
///
|
||||
/// "CCEL" Confidential Compute Event Log Table
|
||||
///
|
||||
#define EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_SIGNATURE SIGNATURE_32('C', 'C', 'E', 'L')
|
||||
|
||||
///
|
||||
/// "CDIT" Component Distance Information Table
|
||||
///
|
||||
|
|
|
|||
|
|
@ -3232,6 +3232,36 @@ typedef struct {
|
|||
|
||||
#define EFI_ACPI_6_6_RHCT_HART_INFO_NODE_STRUCTURE_VERSION 1
|
||||
|
||||
///
|
||||
/// Confidential Computing Type definitions.
|
||||
///
|
||||
#define EFI_ACPI_6_6_CC_TYPE_NONE 0
|
||||
#define EFI_ACPI_6_6_CC_TYPE_SEV 1
|
||||
#define EFI_ACPI_6_6_CC_TYPE_TDX 2
|
||||
#define EFI_ACPI_6_6_CC_TYPE_APTEE 3
|
||||
|
||||
///
|
||||
/// Confidential Computing Event Log ACPI Table (CCEL).
|
||||
///
|
||||
typedef struct {
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
/// Confidential Computing (CC) type.
|
||||
UINT8 Type;
|
||||
/// Confidential Computing (CC) sub type.
|
||||
UINT8 SubType;
|
||||
/// Reserved.
|
||||
UINT16 Reserved;
|
||||
/// Log Area Minimum Length.
|
||||
UINT64 Laml;
|
||||
/// Log Area Start Address.
|
||||
UINT64 Lasa;
|
||||
} EFI_ACPI_6_6_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE;
|
||||
|
||||
///
|
||||
/// CCEL Revision (as defined in ACPI 6.6 spec.)
|
||||
///
|
||||
#define EFI_ACPI_6_6_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_REVISION 0x01
|
||||
|
||||
//
|
||||
// Known table signatures
|
||||
//
|
||||
|
|
@ -3261,6 +3291,11 @@ typedef struct {
|
|||
///
|
||||
#define EFI_ACPI_6_6_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('B', 'G', 'R', 'T')
|
||||
|
||||
///
|
||||
/// "CCEL" Confidential Compute Event Log Table
|
||||
///
|
||||
#define EFI_ACPI_6_6_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_SIGNATURE SIGNATURE_32('C', 'C', 'E', 'L')
|
||||
|
||||
///
|
||||
/// "CDIT" Component Distance Information Table
|
||||
///
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <IndustryStandard/Acpi.h>
|
||||
#include <IndustryStandard/UefiTcgPlatform.h>
|
||||
|
||||
#define EFI_CC_MEASUREMENT_PROTOCOL_GUID \
|
||||
|
|
@ -29,16 +30,18 @@ typedef struct {
|
|||
UINT8 Minor;
|
||||
} EFI_CC_VERSION;
|
||||
|
||||
//
|
||||
// EFI_CC Type/SubType definition
|
||||
//
|
||||
#define EFI_CC_TYPE_NONE 0
|
||||
#define EFI_CC_TYPE_SEV 1
|
||||
#define EFI_CC_TYPE_TDX 2
|
||||
#define EFI_CC_TYPE_APTEE 3
|
||||
/**
|
||||
A structure defining the Confidential Computing (CC) type and subtype.
|
||||
|
||||
The Type and Subtype field values must match the definitions in the ACPI
|
||||
specification version 6.5 or later,
|
||||
e.g. the macros EFI_ACPI_6_5_CC_TYPE_* must be used to populate the
|
||||
Type field.
|
||||
*/
|
||||
typedef struct {
|
||||
/// Confidential Computing (CC) type.
|
||||
UINT8 Type;
|
||||
/// Confidential Computing (CC) sub type.
|
||||
UINT8 SubType;
|
||||
} EFI_CC_TYPE;
|
||||
|
||||
|
|
@ -298,24 +301,3 @@ typedef struct {
|
|||
{0xdd4a4648, 0x2de7, 0x4665, {0x96, 0x4d, 0x21, 0xd9, 0xef, 0x5f, 0xb4, 0x46}}
|
||||
|
||||
extern EFI_GUID gEfiCcFinalEventsTableGuid;
|
||||
|
||||
//
|
||||
// Define the CC Measure EventLog ACPI Table
|
||||
//
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct {
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
EFI_CC_TYPE CcType;
|
||||
UINT16 Rsvd;
|
||||
UINT64 Laml;
|
||||
UINT64 Lasa;
|
||||
} EFI_CC_EVENTLOG_ACPI_TABLE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
//
|
||||
// Define the signature and revision of CC Measurement EventLog ACPI Table
|
||||
//
|
||||
#define EFI_CC_EVENTLOG_ACPI_TABLE_SIGNATURE SIGNATURE_32('C', 'C', 'E', 'L')
|
||||
#define EFI_CC_EVENTLOG_ACPI_TABLE_REVISION 1
|
||||
|
|
|
|||
|
|
@ -108,20 +108,21 @@ VARIABLE_TYPE mVariableType[] = {
|
|||
{ EFI_IMAGE_SECURITY_DATABASE1, &gEfiImageSecurityDatabaseGuid },
|
||||
};
|
||||
|
||||
EFI_CC_EVENTLOG_ACPI_TABLE mTdxEventlogAcpiTemplate = {
|
||||
EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE mTdxEventlogAcpiTemplate = {
|
||||
{
|
||||
EFI_CC_EVENTLOG_ACPI_TABLE_SIGNATURE,
|
||||
EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_SIGNATURE,
|
||||
sizeof (mTdxEventlogAcpiTemplate),
|
||||
EFI_CC_EVENTLOG_ACPI_TABLE_REVISION,
|
||||
EFI_ACPI_6_5_CONFIDENTIAL_COMPUTING_EVENT_LOG_TABLE_REVISION,
|
||||
//
|
||||
// Compiler initializes the remaining bytes to 0
|
||||
// These fields should be filled in production
|
||||
//
|
||||
},
|
||||
{ EFI_CC_TYPE_TDX, 0 }, // CcType
|
||||
0, // rsvd
|
||||
0, // laml
|
||||
0, // lasa
|
||||
EFI_ACPI_6_5_CC_TYPE_TDX, // CcType
|
||||
0, // CC Sub Type
|
||||
0, // Reserved
|
||||
0, // laml
|
||||
0, // lasa
|
||||
};
|
||||
|
||||
EFI_HANDLE mImageHandle;
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ GetMeasureBootProtocols (
|
|||
ZeroMem (&CcProtocolCapability, sizeof (CcProtocolCapability));
|
||||
CcProtocolCapability.Size = sizeof (CcProtocolCapability);
|
||||
Status = CcProtocol->GetCapability (CcProtocol, &CcProtocolCapability);
|
||||
if (EFI_ERROR (Status) || (CcProtocolCapability.CcType.Type == EFI_CC_TYPE_NONE)) {
|
||||
if (EFI_ERROR (Status) || (CcProtocolCapability.CcType.Type == EFI_ACPI_6_5_CC_TYPE_NONE)) {
|
||||
DEBUG ((DEBUG_ERROR, " CcProtocol->GetCapability returns : %x, %r\n", CcProtocolCapability.CcType.Type, Status));
|
||||
CcProtocol = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue