]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
SecurityPkg: Tcg2: Fix TCG2 PP issues
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Smm / Tcg2Smm.h
CommitLineData
1abfa4ce
JY
1/** @file\r
2 The header file for Tcg2 SMM driver.\r
3 \r
d967d6d9 4Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
1abfa4ce
JY
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 __TCG2_SMM_H__\r
16#define __TCG2_SMM_H__\r
17\r
18#include <PiDxe.h>\r
19#include <IndustryStandard/Acpi.h>\r
20#include <IndustryStandard/Tpm2Acpi.h>\r
21\r
22#include <Guid/MemoryOverwriteControl.h>\r
23#include <Guid/TpmInstance.h>\r
24\r
25#include <Protocol/SmmSwDispatch2.h>\r
26#include <Protocol/AcpiTable.h>\r
27#include <Protocol/SmmVariable.h>\r
28#include <Protocol/Tcg2Protocol.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
37#include <Library/TpmMeasurementLib.h>\r
38#include <Library/Tpm2DeviceLib.h>\r
39#include <Library/Tcg2PhysicalPresenceLib.h>\r
d967d6d9
JY
40#include <Library/IoLib.h>\r
41\r
42#include <IndustryStandard/TpmPtp.h>\r
1abfa4ce
JY
43\r
44#pragma pack(1)\r
45typedef struct {\r
46 UINT8 SoftwareSmi;\r
47 UINT32 Parameter;\r
48 UINT32 Response;\r
49 UINT32 Request;\r
50 UINT32 RequestParameter;\r
51 UINT32 LastRequest;\r
52 UINT32 ReturnCode;\r
53} PHYSICAL_PRESENCE_NVS;\r
54\r
55typedef struct {\r
56 UINT8 SoftwareSmi;\r
57 UINT32 Parameter;\r
58 UINT32 Request;\r
59 UINT32 ReturnCode;\r
60} MEMORY_CLEAR_NVS;\r
61\r
62typedef struct {\r
63 PHYSICAL_PRESENCE_NVS PhysicalPresence;\r
64 MEMORY_CLEAR_NVS MemoryClear;\r
053f31e3 65 UINT32 PPRequestUserConfirm;\r
1abfa4ce
JY
66} TCG_NVS;\r
67\r
68typedef struct {\r
69 UINT8 OpRegionOp;\r
70 UINT32 NameString;\r
71 UINT8 RegionSpace;\r
72 UINT8 DWordPrefix;\r
73 UINT32 RegionOffset;\r
74 UINT8 BytePrefix;\r
75 UINT8 RegionLen;\r
76} AML_OP_REGION_32_8;\r
77#pragma pack()\r
78\r
79//\r
80// The definition for TCG MOR\r
81//\r
82#define ACPI_FUNCTION_DSM_MEMORY_CLEAR_INTERFACE 1\r
83#define ACPI_FUNCTION_PTS_CLEAR_MOR_BIT 2\r
84\r
85//\r
86// The return code for Memory Clear Interface Functions\r
87//\r
88#define MOR_REQUEST_SUCCESS 0\r
89#define MOR_REQUEST_GENERAL_FAILURE 1\r
90\r
cd643013
ZC
91//\r
92// Physical Presence Interface Version supported by Platform\r
93//\r
94#define PHYSICAL_PRESENCE_VERSION_TAG "$PV"\r
95#define PHYSICAL_PRESENCE_VERSION_SIZE 4\r
96\r
1abfa4ce 97#endif // __TCG_SMM_H__\r