PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
\r
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
mTcgNvs->PhysicalPresence.LastRequest = MostRecentRequest;\r
mTcgNvs->PhysicalPresence.Response = Response;\r
return EFI_SUCCESS;\r
- } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS) \r
+ } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)\r
|| (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {\r
\r
OperationRequest = mTcgNvs->PhysicalPresence.Request;\r
DataSize,\r
&MorControl\r
);\r
- if (EFI_ERROR (Status)) { \r
+ if (EFI_ERROR (Status)) {\r
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;\r
DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));\r
}\r
for (OpRegion = (AML_OP_REGION_32_8 *) (Table + 1);\r
OpRegion <= (AML_OP_REGION_32_8 *) ((UINT8 *) Table + Table->Length);\r
OpRegion = (AML_OP_REGION_32_8 *) ((UINT8 *) OpRegion + 1)) {\r
- if ((OpRegion->OpRegionOp == AML_EXT_REGION_OP) && \r
+ if ((OpRegion->OpRegionOp == AML_EXT_REGION_OP) &&\r
(OpRegion->NameString == Name) &&\r
(OpRegion->DWordPrefix == AML_DWORD_PREFIX) &&\r
(OpRegion->BytePrefix == AML_BYTE_PREFIX)) {\r
}\r
\r
/**\r
- Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM \r
+ Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM\r
ACPI table is "$PV".\r
\r
@param[in, out] Table The TPM item in ACPI table.\r
if (!EFI_ERROR(Status)) {\r
DEBUG((EFI_D_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID));\r
//\r
- // ManufacturerID defined in TCG Vendor ID Registry \r
+ // ManufacturerID defined in TCG Vendor ID Registry\r
// may tailed with 0x00 or 0x20\r
//\r
if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {\r
} else {\r
AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));\r
}\r
- \r
+\r
} else {\r
DEBUG ((EFI_D_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Status));\r
ASSERT(FALSE);\r
\r
//\r
// PlatformClass is only valid for version 4 and above\r
- // BIT0~15: PlatformClass \r
+ // BIT0~15: PlatformClass\r
// BIT16~31: Reserved\r
//\r
if (mTpm2AcpiTemplate.Header.Revision >= EFI_TPM2_ACPI_TABLE_REVISION_4) {\r
/**\r
The driver's entry point.\r
\r
- It install callbacks for TPM physical presence and MemoryClear, and locate \r
+ It install callbacks for TPM physical presence and MemoryClear, and locate\r
SMM variable to be used in the callback function.\r
\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image. \r
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
@param[in] SystemTable A pointer to the EFI System Table.\r
- \r
+\r
@retval EFI_SUCCESS The entry point is executed successfully.\r
@retval Others Some error occurs when executing this entry point.\r
\r
return Status;\r
}\r
mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;\r
- \r
+\r
//\r
// Locate SmmVariableProtocol.\r
//\r