/** @file\r
Define the variable data structures used for TCG physical presence.\r
The TPM request from firmware or OS is saved to variable. And it is\r
- cleared after it is processed in the next boot cycle. The TPM response \r
+ cleared after it is processed in the next boot cycle. The TPM response\r
is saved to variable.\r
\r
-Copyright (c) 2006 - 2011, 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
+Copyright (c) 2006 - 2018, 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
+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
\r
**/\r
UINT8 PPRequest; ///< Physical Presence request command.\r
UINT8 LastPPRequest;\r
UINT32 PPResponse;\r
- UINT8 Flags;\r
} EFI_PHYSICAL_PRESENCE;\r
\r
//\r
-// The definition bit of the flags\r
+// The definition of physical presence operation actions\r
//\r
-#define FLAG_NO_PPI_PROVISION BIT0\r
-#define FLAG_NO_PPI_CLEAR BIT1\r
-#define FLAG_NO_PPI_MAINTENANCE BIT2\r
-#define FLAG_RESET_TRACK BIT3\r
+#define PHYSICAL_PRESENCE_NO_ACTION 0\r
+#define PHYSICAL_PRESENCE_ENABLE 1\r
+#define PHYSICAL_PRESENCE_DISABLE 2\r
+#define PHYSICAL_PRESENCE_ACTIVATE 3\r
+#define PHYSICAL_PRESENCE_DEACTIVATE 4\r
+#define PHYSICAL_PRESENCE_CLEAR 5\r
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6\r
+#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7\r
+#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8\r
+#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9\r
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10\r
+#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11\r
+#define PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12\r
+#define PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13\r
+#define PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19\r
+#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20\r
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21\r
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22\r
\r
-#define H2NS(x) ((((x) << 8) | ((x) >> 8)) & 0xffff)\r
-#define H2NL(x) (H2NS ((x) >> 16) | (H2NS ((x) & 0xffff) << 16))\r
+//\r
+// This variable is used to save TPM Management Flags and corresponding operations.\r
+// It should be protected from malicious software (e.g. Set it as read-only variable).\r
+//\r
+#define PHYSICAL_PRESENCE_FLAGS_VARIABLE L"PhysicalPresenceFlags"\r
+typedef struct {\r
+ UINT8 PPFlags;\r
+} EFI_PHYSICAL_PRESENCE_FLAGS;\r
\r
//\r
-// The definition of physical presence operation actions\r
+// The definition bit of the TPM Management Flags\r
//\r
-#define NO_ACTION 0\r
-#define ENABLE 1\r
-#define DISABLE 2\r
-#define ACTIVATE 3\r
-#define DEACTIVATE 4 \r
-#define CLEAR 5\r
-#define ENABLE_ACTIVATE 6\r
-#define DEACTIVATE_DISABLE 7\r
-#define SET_OWNER_INSTALL_TRUE 8\r
-#define SET_OWNER_INSTALL_FALSE 9\r
-#define ENABLE_ACTIVATE_OWNER_TRUE 10\r
-#define DEACTIVATE_DISABLE_OWNER_FALSE 11\r
-#define DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12\r
-#define SET_OPERATOR_AUTH 13\r
-#define CLEAR_ENABLE_ACTIVATE 14\r
-#define SET_NO_PPI_PROVISION_FALSE 15\r
-#define SET_NO_PPI_PROVISION_TRUE 16\r
-#define SET_NO_PPI_CLEAR_FALSE 17\r
-#define SET_NO_PPI_CLEAR_TRUE 18\r
-#define SET_NO_PPI_MAINTENANCE_FALSE 19\r
-#define SET_NO_PPI_MAINTENANCE_TRUE 20\r
-#define ENABLE_ACTIVATE_CLEAR 21\r
-#define ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22\r
+#define FLAG_NO_PPI_PROVISION BIT0\r
+#define FLAG_NO_PPI_CLEAR BIT1\r
+#define FLAG_NO_PPI_MAINTENANCE BIT2\r
+#define FLAG_RESET_TRACK BIT3\r
\r
extern EFI_GUID gEfiPhysicalPresenceGuid;\r
\r