]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Smm / Tcg2Smm.h
index 0b09032d633d50fc86304dad57ebe508711b44ae..fd19e7dc0553b78b3663c3c3e6d4bf1e41d26304 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   The header file for Tcg2 SMM driver.\r
-  \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -35,9 +29,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/DxeServicesLib.h>\r
 #include <Library/TpmMeasurementLib.h>\r
-#include <Library/Tpm2DeviceLib.h>\r
+#include <Library/Tpm2CommandLib.h>\r
 #include <Library/Tcg2PhysicalPresenceLib.h>\r
 #include <Library/IoLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/Tpm2DeviceLib.h>\r
 \r
 #include <IndustryStandard/TpmPtp.h>\r
 \r
@@ -63,6 +60,8 @@ typedef struct {
   PHYSICAL_PRESENCE_NVS  PhysicalPresence;\r
   MEMORY_CLEAR_NVS       MemoryClear;\r
   UINT32                 PPRequestUserConfirm;\r
+  UINT32                 TpmIrqNum;\r
+  BOOLEAN                IsShortFormPkgLength;\r
 } TCG_NVS;\r
 \r
 typedef struct {\r
@@ -94,4 +93,30 @@ typedef struct {
 #define PHYSICAL_PRESENCE_VERSION_TAG                              "$PV"\r
 #define PHYSICAL_PRESENCE_VERSION_SIZE                             4\r
 \r
+//\r
+// PNP _HID for TPM2 device\r
+//\r
+#define TPM_HID_TAG                                                "NNNN0000"\r
+#define TPM_HID_PNP_SIZE                                           8\r
+#define TPM_HID_ACPI_SIZE                                          9\r
+\r
+#define TPM_PRS_RESL                                               "RESL"\r
+#define TPM_PRS_RESS                                               "RESS"\r
+#define TPM_PRS_RES_NAME_SIZE                                      4\r
+//\r
+// Minimum PRS resource template size\r
+//  1 byte    for  BufferOp\r
+//  1 byte    for  PkgLength\r
+//  2 bytes   for  BufferSize\r
+//  12 bytes  for  Memory32Fixed descriptor\r
+//  5 bytes   for  Interrupt descriptor\r
+//  2 bytes   for  END Tag\r
+//\r
+#define TPM_POS_RES_TEMPLATE_MIN_SIZE                              (1 + 1 + 2 + 12 + 5 + 2)\r
+\r
+//\r
+// Max Interrupt buffer size for PRS interrupt resource\r
+// Now support 15 interrupts in maxmum\r
+//\r
+#define MAX_PRS_INT_BUF_SIZE                                       (15*4)\r
 #endif  // __TCG_SMM_H__\r