summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/Tcg2Smm
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:13:09 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:50 +0800
commitb3548d32ddb553a9e95503457c66d11462622d16 (patch)
tree58d9148d8298dcc8ea64e5515ada87c433f6be2a /SecurityPkg/Tcg/Tcg2Smm
parent5a702acd3df099307d9bae0725f97b52b4895382 (diff)
downloadedk2-b3548d32ddb553a9e95503457c66d11462622d16.tar.gz
edk2-b3548d32ddb553a9e95503457c66d11462622d16.tar.bz2
edk2-b3548d32ddb553a9e95503457c66d11462622d16.zip
SecurityPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Smm')
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c30
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h10
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf8
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni4
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni6
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tpm.asl52
6 files changed, 55 insertions, 55 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index 26f1fbdf8c..21b1014a3b 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -10,12 +10,12 @@
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
-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
+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.
**/
@@ -82,7 +82,7 @@ PhysicalPresenceCallback (
mTcgNvs->PhysicalPresence.LastRequest = MostRecentRequest;
mTcgNvs->PhysicalPresence.Response = Response;
return EFI_SUCCESS;
- } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
+ } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
|| (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {
OperationRequest = mTcgNvs->PhysicalPresence.Request;
@@ -163,7 +163,7 @@ MemoryClearCallback (
DataSize,
&MorControl
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status)) {
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;
DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));
}
@@ -201,7 +201,7 @@ AssignOpRegion (
for (OpRegion = (AML_OP_REGION_32_8 *) (Table + 1);
OpRegion <= (AML_OP_REGION_32_8 *) ((UINT8 *) Table + Table->Length);
OpRegion = (AML_OP_REGION_32_8 *) ((UINT8 *) OpRegion + 1)) {
- if ((OpRegion->OpRegionOp == AML_EXT_REGION_OP) &&
+ if ((OpRegion->OpRegionOp == AML_EXT_REGION_OP) &&
(OpRegion->NameString == Name) &&
(OpRegion->DWordPrefix == AML_DWORD_PREFIX) &&
(OpRegion->BytePrefix == AML_BYTE_PREFIX)) {
@@ -219,7 +219,7 @@ AssignOpRegion (
}
/**
- Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM
+ Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM
ACPI table is "$PV".
@param[in, out] Table The TPM item in ACPI table.
@@ -536,7 +536,7 @@ UpdateHID (
if (!EFI_ERROR(Status)) {
DEBUG((EFI_D_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID));
//
- // ManufacturerID defined in TCG Vendor ID Registry
+ // ManufacturerID defined in TCG Vendor ID Registry
// may tailed with 0x00 or 0x20
//
if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {
@@ -571,7 +571,7 @@ UpdateHID (
} else {
AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));
}
-
+
} else {
DEBUG ((EFI_D_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Status));
ASSERT(FALSE);
@@ -742,7 +742,7 @@ PublishTpm2 (
//
// PlatformClass is only valid for version 4 and above
- // BIT0~15: PlatformClass
+ // BIT0~15: PlatformClass
// BIT16~31: Reserved
//
if (mTpm2AcpiTemplate.Header.Revision >= EFI_TPM2_ACPI_TABLE_REVISION_4) {
@@ -808,12 +808,12 @@ PublishTpm2 (
/**
The driver's entry point.
- It install callbacks for TPM physical presence and MemoryClear, and locate
+ It install callbacks for TPM physical presence and MemoryClear, and locate
SMM variable to be used in the callback function.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
-
+
@retval EFI_SUCCESS The entry point is executed successfully.
@retval Others Some error occurs when executing this entry point.
@@ -858,7 +858,7 @@ InitializeTcgSmm (
return Status;
}
mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;
-
+
//
// Locate SmmVariableProtocol.
//
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
index e3a14e8339..176a8d59f0 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
@@ -1,13 +1,13 @@
/** @file
The header file for Tcg2 SMM driver.
-
+
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
-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
+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.
**/
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
index 168f9779e6..142941e269 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
@@ -8,8 +8,8 @@
# TPM2.0 ACPI device object
# "TCG PC Client Platform Firmware Profile Specification for TPM Family 2.0 Level 00 Revision 00.21"
#
-# This driver implements TPM 2.0 definition block in ACPI table and
-# registers SMI callback functions for Tcg2 physical presence and
+# This driver implements TPM 2.0 definition block in ACPI table and
+# registers SMI callback functions for Tcg2 physical presence and
# MemoryClear to handle the requests from ACPI method.
#
# Caution: This module requires additional review when modified.
@@ -62,9 +62,9 @@
[Guids]
## SOMETIMES_PRODUCES ## Variable:L"MemoryOverwriteRequestControl"
- ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"
+ ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"
gEfiMemoryOverwriteControlDataGuid
-
+
gEfiTpmDeviceInstanceTpm20DtpmGuid ## PRODUCES ## GUID # TPM device identifier
[Protocols]
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni
index 297e71a06d..11f47fa5e8 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni
@@ -4,12 +4,12 @@
// This driver implements TPM 2.0 definition block in ACPI table and
// registers SMI callback functions for TCG2 physical presence and
// MemoryClear to handle the requests from ACPI method.
-//
+//
// Caution: This module requires additional review when modified.
// This driver will have external input - variable and ACPINvs data in SMM mode.
// This external input must be validated carefully to avoid security issue.
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni b/SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni
index e2a7b1d02f..caef3f37e8 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// Tcg2Smm Localized Strings and Content
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -12,8 +12,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"TCG2 (Trusted Computing Group) SMM"
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
index f58efca144..50dea0ab9a 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
@@ -1,16 +1,16 @@
/** @file
- The TPM2 definition block in ACPI table for TCG2 physical presence
+ The TPM2 definition block in ACPI table for TCG2 physical presence
and MemoryClear.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
(c)Copyright 2016 HP Development Company, L.P.<BR>
Copyright (c) 2017, Microsoft Corporation. All rights reserved. <BR>
-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
+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.
**/
@@ -49,7 +49,7 @@ DefinitionBlock (
//
OperationRegion (SMIP, SystemIO, 0xB2, 1)
Field (SMIP, ByteAcc, NoLock, Preserve)
- {
+ {
IOB2, 8
}
@@ -247,12 +247,12 @@ DefinitionBlock (
}
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.
//
@@ -262,7 +262,7 @@ DefinitionBlock (
// Triggle the SMI through ACPI _PTS method.
//
Store (0x02, MCIP)
-
+
//
// Triggle the SMI interrupt
//
@@ -270,7 +270,7 @@ DefinitionBlock (
}
}
Return (0)
- }
+ }
Method (_STA, 0)
{
@@ -320,12 +320,12 @@ DefinitionBlock (
}
Name(TPM2, Package (0x02){
- Zero,
+ Zero,
Zero
})
Name(TPM3, Package (0x03){
- Zero,
+ Zero,
Zero,
Zero
})
@@ -334,7 +334,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
//
@@ -359,11 +359,11 @@ DefinitionBlock (
//
// b) Submit TPM Operation Request to Pre-OS Environment
//
-
+
Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
Store (0, PPRM)
Store (0x02, PPIP)
-
+
//
// Triggle the SMI interrupt
//
@@ -377,7 +377,7 @@ DefinitionBlock (
//
// c) Get Pending TPM Operation Requested By the OS
//
-
+
Store (PPRQ, Index (TPM2, 0x01))
Return (TPM2)
}
@@ -394,12 +394,12 @@ DefinitionBlock (
// e) Return TPM Operation Response to OS Environment
//
Store (0x05, PPIP)
-
+
//
// Triggle the SMI interrupt
//
Store (PPIN, IOB2)
-
+
Store (LPPR, Index (TPM3, 0x01))
Store (PPRP, Index (TPM3, 0x02))
@@ -426,11 +426,11 @@ DefinitionBlock (
If (LEqual (PPRQ, 23)) {
Store (DerefOf (Index (Arg2, 0x01)), PPRM)
}
-
+
//
- // Triggle the SMI interrupt
+ // Triggle the SMI interrupt
//
- Store (PPIN, IOB2)
+ Store (PPIN, IOB2)
Return (FRET)
}
Case (8)
@@ -440,12 +440,12 @@ DefinitionBlock (
//
Store (8, PPIP)
Store (DerefOf (Index (Arg2, 0x00)), UCRQ)
-
+
//
// Triggle the SMI interrupt
//
Store (PPIN, IOB2)
-
+
Return (FRET)
}
@@ -474,12 +474,12 @@ 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.
//
Store (0x01, MCIP)
-
+
//
// Triggle the SMI interrupt
//
@@ -488,7 +488,7 @@ DefinitionBlock (
}
Default {BreakPoint}
}
- Return (1)
+ Return (1)
}
Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})