]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Uefi/UefiTcgPlatform.h
Add EFI_NETWORK_INTERFACE_TYPE definition
[mirror_edk2.git] / MdePkg / Include / Uefi / 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
16#define __UEFI_TCG_PLATFOMR_H__\r
17\r
18#include <IndustryStandard/Tpm12.h>\r
1fd83dd2 19\r
a979fca9 20#include <Uefi.h>\r
1fd83dd2 21\r
267669ba
LG
22//\r
23// Standard event types\r
24//\r
25#define EV_POST_CODE ((TCG_EVENTTYPE) 0x00000001)\r
26#define EV_SEPARATOR ((TCG_EVENTTYPE) 0x00000004)\r
27#define EV_S_CRTM_CONTENTS ((TCG_EVENTTYPE) 0x00000007)\r
28#define EV_S_CRTM_VERSION ((TCG_EVENTTYPE) 0x00000008)\r
29\r
30//\r
31// EFI specific event types\r
32//\r
33#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000)\r
34#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1)\r
35#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2)\r
36#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3)\r
37#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4)\r
38#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5)\r
39#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6)\r
40#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7)\r
41#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8)\r
42#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9)\r
43\r
267669ba
LG
44#define EFI_CALLING_EFI_APPLICATION \\r
45 "Calling EFI Application from Boot Option"\r
46#define EFI_RETURNING_FROM_EFI_APPLICATOIN \\r
47 "Returning from EFI Application from Boot Option"\r
48#define EFI_EXIT_BOOT_SERVICES_INVOCATION \\r
49 "Exit Boot Services Invocation"\r
50#define EFI_EXIT_BOOT_SERVICES_FAILED \\r
51 "Exit Boot Services Returned with Failure"\r
52#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \\r
53 "Exit Boot Services Returned with Success"\r
54\r
55//\r
56// Set structure alignment to 1-byte\r
57//\r
a04ad3f0 58#pragma pack (1)\r
267669ba
LG
59\r
60typedef UINT32 TCG_EVENTTYPE;\r
61\r
62#define TCG_DIGEST TPM_DIGEST\r
63#define TCG_PCRINDEX TPM_PCRINDEX\r
64\r
fb5148a0 65///\r
3ed785e9 66/// Event Log Entry Structure Definition\r
fb5148a0 67///\r
267669ba 68typedef struct tdTCG_PCR_EVENT {\r
3ed785e9 69 TCG_PCRINDEX PCRIndex; ///< PCRIndex event extended to\r
70 TCG_EVENTTYPE EventType; ///< TCG EFI event type\r
71 TCG_DIGEST Digest; ///< Value extended into PCRIndex\r
72 UINT32 EventSize; ///< Size of the event data\r
73 UINT8 Event[1]; ///< The event data\r
267669ba
LG
74} TCG_PCR_EVENT;\r
75\r
3ed785e9 76#define TSS_EVENT_DATA_MAX_SIZE 256\r
77\r
fb5148a0 78///\r
79/// TCG_PCR_EVENT_HDR\r
80///\r
267669ba
LG
81typedef struct tdTCG_PCR_EVENT_HDR {\r
82 TCG_PCRINDEX PCRIndex;\r
83 TCG_EVENTTYPE EventType;\r
84 TCG_DIGEST Digest;\r
85 UINT32 EventSize;\r
86} TCG_PCR_EVENT_HDR;\r
87\r
fb5148a0 88///\r
89/// EFI_PLATFORM_FIRMWARE_BLOB\r
90///\r
91/// BlobLength should be of type UINTN but we use UINT64 here\r
92/// because PEI is 32-bit while DXE is 64-bit on x64 platforms\r
93///\r
267669ba
LG
94typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {\r
95 EFI_PHYSICAL_ADDRESS BlobBase;\r
96 UINT64 BlobLength;\r
97} EFI_PLATFORM_FIRMWARE_BLOB;\r
98\r
fb5148a0 99///\r
100/// EFI_IMAGE_LOAD_EVENT\r
101///\r
102/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
103/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
104///\r
267669ba
LG
105typedef struct tdEFI_IMAGE_LOAD_EVENT {\r
106 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;\r
107 UINTN ImageLengthInMemory;\r
108 UINTN ImageLinkTimeAddress;\r
109 UINTN LengthOfDevicePath;\r
110 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];\r
111} EFI_IMAGE_LOAD_EVENT;\r
112\r
fb5148a0 113///\r
114/// EFI_HANDOFF_TABLE_POINTERS\r
115///\r
116/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
117/// the measurement of given configuration tables.\r
118///\r
267669ba 119typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
3ed785e9 120 UINTN NumberOfTables;\r
267669ba
LG
121 EFI_CONFIGURATION_TABLE TableEntry[1];\r
122} EFI_HANDOFF_TABLE_POINTERS;\r
123\r
fb5148a0 124///\r
125/// EFI_VARIABLE_DATA\r
126///\r
127/// This structure serves as the header for measuring variables. The name of the\r
128/// variable (in Unicode format) should immediately follow, then the variable\r
129/// data.\r
130///\r
267669ba
LG
131typedef struct tdEFI_VARIABLE_DATA {\r
132 EFI_GUID VariableName;\r
133 UINTN UnicodeNameLength;\r
134 UINTN VariableDataLength;\r
135 CHAR16 UnicodeName[1];\r
3ed785e9 136 INT8 VariableData[1]; ///< Driver or platform-specific data\r
267669ba
LG
137} EFI_VARIABLE_DATA;\r
138\r
139typedef struct tdEFI_GPT_DATA {\r
140 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;\r
141 UINTN NumberOfPartitions; \r
142 EFI_PARTITION_ENTRY Partitions[1];\r
143} EFI_GPT_DATA;\r
144\r
145//\r
146// Restore original structure alignment\r
147//\r
a04ad3f0 148#pragma pack ()\r
267669ba
LG
149\r
150#endif\r
151\r
152\r