]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/TcgSmm/TcgSmm.h
1.Measure ACPI table data comes from flash event type EV_POST_CODE ACPI DATA to PCR[0]
[mirror_edk2.git] / SecurityPkg / Tcg / TcgSmm / TcgSmm.h
CommitLineData
82a1e09c 1/** @file\r
2 The header file for TCG SMM driver.\r
3 \r
4Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT 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
a332cfd3 24\r
82a1e09c 25#include <Protocol/SmmSwDispatch2.h>\r
26#include <Protocol/AcpiTable.h>\r
27#include <Protocol/SmmVariable.h>\r
28\r
29#include <Library/BaseLib.h>\r
30#include <Library/BaseMemoryLib.h>\r
31#include <Library/DebugLib.h>\r
32#include <Library/SmmServicesTableLib.h>\r
33#include <Library/UefiDriverEntryPoint.h>\r
34#include <Library/UefiBootServicesTableLib.h>\r
35#include <Library/DxeServicesLib.h>\r
a332cfd3 36#include <Library/TpmMeasurementLib.h>\r
82a1e09c 37\r
38#pragma pack(1)\r
39typedef struct {\r
40 UINT8 SoftwareSmi;\r
41 UINT32 Parameter;\r
42 UINT32 Response;\r
43 UINT32 Request;\r
44 UINT32 LastRequest;\r
45 UINT32 ReturnCode;\r
46} PHYSICAL_PRESENCE_NVS;\r
47\r
48typedef struct {\r
49 UINT8 SoftwareSmi;\r
50 UINT32 Parameter;\r
51 UINT32 Request;\r
52 UINT32 ReturnCode;\r
53} MEMORY_CLEAR_NVS;\r
54\r
55typedef struct {\r
56 PHYSICAL_PRESENCE_NVS PhysicalPresence;\r
57 MEMORY_CLEAR_NVS MemoryClear;\r
58} TCG_NVS;\r
59\r
60typedef struct {\r
61 UINT8 OpRegionOp;\r
62 UINT32 NameString;\r
63 UINT8 RegionSpace;\r
64 UINT8 DWordPrefix;\r
65 UINT32 RegionOffset;\r
66 UINT8 BytePrefix;\r
67 UINT8 RegionLen;\r
68} AML_OP_REGION_32_8;\r
69#pragma pack()\r
70\r
71//\r
72// The definition for TCG physical presence ACPI function\r
73//\r
74#define ACPI_FUNCTION_GET_PHYSICAL_PRESENCE_INTERFACE_VERSION 1\r
75#define ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS 2\r
76#define ACPI_FUNCTION_GET_PENDING_REQUEST_BY_OS 3\r
77#define ACPI_FUNCTION_GET_PLATFORM_ACTION_TO_TRANSITION_TO_BIOS 4\r
78#define ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS 5\r
79#define ACPI_FUNCTION_SUBMIT_PREFERRED_USER_LANGUAGE 6\r
80#define ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2 7\r
81#define ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST 8\r
82\r
83//\r
84// The return code for Get User Confirmation Status for Operation\r
85//\r
86#define PP_REQUEST_NOT_IMPLEMENTED 0\r
87#define PP_REQUEST_BIOS_ONLY 1\r
88#define PP_REQUEST_BLOCKED 2\r
89#define PP_REQUEST_ALLOWED_AND_PPUSER_REQUIRED 3\r
90#define PP_REQUEST_ALLOWED_AND_PPUSER_NOT_REQUIRED 4\r
91\r
92//\r
93// The return code for Sumbit TPM Request to Pre-OS Environment\r
94// and Sumbit TPM Request to Pre-OS Environment 2\r
95//\r
96#define PP_SUBMIT_REQUEST_SUCCESS 0\r
97#define PP_SUBMIT_REQUEST_NOT_IMPLEMENTED 1\r
98#define PP_SUBMIT_REQUEST_GENERAL_FAILURE 2\r
99#define PP_SUBMIT_REQUEST_BLOCKED_BY_BIOS_SETTINGS 3\r
100\r
101\r
102//\r
103// The definition for TCG MOR\r
104//\r
105#define ACPI_FUNCTION_DSM_MEMORY_CLEAR_INTERFACE 1\r
106#define ACPI_FUNCTION_PTS_CLEAR_MOR_BIT 2\r
107\r
108//\r
109// The return code for Memory Clear Interface Functions\r
110//\r
111#define MOR_REQUEST_SUCCESS 0\r
112#define MOR_REQUEST_GENERAL_FAILURE 1\r
113\r
114#endif // __TCG_SMM_H__\r