]> git.proxmox.com Git - mirror_edk2.git/commitdiff
QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Remove PP Check
authorMichael Kinney <michael.d.kinney@intel.com>
Tue, 10 Jan 2017 17:02:30 +0000 (09:02 -0800)
committerMichael Kinney <michael.d.kinney@intel.com>
Wed, 11 Jan 2017 19:11:19 +0000 (11:11 -0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=337

The Tpm12CommandLib in the SecurityPkg was updated to check
the returnCode in the response packet in the following
commit:

https://github.com/tianocore/edk2/commit/950a3bc788b5b101729b26aed3ff75fd2a64a570

The Tpm12DeviceLibAtmelI2C uses the Tpm12PhysicalPresence()
function from the Tpm12CommandLib to verify that the I2C device
is responding to TPM command packets.  However, at this point
the TPM device has not been started, and the TPM properly
responds with an error in the returnCode field of the response
packet.  Before the commit above, the check worked, but the
additional error checking in the commit above now returns an
error and an Atmel I2C is returned as not present.

The fix is to remove the call to the Tpm12PhysicalPresence()
API in the Tpm12CommandLib from the Tpm12RequestUseTpm() API.
The Atmel I2C TPM device is detected if a byte can be read
from the slave address assigned to the Atmel I2C device.
When the startup command is sent to the TPM later, the
command and response packet processing will be verified, and
if the I2C device is not an Atmel TPM, it will be detected
at that point.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Lee Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c
QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/Tpm12DeviceLibAtmelI2c.inf

index 4e5aa4137074415c0dba891efcdeeff85964c584..08a005f1fd08bf758306496f27669d6dbc039436 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Basic TIS (TPM Interface Specification) functions for Atmel I2C TPM.\r
 \r
 /** @file\r
   Basic TIS (TPM Interface Specification) functions for Atmel I2C TPM.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2017, 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
@@ -18,7 +18,6 @@
 #include <Library/TimerLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/I2cLib.h>\r
 #include <Library/TimerLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/I2cLib.h>\r
-#include <Library/Tpm12CommandLib.h>\r
 \r
 //\r
 // Atmel I2C TPM slave address\r
 \r
 //\r
 // Atmel I2C TPM slave address\r
@@ -224,15 +223,6 @@ Tpm12RequestUseTpm (
     }\r
   } while (EFI_ERROR (Status));\r
 \r
     }\r
   } while (EFI_ERROR (Status));\r
 \r
-  //\r
-  // Send Physical Presence Command to Atmel I2C TPM\r
-  //\r
-  Status = Tpm12PhysicalPresence (TPM_PHYSICAL_PRESENCE_PRESENT);\r
-  if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Atmel I2C TPM failed to submit physical presence command: %r\n", Status));\r
-    return Status;\r
-  }\r
-\r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
index 5a8734f4c60a91d471e2277d193bdac63cb110bb..1f7e4bee6a2d581ec940b9430b566c8f52fe05be 100644 (file)
@@ -4,7 +4,7 @@
 #  This instance provides basic TPM Interface Specification (TIS) functions\r
 #  or Atmel I2C TPM.\r
 #\r
 #  This instance provides basic TPM Interface Specification (TIS) functions\r
 #  or Atmel I2C TPM.\r
 #\r
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2016 - 2017, 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
@@ -42,4 +42,3 @@
   TimerLib\r
   DebugLib\r
   I2cLib\r
   TimerLib\r
   DebugLib\r
   I2cLib\r
-  Tpm12CommandLib\r