]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
SecurityPkg: Clean up source files
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Smm / Tcg2Smm.c
index 26f1fbdf8cdb8fcf5eb9f15b648bd4e0a120e495..21b1014a3bc7de6a5a5db2c1377a4675bcf2823c 100644 (file)
   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
@@ -82,7 +82,7 @@ PhysicalPresenceCallback (
     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
@@ -163,7 +163,7 @@ MemoryClearCallback (
                            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
@@ -201,7 +201,7 @@ AssignOpRegion (
   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
@@ -219,7 +219,7 @@ AssignOpRegion (
 }\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
@@ -536,7 +536,7 @@ UpdateHID (
   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
@@ -571,7 +571,7 @@ UpdateHID (
     } 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
@@ -742,7 +742,7 @@ PublishTpm2 (
 \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
@@ -808,12 +808,12 @@ PublishTpm2 (
 /**\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
@@ -858,7 +858,7 @@ InitializeTcgSmm (
     return Status;\r
   }\r
   mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;\r
-  \r
+\r
   //\r
   // Locate SmmVariableProtocol.\r
   //\r