]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/TcgSmm/TcgSmm.c
Fix the return status when physical presence variable and MemoryOverwriteRequestContr...
[mirror_edk2.git] / SecurityPkg / Tcg / TcgSmm / TcgSmm.c
index 045c1846fc8446b10004100000bd3e79547c99b8..6080eff3b7b880346e0a2b37b0a0add1a4f5a348 100644 (file)
@@ -8,7 +8,7 @@
 \r
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
-Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2014, 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
@@ -68,6 +68,8 @@ PhysicalPresenceCallback (
                            &PpData\r
                            );\r
   if (EFI_ERROR (Status)) {\r
+    mTcgNvs->PhysicalPresence.ReturnCode = PP_SUBMIT_REQUEST_GENERAL_FAILURE;\r
+    DEBUG ((EFI_D_ERROR, "[TPM] Get PP variable failure! Status = %r\n", Status));\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -116,6 +118,7 @@ PhysicalPresenceCallback (
                              );\r
     if (EFI_ERROR (Status)) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = PP_SUBMIT_REQUEST_GENERAL_FAILURE;\r
+      DEBUG ((EFI_D_ERROR, "[TPM] Get PP flags failure! Status = %r\n", Status));\r
       return EFI_SUCCESS;\r
     }\r
 \r
@@ -226,6 +229,8 @@ MemoryClearCallback (
                              &MorControl\r
                              );\r
     if (EFI_ERROR (Status)) {\r
+      mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;\r
+      DEBUG ((EFI_D_ERROR, "[TPM] Get MOR variable failure! Status = %r\n", Status));\r
       return EFI_SUCCESS;\r
     }\r
 \r
@@ -245,6 +250,7 @@ MemoryClearCallback (
                            );\r
   if (EFI_ERROR (Status)) { \r
     mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;\r
+    DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));\r
   }\r
 \r
   return EFI_SUCCESS;\r