X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FTcg%2FTcgSmm%2FTpm.asl;h=2114283b45105364032bf4d72078cb6d40af3c26;hp=47a68ca61a2f6867fec51441bb874f5873878564;hb=60ee3bd8dbe70189cab18af733c42187c9b317c7;hpb=87200170b3b4c1886b77271e8ec422624eb1aca6 diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.asl index 47a68ca61a..2114283b45 100644 --- a/SecurityPkg/Tcg/TcgSmm/Tpm.asl +++ b/SecurityPkg/Tcg/TcgSmm/Tpm.asl @@ -1,14 +1,14 @@ /** @file - The TPM definition block in ACPI table for physical presence + The TPM definition block in ACPI table for physical presence and MemoryClear. -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,8 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. DefinitionBlock ( "Tpm.aml", "SSDT", - 1, - "Intel_", + 2, + "INTEL ", "TcgTable", 0x1000 ) @@ -41,7 +41,7 @@ DefinitionBlock ( // Return the resource consumed by TPM device // Name (_CRS, ResourceTemplate () { - Memory32Fixed (ReadOnly, 0xfed40000, 0x5000) + Memory32Fixed (ReadWrite, 0xfed40000, 0x5000) }) // @@ -49,7 +49,7 @@ DefinitionBlock ( // OperationRegion (SMIP, SystemIO, 0xB2, 1) Field (SMIP, ByteAcc, NoLock, Preserve) - { + { IOB2, 8 } @@ -64,9 +64,9 @@ DefinitionBlock ( // // Operational region for TPM support, TPM Physical Presence and TPM Memory Clear - // Region Offset to be fixed at runtime + // Region Offset 0xFFFF0000 and Length 0xF0 will be fixed in C code. // - OperationRegion (TNVS, SystemMemory, 0xFFFF0000, 0x1E) + OperationRegion (TNVS, SystemMemory, 0xFFFF0000, 0xF0) Field (TNVS, AnyAcc, NoLock, Preserve) { PPIN, 8, // Software SMI for Physical Presence Interface @@ -77,34 +77,36 @@ DefinitionBlock ( FRET, 32, // Physical Presence function return code MCIN, 8, // Software SMI for Memory Clear Interface MCIP, 32, // Used for save the Mor paramter - MORD, 32 // Memory Overwrite Request Data + MORD, 32, // Memory Overwrite Request Data + MRET, 32, // Memory Overwrite function return code + UCRQ, 32 // Phyical Presence request operation to Get User Confirmation Status } Method (PTS, 1, Serialized) - { + { // // Detect Sx state for MOR, only S4, S5 need to handle // If (LAnd (LLess (Arg0, 6), LGreater (Arg0, 3))) - { + { // // Bit4 -- DisableAutoDetect. 0 -- Firmware MAY autodetect. // If (LNot (And (MORD, 0x10))) { // - // Triggle the SMI through ACPI _PTS method. + // Trigger the SMI through ACPI _PTS method. // Store (0x02, MCIP) - + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // Store (MCIN, IOB2) } } Return (0) - } + } Method (_STA, 0) { @@ -154,12 +156,12 @@ DefinitionBlock ( } Name(TPM2, Package (0x02){ - Zero, + Zero, Zero }) Name(TPM3, Package (0x03){ - Zero, + Zero, Zero, Zero }) @@ -168,7 +170,7 @@ DefinitionBlock ( // TCG Physical Presence Interface // Method (TPPI, 3, Serialized, 0, {BuffObj, PkgObj, IntObj, StrObj}, {UnknownObj, UnknownObj, UnknownObj}) // IntObj, IntObj, PkgObj - { + { // // Switch by function index // @@ -193,12 +195,12 @@ DefinitionBlock ( // // b) Submit TPM Operation Request to Pre-OS Environment // - + Store (DerefOf (Index (Arg2, 0x00)), PPRQ) Store (0x02, PPIP) - + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // Store (PPIN, IOB2) Return (FRET) @@ -210,7 +212,7 @@ DefinitionBlock ( // // c) Get Pending TPM Operation Requested By the OS // - + Store (PPRQ, Index (TPM2, 0x01)) Return (TPM2) } @@ -227,12 +229,12 @@ DefinitionBlock ( // e) Return TPM Operation Response to OS Environment // Store (0x05, PPIP) - + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // Store (PPIN, IOB2) - + Store (LPPR, Index (TPM3, 0x01)) Store (PPRP, Index (TPM3, 0x02)) @@ -255,11 +257,11 @@ DefinitionBlock ( // Store (7, PPIP) Store (DerefOf (Index (Arg2, 0x00)), PPRQ) - + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOB2) Return (FRET) } Case (8) @@ -268,13 +270,13 @@ DefinitionBlock ( // e) Get User Confirmation Status for Operation // Store (8, PPIP) - Store (DerefOf (Index (Arg2, 0x00)), PPRQ) - + Store (DerefOf (Index (Arg2, 0x00)), UCRQ) + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // Store (PPIN, IOB2) - + Return (FRET) } @@ -303,21 +305,21 @@ DefinitionBlock ( // Save the Operation Value of the Request to MORD (reserved memory) // Store (DerefOf (Index (Arg2, 0x00)), MORD) - + // - // Triggle the SMI through ACPI _DSM method. + // Trigger the SMI through ACPI _DSM method. // Store (0x01, MCIP) - + // - // Triggle the SMI interrupt + // Trigger the SMI interrupt // Store (MCIN, IOB2) - Return (0) + Return (MRET) } Default {BreakPoint} } - Return (1) + Return (1) } Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})