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