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