]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/TcgSmm/TcgSmm.c
SecurityPkg: Clean up source files
[mirror_edk2.git] / SecurityPkg / Tcg / TcgSmm / TcgSmm.c
index 589bab694b3ad4affbb6aa0bbf322d21653f910e..0b8a002a4d193f1461a0a6a30a94799bf8daa70b 100644 (file)
@@ -8,13 +8,13 @@
 \r
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
-Copyright (c) 2011 - 2016, 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
+Copyright (c) 2011 - 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
 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
@@ -80,7 +80,7 @@ PhysicalPresenceCallback (
     mTcgNvs->PhysicalPresence.ReturnCode  = PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS;\r
     mTcgNvs->PhysicalPresence.LastRequest = PpData.LastPPRequest;\r
     mTcgNvs->PhysicalPresence.Response    = PpData.PPResponse;\r
-  } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS) \r
+  } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)\r
           || (mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {\r
     if (EFI_ERROR (Status)) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
@@ -107,7 +107,7 @@ PhysicalPresenceCallback (
                                );\r
     }\r
 \r
-    if (EFI_ERROR (Status)) { \r
+    if (EFI_ERROR (Status)) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
       return EFI_SUCCESS;\r
     }\r
@@ -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) {\r
           RequestConfirmed = TRUE;\r
         }\r
-        break;  \r
+        break;\r
 \r
       case PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE:\r
       case PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE:\r
@@ -199,7 +199,7 @@ PhysicalPresenceCallback (
         //\r
         // This command requires UI to prompt user for Auth data\r
         //\r
-        mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; \r
+        mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;\r
         return EFI_SUCCESS;\r
       default:\r
         break;\r
@@ -209,11 +209,11 @@ PhysicalPresenceCallback (
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED;\r
     } else {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED;\r
-    }    \r
+    }\r
     if (mTcgNvs->PhysicalPresence.Request >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TcgPpVendorLibGetUserConfirmationStatusFunction (mTcgNvs->PhysicalPresence.Request, Flags.PPFlags);\r
     }\r
-  } \r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -281,7 +281,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
@@ -319,7 +319,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
@@ -403,12 +403,12 @@ PublishAcpiTable (
 /**\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
@@ -453,7 +453,7 @@ InitializeTcgSmm (
     return Status;\r
   }\r
   mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;\r
-  \r
+\r
   //\r
   // Locate SmmVariableProtocol.\r
   //\r