tpm: Add dummy _DSM to make Bitlocker happy.
Change-Id: Ieb6f70f5b2863336bd6143b2dfbb1d67c4c26109 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/10323 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
36f8d27ea9
commit
1aeea7fbdf
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue