]>
Commit | Line | Data |
---|---|---|
82a1e09c | 1 | /** @file\r |
2 | The header file for TCG SMM driver.\r | |
3 | \r | |
4610b23a | 4 | Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>\r |
82a1e09c | 5 | 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 __TCG_SMM_H__\r | |
16 | #define __TCG_SMM_H__\r | |
17 | \r | |
18 | #include <PiDxe.h>\r | |
19 | #include <IndustryStandard/Acpi.h>\r | |
a332cfd3 | 20 | #include <IndustryStandard/UefiTcgPlatform.h>\r |
21 | \r | |
82a1e09c | 22 | #include <Guid/PhysicalPresenceData.h>\r |
23 | #include <Guid/MemoryOverwriteControl.h>\r | |
c1d93242 | 24 | #include <Guid/TpmInstance.h>\r |
a332cfd3 | 25 | \r |
82a1e09c | 26 | #include <Protocol/SmmSwDispatch2.h>\r |
27 | #include <Protocol/AcpiTable.h>\r | |
28 | #include <Protocol/SmmVariable.h>\r | |
29 | \r | |
30 | #include <Library/BaseLib.h>\r | |
31 | #include <Library/BaseMemoryLib.h>\r | |
32 | #include <Library/DebugLib.h>\r | |
33 | #include <Library/SmmServicesTableLib.h>\r | |
34 | #include <Library/UefiDriverEntryPoint.h>\r | |
35 | #include <Library/UefiBootServicesTableLib.h>\r | |
36 | #include <Library/DxeServicesLib.h>\r | |
a332cfd3 | 37 | #include <Library/TpmMeasurementLib.h>\r |
e84f07b5 | 38 | #include <Library/PcdLib.h>\r |
4610b23a | 39 | #include <Library/TcgPpVendorLib.h>\r |
82a1e09c | 40 | \r |
41 | #pragma pack(1)\r | |
42 | typedef struct {\r | |
43 | UINT8 SoftwareSmi;\r | |
44 | UINT32 Parameter;\r | |
45 | UINT32 Response;\r | |
46 | UINT32 Request;\r | |
47 | UINT32 LastRequest;\r | |
48 | UINT32 ReturnCode;\r | |
49 | } PHYSICAL_PRESENCE_NVS;\r | |
50 | \r | |
51 | typedef struct {\r | |
52 | UINT8 SoftwareSmi;\r | |
53 | UINT32 Parameter;\r | |
54 | UINT32 Request;\r | |
55 | UINT32 ReturnCode;\r | |
56 | } MEMORY_CLEAR_NVS;\r | |
57 | \r | |
58 | typedef struct {\r | |
59 | PHYSICAL_PRESENCE_NVS PhysicalPresence;\r | |
60 | MEMORY_CLEAR_NVS MemoryClear;\r | |
61 | } TCG_NVS;\r | |
62 | \r | |
63 | typedef struct {\r | |
64 | UINT8 OpRegionOp;\r | |
65 | UINT32 NameString;\r | |
66 | UINT8 RegionSpace;\r | |
67 | UINT8 DWordPrefix;\r | |
68 | UINT32 RegionOffset;\r | |
69 | UINT8 BytePrefix;\r | |
70 | UINT8 RegionLen;\r | |
71 | } AML_OP_REGION_32_8;\r | |
72 | #pragma pack()\r | |
73 | \r | |
74 | //\r | |
75 | // The definition for TCG physical presence ACPI function\r | |
76 | //\r | |
77 | #define ACPI_FUNCTION_GET_PHYSICAL_PRESENCE_INTERFACE_VERSION 1\r | |
78 | #define ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS 2\r | |
79 | #define ACPI_FUNCTION_GET_PENDING_REQUEST_BY_OS 3\r | |
80 | #define ACPI_FUNCTION_GET_PLATFORM_ACTION_TO_TRANSITION_TO_BIOS 4\r | |
81 | #define ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS 5\r | |
82 | #define ACPI_FUNCTION_SUBMIT_PREFERRED_USER_LANGUAGE 6\r | |
83 | #define ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2 7\r | |
84 | #define ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST 8\r | |
85 | \r | |
86 | //\r | |
4610b23a | 87 | // The return code for Return TPM Operation Response to OS Environment\r |
82a1e09c | 88 | //\r |
4610b23a JY |
89 | #define PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS 0\r |
90 | #define PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE 1\r | |
82a1e09c | 91 | \r |
92 | //\r | |
93 | // The definition for TCG MOR\r | |
94 | //\r | |
95 | #define ACPI_FUNCTION_DSM_MEMORY_CLEAR_INTERFACE 1\r | |
96 | #define ACPI_FUNCTION_PTS_CLEAR_MOR_BIT 2\r | |
97 | \r | |
98 | //\r | |
99 | // The return code for Memory Clear Interface Functions\r | |
100 | //\r | |
101 | #define MOR_REQUEST_SUCCESS 0\r | |
102 | #define MOR_REQUEST_GENERAL_FAILURE 1\r | |
103 | \r | |
104 | #endif // __TCG_SMM_H__\r |