]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / Capsules.c
index 6c7fc7ced4c996ebe3bef5449a36b26d4b8002fb..c144d228aebdf39438464f343fca58ac7628c749 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   BDS routines to handle capsules.\r
 \r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -51,7 +51,7 @@ BdsProcessCapsules (
   UINT32                      CacheNumber;\r
   VOID                        **CapsulePtr;\r
   VOID                        **CapsulePtrCache;\r
-  EFI_GUID                    *CapsuleGuidCache; \r
+  EFI_GUID                    *CapsuleGuidCache;\r
   BOOLEAN                     NeedReset;\r
 \r
   CapsuleNumber      = 0;\r
@@ -70,7 +70,7 @@ BdsProcessCapsules (
     DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update.\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Status = EFI_SUCCESS;\r
   //\r
   // Find all capsule images from hob\r
@@ -80,7 +80,7 @@ BdsProcessCapsules (
     CapsuleTotalNumber ++;\r
     HobPointer.Raw = GET_NEXT_HOB (HobPointer);\r
   }\r
-  \r
+\r
   if (CapsuleTotalNumber == 0) {\r
     //\r
     // We didn't find a hob, so had no errors.\r
@@ -92,7 +92,7 @@ BdsProcessCapsules (
     PlatformBdsLockNonUpdatableFlash ();\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Init temp Capsule Data table.\r
   //\r
@@ -102,7 +102,7 @@ BdsProcessCapsules (
   ASSERT (CapsulePtrCache != NULL);\r
   CapsuleGuidCache = (EFI_GUID *) AllocateZeroPool (sizeof (EFI_GUID) * CapsuleTotalNumber);\r
   ASSERT (CapsuleGuidCache != NULL);\r
-  \r
+\r
   //\r
   // Find all capsule images from hob\r
   //\r
@@ -119,12 +119,12 @@ BdsProcessCapsules (
 \r
   //\r
   // Capsules who have CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE always are used for operating\r
-  // System to have information persist across a system reset. EFI System Table must \r
+  // System to have information persist across a system reset. EFI System Table must\r
   // point to an array of capsules that contains the same CapsuleGuid value. And agents\r
-  // searching for this type capsule will look in EFI System Table and search for the \r
+  // searching for this type capsule will look in EFI System Table and search for the\r
   // capsule's Guid and associated pointer to retrieve the data. Two steps below describes\r
-  // how to sorting the capsules by the unique guid and install the array to EFI System Table. \r
-  // Firstly, Loop for all coalesced capsules, record unique CapsuleGuids and cache them in an \r
+  // how to sorting the capsules by the unique guid and install the array to EFI System Table.\r
+  // Firstly, Loop for all coalesced capsules, record unique CapsuleGuids and cache them in an\r
   // array for later sorting capsules by CapsuleGuid.\r
   //\r
   for (Index = 0; Index < CapsuleTotalNumber; Index++) {\r
@@ -132,7 +132,7 @@ BdsProcessCapsules (
     if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0) {\r
       //\r
       // For each capsule, we compare it with known CapsuleGuid in the CacheArray.\r
-      // If already has the Guid, skip it. Whereas, record it in the CacheArray as \r
+      // If already has the Guid, skip it. Whereas, record it in the CacheArray as\r
       // an additional one.\r
       //\r
       CacheIndex = 0;\r
@@ -159,7 +159,7 @@ BdsProcessCapsules (
   //\r
   CacheIndex = 0;\r
   while (CacheIndex < CacheNumber) {\r
-    CapsuleNumber = 0;  \r
+    CapsuleNumber = 0;\r
     for (Index = 0; Index < CapsuleTotalNumber; Index++) {\r
       CapsuleHeader = (EFI_CAPSULE_HEADER*) CapsulePtr [Index];\r
       if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0) {\r
@@ -172,7 +172,7 @@ BdsProcessCapsules (
       }\r
     }\r
     if (CapsuleNumber != 0) {\r
-      Size = sizeof(EFI_CAPSULE_TABLE) + (CapsuleNumber - 1) * sizeof(VOID*);  \r
+      Size = sizeof(EFI_CAPSULE_TABLE) + (CapsuleNumber - 1) * sizeof(VOID*);\r
       CapsuleTable = AllocateRuntimePool (Size);\r
       ASSERT (CapsuleTable != NULL);\r
       CapsuleTable->CapsuleArrayNumber =  CapsuleNumber;\r
@@ -185,7 +185,7 @@ BdsProcessCapsules (
 \r
   //\r
   // Besides ones with CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flag, all capsules left are\r
-  // recognized by platform with CapsuleGuid. For general platform driver, UpdateFlash \r
+  // recognized by platform with CapsuleGuid. For general platform driver, UpdateFlash\r
   // type is commonly supported, so here only deal with encapsuled FVs capsule. Additional\r
   // type capsule transaction could be extended. It depends on platform policy.\r
   //\r
@@ -220,7 +220,7 @@ BdsProcessCapsules (
   }\r
 \r
   PlatformBdsLockNonUpdatableFlash ();\r
-  \r
+\r
   //\r
   // Free the allocated temp memory space.\r
   //\r