Skip to content

Commit

Permalink
SecurityPkg: Tcg2Acpi: Remove _DSM Memory Clear and _PTS
Browse files Browse the repository at this point in the history
This patch removes the _DSM Memory Clear and MOR
auto-detect functionality via _PTS, as
_DSM Memory Clear was deprecated in TCG PC Client
Reset Attack Mitigation Spec Version 1.10 revision 17
Family "2.0" and _PTS is deemed security deficient.

Signed-off-by: Oliver Smith-Denny <[email protected]>
  • Loading branch information
johnstra authored and mergify[bot] committed Sep 4, 2024
1 parent a4245b2 commit 1240a72
Showing 1 changed file with 4 additions and 61 deletions.
65 changes: 4 additions & 61 deletions SecurityPkg/Tcg/Tcg2Acpi/Tpm.asl
Original file line number Diff line number Diff line change
Expand Up @@ -241,26 +241,10 @@ DefinitionBlock (
Method (PTS, 1, Serialized)
{
//
// Detect Sx state for MOR, only S4, S5 need to handle
// _PTS is deprecated for being security deficient
// this implementation simply returns to maintain
// compatibility with older OSes using it.
//
If (LAnd (LLess (Arg0, 6), LGreater (Arg0, 3)))
{
//
// Bit4 -- DisableAutoDetect. 0 -- Firmware MAY autodetect.
//
If (LNot (And (MORD, 0x10)))
{
//
// Trigger the SMI through ACPI _PTS method.
//
Store (0x02, MCIP)

//
// Trigger the SMI interrupt
//
Store (MCIN, IOPN)
}
}
Return (0)
}

Expand Down Expand Up @@ -446,43 +430,6 @@ DefinitionBlock (
Return (1)
}

Method (TMCI, 2, Serialized, 0, IntObj, {UnknownObj, UnknownObj}) // IntObj, PkgObj
{
//
// Switch by function index
//
Switch (ToInteger (Arg0))
{
Case (0)
{
//
// Standard query, supports function 1-1
//
Return (Buffer () {0x03})
}
Case (1)
{
//
// Save the Operation Value of the Request to MORD (reserved memory)
//
Store (DerefOf (Index (Arg1, 0x00)), MORD)

//
// Trigger the SMI through ACPI _DSM method.
//
Store (0x01, MCIP)

//
// Trigger the SMI interrupt
//
Store (MCIN, IOPN)
Return (MRET)
}
Default {BreakPoint}
}
Return (1)
}

Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})
{

Expand All @@ -503,12 +450,8 @@ DefinitionBlock (
}

//
// TCG Memory Clear Interface
// _DSM Memory Clear is deprecated, so not called
//
If(LEqual(Arg0, ToUUID ("376054ed-cc13-4675-901c-4756d7f2d45d")))
{
Return (TMCI (Arg2, Arg3))
}

Return (Buffer () {0})
}
Expand Down

0 comments on commit 1240a72

Please sign in to comment.