mirror of https://review.coreboot.org/STM.git
Sync latest data structure from MLE writer's guide.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
8e4c1267e2
commit
ac2a67c8b9
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
SMX header file
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -56,15 +56,15 @@
|
|||
|
||||
#pragma pack (push, 1)
|
||||
|
||||
#define TXT_MLE_HEADER_GUID \
|
||||
#define TXT_MLE_HEADER_UUID \
|
||||
{ 0x9082AC5A, 0x74A7476F, 0xA2555C0F, 0x42B651CB }
|
||||
|
||||
typedef struct {
|
||||
UINT32 Guid0;
|
||||
UINT32 Guid1;
|
||||
UINT32 Guid2;
|
||||
UINT32 Guid3;
|
||||
} TXT_GUID;
|
||||
UINT32 Uuid0;
|
||||
UINT32 Uuid1;
|
||||
UINT32 Uuid2;
|
||||
UINT32 Uuid3;
|
||||
} TXT_UUID;
|
||||
|
||||
#define TXT_MLE_HEADER_VERSION_1 0x10000
|
||||
#define TXT_MLE_HEADER_VERSION_1_1 0x10001
|
||||
|
@ -76,9 +76,15 @@ typedef struct {
|
|||
#define TXT_MLE_SINIT_CAPABILITY_MONITOR_ADDRESS_RLP_WAKEUP (1u << 1)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_ECX_HAS_PAGE_TABLE (1u << 2)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_STM (1u << 3)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_TPM12_PCR_NO_LEGACY (1u << 4)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_TPM12_PCR_DETAIL_AUTHORITY (1u << 5)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_PLATFORM_TYPE_CLIENT (1u << 6)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_PLATFORM_TYPE_SERVER (1u << 7)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_MAXPHYADDR_SUPPORT (1u << 8)
|
||||
#define TXT_MLE_SINIT_CAPABILITY_TCG2_COMPATIBILE_EVENTLOG (1u << 9)
|
||||
|
||||
typedef struct {
|
||||
TXT_GUID Guid;
|
||||
TXT_UUID Uuid;
|
||||
UINT32 HeaderLen;
|
||||
UINT32 Version;
|
||||
UINT32 EntryPoint;
|
||||
|
@ -134,20 +140,20 @@ typedef struct {
|
|||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_2 0x02
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_3 0x03
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_4 0x04
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_5 0x05
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_6 0x06
|
||||
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_3
|
||||
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_GUID_V03 \
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_UUID_V03 \
|
||||
{ 0x7FC03AAA, 0x18DB46A7, 0x8F69AC2E, 0x5A7F418D }
|
||||
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_GUID_V02 \
|
||||
#define TXT_CHIPSET_ACM_INFORMATION_TABLE_UUID_V02 \
|
||||
{ 0x8024D6CD, 0x2A624733, 0x893AF1D1, 0xBC82113B }
|
||||
|
||||
#define TXT_CHIPSET_ACM_TYPE_BIOS 0
|
||||
#define TXT_CHIPSET_ACM_TYPE_SINIT 1
|
||||
|
||||
typedef struct {
|
||||
TXT_GUID Guid;
|
||||
TXT_UUID Uuid;
|
||||
UINT8 ChipsetACMType;
|
||||
UINT8 Version;
|
||||
UINT16 Length;
|
||||
|
@ -157,10 +163,15 @@ typedef struct {
|
|||
//#if (TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION >= TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_3)
|
||||
UINT32 Capabilities;
|
||||
UINT8 AcmVersion;
|
||||
UINT8 Rsvd[3];
|
||||
//#if (TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION >= TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_6)
|
||||
UINT8 AcmRevision[3];
|
||||
//#endif
|
||||
//#endif
|
||||
//#if (TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION >= TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_4)
|
||||
UINT32 ProcessorIDList;
|
||||
//#endif
|
||||
//#if (TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION >= TXT_CHIPSET_ACM_INFORMATION_TABLE_VERSION_5)
|
||||
UINT32 TPMInfoList;
|
||||
//#endif
|
||||
} TXT_CHIPSET_ACM_INFORMATION_TABLE;
|
||||
|
||||
|
@ -192,11 +203,25 @@ typedef struct {
|
|||
TXT_ACM_PROCESSOR_ID ProcessorID[1];
|
||||
} TXT_PROCESSOR_ID_LIST;
|
||||
|
||||
#define TXT_ACM_TPM_CAPABILITY_MAXIMUM_AGILITY_POLICY 1u
|
||||
#define TXT_ACM_TPM_CAPABILITY_MAXIMUM_PERFORMANCE_POLICY (1u << 1)
|
||||
#define TXT_ACM_TPM_CAPABILITY_DISCRETE_TPM_12_SUPPORT (1u << 2)
|
||||
#define TXT_ACM_TPM_CAPABILITY_DISCRETE_TPM_20_SUPPORT (1u << 3)
|
||||
#define TXT_ACM_TPM_CAPABILITY_FIRMWARE_TPM_20_SUPPORT (1u << 5)
|
||||
#define TXT_ACM_TPM_CAPABILITY_TCG2_COMPLIANT_NV_INDEX (1u << 6)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Capabilities;
|
||||
UINT16 Count;
|
||||
UINT16 AlgorithmID[1];
|
||||
} TXT_ACM_TPM_INFO_LIST;
|
||||
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_1 1
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_2 2
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_3 3
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_4 4 // For optional element
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION TXT_BIOS_TO_OS_DATA_VERSION_3
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_5 5
|
||||
#define TXT_BIOS_TO_OS_DATA_VERSION_6 6
|
||||
|
||||
typedef struct {
|
||||
UINT32 Version;
|
||||
|
@ -206,7 +231,10 @@ typedef struct {
|
|||
UINT64 LcpPdSize;
|
||||
UINT32 NumLogProcs;
|
||||
//#if (TXT_BIOS_TO_OS_DATA_VERSION >= TXT_BIOS_TO_OS_DATA_VERSION_3)
|
||||
UINT64 Flags;
|
||||
UINT32 SinitFlags;
|
||||
//#if (TXT_BIOS_TO_OS_DATA_VERSION >= TXT_BIOS_TO_OS_DATA_VERSION_5)
|
||||
UINT32 MleFlags;
|
||||
//#endif
|
||||
//#if (TXT_BIOS_TO_OS_DATA_VERSION >= TXT_BIOS_TO_OS_DATA_VERSION_4)
|
||||
//TXT_HEAP_EXT_DATA_ELEMENT ExtDataElements[];
|
||||
//#endif
|
||||
|
@ -227,10 +255,10 @@ typedef struct {
|
|||
} TXT_HEAP_END_ELEMENT;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_BIOS_SPEC_VER 1
|
||||
typedef struct { // For TXT BIOS Spec version 1.9
|
||||
UINT16 SpecVerMajor; // 01 (Decimal)
|
||||
UINT16 SpecVerMinor; // 09 (Decimal)
|
||||
UINT16 SpecVerRevision; // 00 (Decimal)
|
||||
typedef struct { // For TXT BIOS Spec version
|
||||
UINT16 SpecVerMajor; // (Decimal)
|
||||
UINT16 SpecVerMinor; // (Decimal)
|
||||
UINT16 SpecVerRevision; // (Decimal)
|
||||
} TXT_HEAP_BIOS_SPEC_VER_ELEMENT;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_BIOSACM 2
|
||||
|
@ -254,7 +282,7 @@ typedef struct {
|
|||
UINT8 GetStmStatusCmd;
|
||||
UINT8 UpdateStmCmd;
|
||||
UINT8 ReservedCmd[20];
|
||||
UINT8 ChangeBiosResourcesCmd;
|
||||
UINT8 HandleBiosResourcesCmd;
|
||||
UINT8 AccessResourcesCmd;
|
||||
UINT8 LoadStmCmd;
|
||||
UINT8 ReservedCmdForDebug[3];
|
||||
|
@ -267,21 +295,111 @@ typedef struct {
|
|||
UINT16 Data3;
|
||||
UINT16 Data4;
|
||||
UINT8 Data5[6];
|
||||
} TXT_UUID;
|
||||
} UUID;
|
||||
typedef struct {
|
||||
TXT_UUID Uuid;
|
||||
UUID Uuid;
|
||||
//UINT8 Data[];
|
||||
} TXT_HEAP_CUSTOM_ELEMENT;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_EVENTLOG_PTR 5
|
||||
|
||||
#define TXT_EVENTLOG_SIGNATURE "TXT Event Container\0"
|
||||
#define TXT_EVENTLOG_CONTAINER_MAJOR_VERSION 1
|
||||
#define TXT_EVENTLOG_CONTAINER_MINOR_VERSION 0
|
||||
#define TXT_EVENTLOG_EVENT_MAJOR_VERSION 1
|
||||
#define TXT_EVENTLOG_EVENT_MINOR_VERSION 0
|
||||
|
||||
typedef struct {
|
||||
UINT32 PcrIndex;
|
||||
UINT32 Type;
|
||||
UINT8 Digest[20];
|
||||
UINT32 DataSize;
|
||||
// UINT8 Data[];
|
||||
} TPM12_PCR_EVENT;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Signature[20];
|
||||
UINT8 Reserved[12];
|
||||
UINT8 ContainerVersionMajor;
|
||||
UINT8 ContainerVersionMinor;
|
||||
UINT8 PcrEventVersionMajor;
|
||||
UINT8 PcrEventVersionMinor;
|
||||
UINT32 Size;
|
||||
UINT32 PcrEventsOffset;
|
||||
UINT32 NextEventOffset;
|
||||
// TPM12_PCR_EVENT PcrEvents[];
|
||||
} TXT_EVENT_LOG_CONTAINER;
|
||||
|
||||
typedef struct {
|
||||
UINT64 EventLogAddress;
|
||||
} TXT_HEAP_EVENTLOG_EXT_ELEMENT;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_MADT 6
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_EVENT_LOG_POINTER2 7
|
||||
|
||||
typedef struct {
|
||||
UINT16 HashAlgID;
|
||||
UINT16 Reserved;
|
||||
UINT64 PhysicalAddress;
|
||||
UINT32 AllocatedEventContainerSize;
|
||||
UINT32 FirstRecordOffset;
|
||||
UINT32 NextRecordOffset;
|
||||
} TXT_HEAP_EVENT_LOG_DESCR;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Count; // Number of EventLogDescr entries
|
||||
//TXT_HEAP_EVENT_LOG_DESCR EventLogDescr[Count]; // Eventlog descriptor structure
|
||||
} TXT_HEAP_EVENT_LOG_POINTER_ELEMENT2;
|
||||
|
||||
typedef struct {
|
||||
UINT32 PCRIndex;
|
||||
UINT32 EventType;
|
||||
//UINT8 Digest[DigestSize];
|
||||
//UINT32 EventDataSize;
|
||||
//UINT8 EventData[EventDataSize];
|
||||
} TCG_PCR_EVENT_EX;
|
||||
|
||||
#define TCG_LOG_DESCRIPTOR_SIGNATURE "FRMT ID EVENT00\0"
|
||||
|
||||
#define TCG_LOG_DESCRIPTOR_REVISION 1
|
||||
|
||||
#define DIGEST_ALG_ID_SHA_1 0x00000001
|
||||
#define DIGEST_ALG_ID_SHA_2_256 0x00000002
|
||||
#define DIGEST_ALG_ID_SHA_2_384 0x00000003
|
||||
#define DIGEST_ALG_ID_SHA_2_512 0x00000004
|
||||
|
||||
typedef struct {
|
||||
UINT8 Signature[0x10];
|
||||
UINT32 Revision;
|
||||
UINT32 DigestAlgID;
|
||||
UINT32 DigestSize;
|
||||
} TCG_LOG_DESCRIPTOR;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_EVENT_LOG_POINTER2_1 8
|
||||
|
||||
typedef struct {
|
||||
UINT64 PhysicalAddress;
|
||||
UINT32 AllocatedEventContainerSize;
|
||||
UINT32 FirstRecordOffset;
|
||||
UINT32 NextRecordOffset;
|
||||
} TXT_HEAP_EVENT_LOG_POINTER_ELEMENT2_1;
|
||||
|
||||
#define TXT_HEAP_EXTDATA_TYPE_MCFG 9
|
||||
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_1 1
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_3 3
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_4 4
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_5 5
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION TXT_OS_TO_SINIT_DATA_VERSION_5
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_6 6
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION_7 7
|
||||
#define TXT_OS_TO_SINIT_DATA_VERSION TXT_OS_TO_SINIT_DATA_VERSION_7
|
||||
|
||||
typedef struct {
|
||||
UINT32 Version;
|
||||
UINT32 Reserved;
|
||||
//#if (TXT_OS_TO_SINIT_DATA_VERSION >= TXT_OS_TO_SINIT_DATA_VERSION_7)
|
||||
UINT32 Flags;
|
||||
//#endif
|
||||
UINT64 MLEPageTableBase;
|
||||
UINT64 MLESize;
|
||||
UINT64 MLEHeaderBase;
|
||||
|
@ -296,22 +414,29 @@ typedef struct {
|
|||
UINT32 Capabilities;
|
||||
//#if (TXT_OS_TO_SINIT_DATA_VERSION >= TXT_OS_TO_SINIT_DATA_VERSION_5)
|
||||
UINT64 RsdpPtr;
|
||||
//#if (TXT_OS_TO_SINIT_DATA_VERSION >= TXT_OS_TO_SINIT_DATA_VERSION_6)
|
||||
//TXT_HEAP_EXT_DATA_ELEMENT ExtDataElements[];
|
||||
//#endif
|
||||
//#endif
|
||||
//#endif
|
||||
//#endif
|
||||
} TXT_OS_TO_SINIT_DATA;
|
||||
|
||||
#define TXT_OS_TO_SINIT_DATA_FLAGS_MAX_AGILE_POLICY 0
|
||||
#define TXT_OS_TO_SINIT_DATA_FLAGS_MAX_PERF_POLICY 1
|
||||
|
||||
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_1 1
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_3 3
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_5 5
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_6 6
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_7 7
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_8 8
|
||||
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION TXT_SINIT_TO_MLE_DATA_VERSION_8
|
||||
#define TXT_SINIT_TO_MLE_DATA_VERSION_9 9
|
||||
|
||||
typedef struct {
|
||||
UINT32 Version;
|
||||
//#if (TXT_SINIT_TO_MLE_DATA_VERSION <= TXT_SINIT_TO_MLE_DATA_VERSION_8)
|
||||
UINT8 BiosAcmID[20];
|
||||
UINT32 EdxSenterFlags;
|
||||
UINT64 MsegValid;
|
||||
|
@ -321,12 +446,14 @@ typedef struct {
|
|||
//#if (TXT_SINIT_TO_MLE_DATA_VERSION >= TXT_SINIT_TO_MLE_DATA_VERSION_3)
|
||||
UINT8 LcpPolicyHash[20];
|
||||
UINT32 PolicyControl;
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if (TXT_SINIT_TO_MLE_DATA_VERSION >= TXT_SINIT_TO_MLE_DATA_VERSION_3)
|
||||
//#if (TXT_SINIT_TO_MLE_DATA_VERSION >= TXT_SINIT_TO_MLE_DATA_VERSION_5)
|
||||
UINT32 RlpWakeupAddr; // Write non-0 will wakeup AP.
|
||||
UINT32 Reserved;
|
||||
//#else
|
||||
// UINT64 Reserved;
|
||||
//#endif
|
||||
UINT32 Reserved;
|
||||
UINT32 NumberOfSinitMdrs;
|
||||
UINT32 SinitMdrTableOffset;
|
||||
UINT32 SinitVtdDmarTableSize;
|
||||
|
@ -335,12 +462,16 @@ typedef struct {
|
|||
UINT32 ProcessorSCRTMStatus;
|
||||
//#endif
|
||||
//#endif
|
||||
//#if (TXT_SINIT_TO_MLE_DATA_VERSION >= TXT_SINIT_TO_MLE_DATA_VERSION_9)
|
||||
//TXT_HEAP_EXT_DATA_ELEMENT ExtDataElements[];
|
||||
//#endif
|
||||
} TXT_SINIT_TO_MLE_DATA;
|
||||
|
||||
#define TXT_SINIT_MDR_TYPE_USABLE_MEMORY 0
|
||||
#define TXT_SINIT_MDR_TYPE_OVERLAYED_SMRAM 1
|
||||
#define TXT_SINIT_MDR_TYPE_NON_OVERLAYED_SMRAM 2
|
||||
#define TXT_SINIT_MDR_TYPE_PCIE 3
|
||||
#define TXT_SINIT_MDR_TYPE_PROTECTED 4
|
||||
|
||||
typedef struct {
|
||||
UINT64 Address;
|
||||
|
@ -387,6 +518,24 @@ typedef union {
|
|||
UINT64 Uint64;
|
||||
} TXT_DID_VID;
|
||||
|
||||
#define TXT_EVTYPE_BASE 0x400
|
||||
#define TXT_EVTYPE_PCRMAPPING (TXT_EVTYPE_BASE + 1)
|
||||
#define TXT_EVTYPE_HASH_START (TXT_EVTYPE_BASE + 2)
|
||||
#define TXT_EVTYPE_COMBINED_HASH (TXT_EVTYPE_BASE + 3)
|
||||
#define TXT_EVTYPE_MLE_HASH (TXT_EVTYPE_BASE + 4)
|
||||
#define TXT_EVTYPE_BIOSAC_REG_DATA (TXT_EVTYPE_BASE + 10)
|
||||
#define TXT_EVTYPE_CPU_SCRTM_STAT (TXT_EVTYPE_BASE + 11)
|
||||
#define TXT_EVTYPE_LCP_CONTROL_HASH (TXT_EVTYPE_BASE + 12)
|
||||
#define TXT_EVTYPE_ELEMENTS_HASH (TXT_EVTYPE_BASE + 13)
|
||||
#define TXT_EVTYPE_STM_HASH (TXT_EVTYPE_BASE + 14)
|
||||
#define TXT_EVTYPE_OSSINITDATA_CAP_HASH (TXT_EVTYPE_BASE + 15)
|
||||
#define TXT_EVTYPE_SINIT_PUBKEY_HASH (TXT_EVTYPE_BASE + 16)
|
||||
#define TXT_EVTYPE_LCP_HASH (TXT_EVTYPE_BASE + 17)
|
||||
#define TXT_EVTYPE_LCP_DETAILS_HASH (TXT_EVTYPE_BASE + 18)
|
||||
#define TXT_EVTYPE_LCP_AUTHORITIES_HASH (TXT_EVTYPE_BASE + 19)
|
||||
#define TXT_EVTYPE_NV_INFO_HASH (TXT_EVTYPE_BASE + 20)
|
||||
#define TXT_EVTYPE_CAP_VALUE (TXT_EVTYPE_BASE + 255)
|
||||
|
||||
#pragma pack (pop)
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue