]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Tcg: New field for User Confirmation Status
authorZhang, Chao B <chao.b.zhang@intel.com>
Mon, 26 Sep 2016 02:31:15 +0000 (10:31 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Tue, 27 Sep 2016 01:01:06 +0000 (09:01 +0800)
Add a new field in TcgNVS for PP operation user confirmation status,
instead of previous logic overriding Request. Previous logic causes
Get Pending TPM Operation Requested sub function return wrong value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
SecurityPkg/Tcg/TcgSmm/TcgSmm.c
SecurityPkg/Tcg/TcgSmm/TcgSmm.h
SecurityPkg/Tcg/TcgSmm/Tpm.asl

index 19d9b489fe522e17bc537469372acf52b9f9ae9c..f3b76418a2e60c4efff10e8ec40276ee7dc169b8 100644 (file)
@@ -135,8 +135,8 @@ PhysicalPresenceCallback (
                                              mTcgNvs->PhysicalPresence.RequestParameter\r
                                              );\r
   } else if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST) {\r
                                              mTcgNvs->PhysicalPresence.RequestParameter\r
                                              );\r
   } else if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST) {\r
-    mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (mTcgNvs->PhysicalPresence.Request);\r
-  } \r
+    mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (mTcgNvs->PPRequestUserConfirm);\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
index fa77c9a89cb8a8f839a840970a94cbe7f96d7d6c..0b09032d633d50fc86304dad57ebe508711b44ae 100644 (file)
@@ -62,6 +62,7 @@ typedef struct {
 typedef struct {\r
   PHYSICAL_PRESENCE_NVS  PhysicalPresence;\r
   MEMORY_CLEAR_NVS       MemoryClear;\r
 typedef struct {\r
   PHYSICAL_PRESENCE_NVS  PhysicalPresence;\r
   MEMORY_CLEAR_NVS       MemoryClear;\r
+  UINT32                 PPRequestUserConfirm;\r
 } TCG_NVS;\r
 \r
 typedef struct {\r
 } TCG_NVS;\r
 \r
 typedef struct {\r
index 9ff74f76e3150d3152d62a1f109b6a76076691b0..84143cfce98ed78e2108ebf8c44f27cd656f5b36 100644 (file)
@@ -79,7 +79,8 @@ DefinitionBlock (
         MCIN,   8,  //   Software SMI for Memory Clear Interface\r
         MCIP,   32, //   Used for save the Mor paramter\r
         MORD,   32, //   Memory Overwrite Request Data\r
         MCIN,   8,  //   Software SMI for Memory Clear Interface\r
         MCIP,   32, //   Used for save the Mor paramter\r
         MORD,   32, //   Memory Overwrite Request Data\r
-        MRET,   32  //   Memory Overwrite function return code\r
+        MRET,   32, //   Memory Overwrite function return code\r
+        UCRQ,   32  //   Phyical Presence request operation to Get User Confirmation Status \r
       }\r
 \r
       Method (PTS, 1, Serialized)\r
       }\r
 \r
       Method (PTS, 1, Serialized)\r
@@ -274,7 +275,7 @@ DefinitionBlock (
             // e) Get User Confirmation Status for Operation\r
             //\r
             Store (8, PPIP)\r
             // e) Get User Confirmation Status for Operation\r
             //\r
             Store (8, PPIP)\r
-            Store (DerefOf (Index (Arg2, 0x00)), PPRQ)\r
+            Store (DerefOf (Index (Arg2, 0x00)), UCRQ)\r
                   \r
             //\r
             // Triggle the SMI interrupt\r
                   \r
             //\r
             // Triggle the SMI interrupt\r
index 96fb456ccd9bd1c3c6dcb0e4f53bbaa1f5b614ce..589bab694b3ad4affbb6aa0bbf322d21653f910e 100644 (file)
@@ -8,7 +8,7 @@
 \r
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
 \r
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 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
 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
@@ -152,7 +152,7 @@ PhysicalPresenceCallback (
 \r
     RequestConfirmed = FALSE;\r
 \r
 \r
     RequestConfirmed = FALSE;\r
 \r
-    switch (mTcgNvs->PhysicalPresence.Request) {\r
+    switch (mTcgNvs->PPRequestUserConfirm) {\r
       case PHYSICAL_PRESENCE_ENABLE:\r
       case PHYSICAL_PRESENCE_DISABLE:\r
       case PHYSICAL_PRESENCE_ACTIVATE:\r
       case PHYSICAL_PRESENCE_ENABLE:\r
       case PHYSICAL_PRESENCE_DISABLE:\r
       case PHYSICAL_PRESENCE_ACTIVATE:\r
index d8eb82fac7657912bbc805864e6c21858d1bee29..21e4ad96d2bd7220a0a13fbc983b6739d10991a1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file for TCG SMM driver.\r
   \r
 /** @file\r
   The header file for TCG SMM driver.\r
   \r
-Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 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
 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
@@ -58,6 +58,7 @@ typedef struct {
 typedef struct {\r
   PHYSICAL_PRESENCE_NVS  PhysicalPresence;\r
   MEMORY_CLEAR_NVS       MemoryClear;\r
 typedef struct {\r
   PHYSICAL_PRESENCE_NVS  PhysicalPresence;\r
   MEMORY_CLEAR_NVS       MemoryClear;\r
+  UINT32                 PPRequestUserConfirm;\r
 } TCG_NVS;\r
 \r
 typedef struct {\r
 } TCG_NVS;\r
 \r
 typedef struct {\r
index 087ff9f7929c87c0797dc05135f035b113d2c33a..b5449d98b4c4ec7acdf1faa64e54fa79cd440af6 100644 (file)
@@ -2,7 +2,7 @@
   The TPM definition block in ACPI table for physical presence  \r
   and MemoryClear.\r
 \r
   The TPM definition block in ACPI table for physical presence  \r
   and MemoryClear.\r
 \r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 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
 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
@@ -78,7 +78,8 @@ DefinitionBlock (
         MCIN,   8,  //   Software SMI for Memory Clear Interface\r
         MCIP,   32, //   Used for save the Mor paramter\r
         MORD,   32, //   Memory Overwrite Request Data\r
         MCIN,   8,  //   Software SMI for Memory Clear Interface\r
         MCIP,   32, //   Used for save the Mor paramter\r
         MORD,   32, //   Memory Overwrite Request Data\r
-        MRET,   32  //   Memory Overwrite function return code\r
+        MRET,   32, //   Memory Overwrite function return code\r
+        UCRQ,   32  //   Phyical Presence request operation to Get User Confirmation Status \r
       }\r
 \r
       Method (PTS, 1, Serialized)\r
       }\r
 \r
       Method (PTS, 1, Serialized)\r
@@ -269,7 +270,7 @@ DefinitionBlock (
             // e) Get User Confirmation Status for Operation\r
             //\r
             Store (8, PPIP)\r
             // e) Get User Confirmation Status for Operation\r
             //\r
             Store (8, PPIP)\r
-            Store (DerefOf (Index (Arg2, 0x00)), PPRQ)\r
+            Store (DerefOf (Index (Arg2, 0x00)), UCRQ)\r
                   \r
             //\r
             // Triggle the SMI interrupt\r
                   \r
             //\r
             // Triggle the SMI interrupt\r