]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / UefiTcgPlatform.h
CommitLineData
c311f86b 1/** @file\r
267669ba
LG
2 TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final\r
3\r
3ed785e9 4 Copyright (c) 2006 - 2008, Intel Corporation\r
267669ba
LG
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __UEFI_TCG_PLATFORM_H__\r
22a25d24 16#define __UEFI_TCG_PLATFORM_H__\r
267669ba
LG
17\r
18#include <IndustryStandard/Tpm12.h>\r
a979fca9 19#include <Uefi.h>\r
1fd83dd2 20\r
267669ba
LG
21//\r
22// Standard event types\r
23//\r
24#define EV_POST_CODE ((TCG_EVENTTYPE) 0x00000001)\r
25#define EV_SEPARATOR ((TCG_EVENTTYPE) 0x00000004)\r
26#define EV_S_CRTM_CONTENTS ((TCG_EVENTTYPE) 0x00000007)\r
27#define EV_S_CRTM_VERSION ((TCG_EVENTTYPE) 0x00000008)\r
28\r
29//\r
30// EFI specific event types\r
31//\r
32#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000)\r
33#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1)\r
34#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2)\r
35#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3)\r
36#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4)\r
37#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5)\r
38#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6)\r
39#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7)\r
40#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8)\r
41#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9)\r
42\r
267669ba
LG
43#define EFI_CALLING_EFI_APPLICATION \\r
44 "Calling EFI Application from Boot Option"\r
45#define EFI_RETURNING_FROM_EFI_APPLICATOIN \\r
46 "Returning from EFI Application from Boot Option"\r
47#define EFI_EXIT_BOOT_SERVICES_INVOCATION \\r
48 "Exit Boot Services Invocation"\r
49#define EFI_EXIT_BOOT_SERVICES_FAILED \\r
50 "Exit Boot Services Returned with Failure"\r
51#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \\r
52 "Exit Boot Services Returned with Success"\r
53\r
54//\r
55// Set structure alignment to 1-byte\r
56//\r
a04ad3f0 57#pragma pack (1)\r
267669ba
LG
58\r
59typedef UINT32 TCG_EVENTTYPE;\r
992f22b9
LG
60typedef TPM_PCRINDEX TCG_PCRINDEX;\r
61typedef TPM_DIGEST TCG_DIGEST;\r
fb5148a0 62///\r
3ed785e9 63/// Event Log Entry Structure Definition\r
fb5148a0 64///\r
267669ba 65typedef struct tdTCG_PCR_EVENT {\r
3ed785e9 66 TCG_PCRINDEX PCRIndex; ///< PCRIndex event extended to\r
67 TCG_EVENTTYPE EventType; ///< TCG EFI event type\r
68 TCG_DIGEST Digest; ///< Value extended into PCRIndex\r
69 UINT32 EventSize; ///< Size of the event data\r
70 UINT8 Event[1]; ///< The event data\r
267669ba
LG
71} TCG_PCR_EVENT;\r
72\r
3ed785e9 73#define TSS_EVENT_DATA_MAX_SIZE 256\r
74\r
fb5148a0 75///\r
76/// TCG_PCR_EVENT_HDR\r
77///\r
267669ba
LG
78typedef struct tdTCG_PCR_EVENT_HDR {\r
79 TCG_PCRINDEX PCRIndex;\r
80 TCG_EVENTTYPE EventType;\r
81 TCG_DIGEST Digest;\r
82 UINT32 EventSize;\r
83} TCG_PCR_EVENT_HDR;\r
84\r
fb5148a0 85///\r
86/// EFI_PLATFORM_FIRMWARE_BLOB\r
87///\r
88/// BlobLength should be of type UINTN but we use UINT64 here\r
89/// because PEI is 32-bit while DXE is 64-bit on x64 platforms\r
90///\r
267669ba
LG
91typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {\r
92 EFI_PHYSICAL_ADDRESS BlobBase;\r
93 UINT64 BlobLength;\r
94} EFI_PLATFORM_FIRMWARE_BLOB;\r
95\r
fb5148a0 96///\r
97/// EFI_IMAGE_LOAD_EVENT\r
98///\r
99/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
100/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
101///\r
267669ba
LG
102typedef struct tdEFI_IMAGE_LOAD_EVENT {\r
103 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;\r
104 UINTN ImageLengthInMemory;\r
105 UINTN ImageLinkTimeAddress;\r
106 UINTN LengthOfDevicePath;\r
107 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];\r
108} EFI_IMAGE_LOAD_EVENT;\r
109\r
fb5148a0 110///\r
111/// EFI_HANDOFF_TABLE_POINTERS\r
112///\r
113/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
114/// the measurement of given configuration tables.\r
115///\r
267669ba 116typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
3ed785e9 117 UINTN NumberOfTables;\r
267669ba
LG
118 EFI_CONFIGURATION_TABLE TableEntry[1];\r
119} EFI_HANDOFF_TABLE_POINTERS;\r
120\r
fb5148a0 121///\r
122/// EFI_VARIABLE_DATA\r
123///\r
124/// This structure serves as the header for measuring variables. The name of the\r
125/// variable (in Unicode format) should immediately follow, then the variable\r
126/// data.\r
127///\r
267669ba
LG
128typedef struct tdEFI_VARIABLE_DATA {\r
129 EFI_GUID VariableName;\r
130 UINTN UnicodeNameLength;\r
131 UINTN VariableDataLength;\r
132 CHAR16 UnicodeName[1];\r
3ed785e9 133 INT8 VariableData[1]; ///< Driver or platform-specific data\r
267669ba
LG
134} EFI_VARIABLE_DATA;\r
135\r
136typedef struct tdEFI_GPT_DATA {\r
137 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;\r
138 UINTN NumberOfPartitions; \r
139 EFI_PARTITION_ENTRY Partitions[1];\r
140} EFI_GPT_DATA;\r
141\r
142//\r
143// Restore original structure alignment\r
144//\r
a04ad3f0 145#pragma pack ()\r
267669ba
LG
146\r
147#endif\r
148\r
149\r