[coreboot-gerrit] Patch set updated for coreboot: c5df755 tpm: Add dummy _DSM to make Bitlocker happy.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu May 28 12:08:33 CEST 2015


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10323

-gerrit

commit c5df755a5d2445f2e52f332d654ee758994c9fff
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Fri May 22 08:01:37 2015 +0200

    tpm: Add dummy _DSM to make Bitlocker happy.
    
    Change-Id: Ieb6f70f5b2863336bd6143b2dfbb1d67c4c26109
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/drivers/pc80/tpm/acpi/tpm.asl | 92 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/src/drivers/pc80/tpm/acpi/tpm.asl b/src/drivers/pc80/tpm/acpi/tpm.asl
index 0562f2a..ece63e2 100644
--- a/src/drivers/pc80/tpm/acpi/tpm.asl
+++ b/src/drivers/pc80/tpm/acpi/tpm.asl
@@ -101,4 +101,96 @@ Device (TPM)
 			Return (RBUF)
 		}
 	}
+
+	/* Dummy _DSM to make Bitlocker work.  */
+	Method (_DSM, 4, Serialized)
+	{
+		/* Physical presence interface.
+		   This is used to submit commands like "Clear TPM" to
+		   be run at next reboot provided that user confirms them.
+		   Spec allows user to cancel all commands and/or
+		   configure BIOS to reject commands. So we pretend that
+		   user did just this: cancelled everything. If user
+		   really wants to clear TPM the only option now is to do it manually
+		   in payload.
+		 */
+		If (LEqual (Arg0, ToUUID ("3dddfaa6-361b-4eb4-a424-8d10089d1653")))
+		{
+			If (LEqual (Arg2, 0))
+			{
+				/* Functions 1-8.  */
+				Return (Buffer (2) { 0xFF, 0x01 })
+			}
+
+			/* Interface version: 1.2  */
+			If (LEqual (Arg2, 1))
+			{
+				Return ("1.2")
+			}
+
+			/* Submit operations: drop on the floor and return success.  */
+			If (LEqual (Arg2, 2))
+			{
+				Return (0x00)
+			}
+
+			/* Pending operation: none.  */
+			If (LEqual (Arg2, 3))
+			{
+				Return (Package (2) { 0, 0 })
+			}
+
+			/* Pre-OS transition method: reboot. */
+			If (LEqual (Arg2, 4))
+			{
+				Return (2)
+			}
+
+			/* Operation response: no operation executed.  */
+			If (LEqual (Arg2, 5))
+			{
+				Return (Package (3) { 0, 0, 0 })
+			}
+
+			/* Set preffered user language: deprecated and must return 3 aka "not implemented".  */
+			If (LEqual (Arg2, 6))
+			{
+				Return (3)
+			}
+
+			/* Submit operations: deny.  */
+			If (LEqual (Arg2, 7))
+			{
+				Return (3)
+			}
+
+			/* All actions are forbidden.  */
+			If (LEqual (Arg2, 8))
+			{
+				Return (1)
+			}
+
+			Return (1)
+		}
+
+		/* Memory clearing on boot: just a dummy.  */
+		If (LEqual (Arg0, ToUUID("376054ed-cc13-4675-901c-4756d7f2d45d")))
+		{
+			If (LEqual (Arg2, 0))
+			{
+				/* Function 1.  */
+				Return (Buffer (1) { 3 })
+			}
+
+			/* Just return success.  */
+			If (LEqual (Arg2, 1))
+			{
+				Return (0)
+			}
+
+			Return (1)
+		}
+
+		Return (Buffer (1) { 0 })
+	}
 }



More information about the coreboot-gerrit mailing list