summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/TcgSmm
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/TcgSmm
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/TcgSmm')
-rw-r--r--SecurityPkg/Tcg/TcgSmm/TcgSmm.c34
-rw-r--r--SecurityPkg/Tcg/TcgSmm/TcgSmm.h12
-rw-r--r--SecurityPkg/Tcg/TcgSmm/TcgSmm.inf12
-rw-r--r--SecurityPkg/Tcg/TcgSmm/TcgSmm.uni4
-rw-r--r--SecurityPkg/Tcg/TcgSmm/TcgSmmExtra.uni6
-rw-r--r--SecurityPkg/Tcg/TcgSmm/Tpm.asl56
6 files changed, 62 insertions, 62 deletions
diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c b/SecurityPkg/Tcg/TcgSmm/TcgSmm.c
index 589bab694b..0b8a002a4d 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.c
@@ -8,13 +8,13 @@
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
-Copyright (c) 2011 - 2016, 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
+Copyright (c) 2011 - 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
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.
**/
@@ -80,7 +80,7 @@ PhysicalPresenceCallback (
mTcgNvs->PhysicalPresence.ReturnCode = PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS;
mTcgNvs->PhysicalPresence.LastRequest = PpData.LastPPRequest;
mTcgNvs->PhysicalPresence.Response = PpData.PPResponse;
- } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
+ } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
|| (mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {
if (EFI_ERROR (Status)) {
mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
@@ -107,7 +107,7 @@ PhysicalPresenceCallback (
);
}
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status)) {
mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
return EFI_SUCCESS;
}
@@ -186,7 +186,7 @@ PhysicalPresenceCallback (
if ((Flags.PPFlags & TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_CLEAR) != 0 && (Flags.PPFlags & TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_PROVISION) != 0) {
RequestConfirmed = TRUE;
}
- break;
+ break;
case PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE:
case PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE:
@@ -199,7 +199,7 @@ PhysicalPresenceCallback (
//
// This command requires UI to prompt user for Auth data
//
- mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
+ mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
return EFI_SUCCESS;
default:
break;
@@ -209,11 +209,11 @@ PhysicalPresenceCallback (
mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED;
} else {
mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED;
- }
+ }
if (mTcgNvs->PhysicalPresence.Request >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
mTcgNvs->PhysicalPresence.ReturnCode = TcgPpVendorLibGetUserConfirmationStatusFunction (mTcgNvs->PhysicalPresence.Request, Flags.PPFlags);
}
- }
+ }
return EFI_SUCCESS;
}
@@ -281,7 +281,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));
}
@@ -319,7 +319,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)) {
@@ -403,12 +403,12 @@ PublishAcpiTable (
/**
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.
@@ -453,7 +453,7 @@ InitializeTcgSmm (
return Status;
}
mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;
-
+
//
// Locate SmmVariableProtocol.
//
diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.h b/SecurityPkg/Tcg/TcgSmm/TcgSmm.h
index 21e4ad96d2..0aff3e3c4f 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.h
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.h
@@ -1,13 +1,13 @@
/** @file
The header file for TCG SMM driver.
-
-Copyright (c) 2012 - 2016, 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
+
+Copyright (c) 2012 - 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
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/TcgSmm/TcgSmm.inf b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
index be7a96bc62..806b8f9b4e 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
@@ -1,15 +1,15 @@
## @file
# Implements ACPI metholds for the TCG feature
#
-# This driver implements TPM definition block in ACPI table and registers SMI
-# callback functions for physical presence and MemoryClear to handle the requests
+# This driver implements TPM definition block in ACPI table and registers SMI
+# callback functions for 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) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 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
@@ -60,7 +60,7 @@
## SOMETIMES_PRODUCES ## Variable:L"MemoryOverwriteRequestControl"
## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"
gEfiMemoryOverwriteControlDataGuid
-
+
gEfiTpmDeviceInstanceTpm12Guid ## PRODUCES ## GUID # TPM device identifier
[Protocols]
@@ -77,7 +77,7 @@
gEfiSmmSwDispatch2ProtocolGuid AND
gEfiSmmVariableProtocolGuid AND
gEfiTcgProtocolGuid
-
+
[UserExtensions.TianoCore."ExtraFiles"]
TcgSmmExtra.uni
- \ No newline at end of file
+
diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.uni b/SecurityPkg/Tcg/TcgSmm/TcgSmm.uni
index 81f7f8d53a..8494332295 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.uni
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.uni
@@ -4,12 +4,12 @@
// This driver implements TPM definition block in ACPI table and registers SMI
// callback functions for 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) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2011 - 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/TcgSmm/TcgSmmExtra.uni b/SecurityPkg/Tcg/TcgSmm/TcgSmmExtra.uni
index b9ca98bb6e..42d21474d8 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmmExtra.uni
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmmExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// TcgSmm Localized Strings and Content
//
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2013 - 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
"TCG (Trusted Computing Group) SMM"
diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.asl
index b5449d98b4..12f24f3996 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 - 2016, 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
+Copyright (c) 2011 - 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
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
}
@@ -79,16 +79,16 @@ DefinitionBlock (
MCIP, 32, // Used for save the Mor paramter
MORD, 32, // Memory Overwrite Request Data
MRET, 32, // Memory Overwrite function return code
- UCRQ, 32 // Phyical Presence request operation to Get User Confirmation Status
+ 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.
//
@@ -98,7 +98,7 @@ DefinitionBlock (
// Triggle the SMI through ACPI _PTS method.
//
Store (0x02, MCIP)
-
+
//
// Triggle the SMI interrupt
//
@@ -106,7 +106,7 @@ DefinitionBlock (
}
}
Return (0)
- }
+ }
Method (_STA, 0)
{
@@ -156,12 +156,12 @@ DefinitionBlock (
}
Name(TPM2, Package (0x02){
- Zero,
+ Zero,
Zero
})
Name(TPM3, Package (0x03){
- Zero,
+ Zero,
Zero,
Zero
})
@@ -170,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
//
@@ -195,10 +195,10 @@ DefinitionBlock (
//
// b) Submit TPM Operation Request to Pre-OS Environment
//
-
+
Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
Store (0x02, PPIP)
-
+
//
// Triggle the SMI interrupt
//
@@ -212,7 +212,7 @@ DefinitionBlock (
//
// c) Get Pending TPM Operation Requested By the OS
//
-
+
Store (PPRQ, Index (TPM2, 0x01))
Return (TPM2)
}
@@ -229,12 +229,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))
@@ -257,11 +257,11 @@ DefinitionBlock (
//
Store (7, PPIP)
Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
-
+
//
- // Triggle the SMI interrupt
+ // Triggle the SMI interrupt
//
- Store (PPIN, IOB2)
+ Store (PPIN, IOB2)
Return (FRET)
}
Case (8)
@@ -271,12 +271,12 @@ DefinitionBlock (
//
Store (8, PPIP)
Store (DerefOf (Index (Arg2, 0x00)), UCRQ)
-
+
//
// Triggle the SMI interrupt
//
Store (PPIN, IOB2)
-
+
Return (FRET)
}
@@ -305,12 +305,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
//
@@ -319,7 +319,7 @@ DefinitionBlock (
}
Default {BreakPoint}
}
- Return (1)
+ Return (1)
}
Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})