summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/pc80/tpm/acpi/tpm.asl92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/drivers/pc80/tpm/acpi/tpm.asl b/src/drivers/pc80/tpm/acpi/tpm.asl
index 0562f2a935..ece63e25e3 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 })
+ }
}