[edk2-devel] [PATCH 18/79] MdeModulePkg/Core/Pei: Fix various typos

Philippe Mathieu-Daudé via Groups.Io philmd=redhat.com at groups.io
Tue Dec 3 16:15:01 UTC 2019


From: Antoine Coeur <coeur at gmx.fr>

Fix various typos in comments and documentation.

Cc: Jian J Wang <jian.j.wang at intel.com>
Cc: Hao A Wu <hao.a.wu at intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd at redhat.com>
Signed-off-by: Philippe Mathieu-Daude <philmd at redhat.com>
---
 MdeModulePkg/Core/Pei/PeiMain.h               | 20 +++++++-------
 MdeModulePkg/Core/Pei/Dependency/Dependency.c |  4 +--
 MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 28 ++++++++++----------
 MdeModulePkg/Core/Pei/FwVol/FwVol.c           |  8 +++---
 MdeModulePkg/Core/Pei/Hob/Hob.c               |  2 +-
 MdeModulePkg/Core/Pei/Image/Image.c           |  8 +++---
 MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 10 +++----
 MdeModulePkg/Core/Pei/PeiMain/PeiMain.c       |  4 +--
 MdeModulePkg/Core/Pei/Ppi/Ppi.c               |  2 +-
 MdeModulePkg/Core/Pei/Security/Security.c     |  2 +-
 10 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index f2aa97c6640c..f799f5e2776c 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -136,11 +136,11 @@ typedef struct {
   EFI_PEI_FV_HANDLE                   FvHandle;
   UINTN                               PeimCount;
   //
-  // Ponter to the buffer with the PeimCount number of Entries.
+  // Pointer to the buffer with the PeimCount number of Entries.
   //
   UINT8                               *PeimState;
   //
-  // Ponter to the buffer with the PeimCount number of Entries.
+  // Pointer to the buffer with the PeimCount number of Entries.
   //
   EFI_PEI_FILE_HANDLE                 *FvFileHandles;
   BOOLEAN                             ScanFv;
@@ -282,7 +282,7 @@ struct _PEI_CORE_INSTANCE {
   EFI_PHYSICAL_ADDRESS               LoadModuleAtFixAddressTopAddress;
   //
   // The field is define for Loading modules at fixed address feature to tracker the PEI code
-  // memory range usage. It is a bit mapped array in which every bit indicates the correspoding memory page
+  // memory range usage. It is a bit mapped array in which every bit indicates the corresponding memory page
   // available or not.
   //
   UINT64                            *PeiCodeMemoryRangeUsageBitMap;
@@ -372,7 +372,7 @@ PeiCore (
 
   This is the POSTFIX version of the dependency evaluator.  When a
   PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on
-  the evaluation stack.  When that entry is poped from the evaluation
+  the evaluation stack.  When that entry is popped from the evaluation
   stack, the PPI is checked if it is installed.  This method allows
   some time savings as not all PPIs must be checked for certain
   operation types (AND, OR).
@@ -412,7 +412,7 @@ PeiDispatcher (
 
   @param PrivateData     PeiCore's private data structure
   @param OldCoreData     Old data from SecCore
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
   @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size
                          and location of temporary RAM, the stack location and the BFV location.
 
@@ -453,7 +453,7 @@ DepexSatisfied (
 
   @param PrivateData     Pointer to the PEI Core data.
   @param OldCoreData     Pointer to old PEI Core data.
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
 
 **/
 VOID
@@ -555,7 +555,7 @@ PeiLocatePpi (
 
   @retval EFI_SUCCESS           if successful
   @retval EFI_OUT_OF_RESOURCES  if no space in the database
-  @retval EFI_INVALID_PARAMETER if not a good decriptor
+  @retval EFI_INVALID_PARAMETER if not a good descriptor
 
 **/
 EFI_STATUS
@@ -659,7 +659,7 @@ PeiSetBootMode (
 
   @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
   @param OldCoreData     Pointer to the old core data.
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
 
 **/
 VOID
@@ -887,7 +887,7 @@ PeiFfsFindNextVolume (
   @param SecCoreData     Points to a data structure containing SEC to PEI handoff data, such as the size
                          and location of temporary RAM, the stack location and the BFV location.
   @param OldCoreData     Pointer to the PEI Core data.
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
 
 **/
 VOID
@@ -1125,7 +1125,7 @@ PeiInitializeFv (
   );
 
 /**
-  Process Firmware Volum Information once FvInfoPPI install.
+  Process Firmware Volume Information once FvInfoPPI install.
 
   @param PeiServices       An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
   @param NotifyDescriptor  Address of the notification descriptor data structure.
diff --git a/MdeModulePkg/Core/Pei/Dependency/Dependency.c b/MdeModulePkg/Core/Pei/Dependency/Dependency.c
index 6ce610a02833..5fedeb80b10d 100644
--- a/MdeModulePkg/Core/Pei/Dependency/Dependency.c
+++ b/MdeModulePkg/Core/Pei/Dependency/Dependency.c
@@ -72,7 +72,7 @@ IsPpiInstalled (
 
   This is the POSTFIX version of the dependency evaluator.  When a
   PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on
-  the evaluation stack.  When that entry is poped from the evaluation
+  the evaluation stack.  When that entry is popped from the evaluation
   stack, the PPI is checked if it is installed.  This method allows
   some time savings as not all PPIs must be checked for certain
   operation types (AND, OR).
@@ -123,7 +123,7 @@ PeimDispatchReadiness (
 
         //
         // Push the pointer to the PUSH opcode operator (pointer to PPI GUID)
-        // We will evaluate if the PPI is insalled on the POP operation.
+        // We will evaluate if the PPI is installed on the POP operation.
         //
         StackPtr->Operator = (VOID *) Iterator;
         Iterator = Iterator + sizeof (EFI_GUID);
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index ba2fd0cae14f..182685b5c014 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -257,7 +257,7 @@ PeiLoadFixAddressIsMemoryRangeAvailable (
 
   This function should only be invoked when Loading Module at Fixed Address(LMFA) feature is enabled. When feature is
   configured as Load Modules at Fix Absolute Address, this function is to validate the top address assigned by user. When
-  feature is configured as Load Modules at Fixed Offset, the functino is to find the top address which is TOLM-TSEG in general.
+  feature is configured as Load Modules at Fixed Offset, the function is to find the top address which is TOLM-TSEG in general.
   And also the function will re-install PEI memory.
 
   @param PrivateData         Pointer to the private data passed in from caller
@@ -393,12 +393,12 @@ PeiLoadFixAddressHook(
             continue;
           }
           //
-          // If the range describe in memory allocation HOB  belongs to the memroy range described by the resource hob
+          // If the range describe in memory allocation HOB  belongs to the memory range described by the resource hob
           //
           if (MemoryHob->AllocDescriptor.MemoryBaseAddress >= NextResourceHob->PhysicalStart &&
               MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) {
              //
-             // Build seperate resource hob for this allocated range
+             // Build separate resource hob for this allocated range
              //
              if (MemoryHob->AllocDescriptor.MemoryBaseAddress > NextResourceHob->PhysicalStart) {
                BuildResourceDescriptorHob (
@@ -452,7 +452,7 @@ PeiLoadFixAddressHook(
 
         ResourceHob = Hob.ResourceDescriptor;
         //
-        // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS
+        // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS
         //
         if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&
             ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) {
@@ -476,7 +476,7 @@ PeiLoadFixAddressHook(
       DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid \n",  TopLoadingAddress));
       DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The recommended Top Address for the platform is: \n"));
       //
-      // Print the recomended Top address range.
+      // Print the recommended Top address range.
       //
       for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {
         //
@@ -486,7 +486,7 @@ PeiLoadFixAddressHook(
 
           ResourceHob = Hob.ResourceDescriptor;
           //
-          // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS
+          // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS
           //
           if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&
               ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) {
@@ -524,7 +524,7 @@ PeiLoadFixAddressHook(
 
         ResourceHob = Hob.ResourceDescriptor;
         //
-        // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS
+        // See if this resource descriptor HOB describes tested system memory below MAX_ADDRESS
         //
         if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&
             ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS &&
@@ -554,7 +554,7 @@ PeiLoadFixAddressHook(
 
   if (CurrentResourceHob != NULL) {
     //
-    // rebuild resource HOB for PEI memmory and reserved memory
+    // rebuild resource HOB for PEI memory and reserved memory
     //
     BuildResourceDescriptorHob (
       EFI_RESOURCE_SYSTEM_MEMORY,
@@ -604,7 +604,7 @@ PeiLoadFixAddressHook(
        );
     }
     //
-    // Delete CurrentHob by marking it as unused since the the memory range described by is rebuilt.
+    // Delete CurrentHob by marking it as unused since the memory range described by is rebuilt.
     //
     GET_HOB_TYPE (CurrentHob) = EFI_HOB_TYPE_UNUSED;
   }
@@ -750,8 +750,8 @@ PeiCheckAndSwitchStack (
     ASSERT (NewStackSize >= SecCoreData->StackSize);
 
     //
-    // Calculate stack offset and heap offset between temporary memory and new permement
-    // memory seperately.
+    // Calculate stack offset and heap offset between temporary memory and new permanent
+    // memory separately.
     //
     TopOfOldStack = (UINTN)SecCoreData->StackBase + SecCoreData->StackSize;
     TopOfNewStack = Private->PhysicalMemoryBegin + NewStackSize;
@@ -1045,7 +1045,7 @@ PeiDispatcher (
   // pass of the dispatcher, it will start over from the Bfv again to see
   // if any new PEIMs dependencies got satisfied.  With a well ordered
   // FV where PEIMs are found in the order their dependencies are also
-  // satisfied, this dipatcher should run only once.
+  // satisfied, this dispatcher should run only once.
   //
   do {
     //
@@ -1229,7 +1229,7 @@ PeiDispatcher (
 
       //
       // Before walking through the next FV, we should set them to NULL/0 to
-      // start at the begining of the next FV.
+      // start at the beginning of the next FV.
       //
       Private->CurrentFileHandle = NULL;
       Private->CurrentPeimCount = 0;
@@ -1259,7 +1259,7 @@ PeiDispatcher (
 
   @param PrivateData     PeiCore's private data structure
   @param OldCoreData     Old data from SecCore
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
   @param SecCoreData     Points to a data structure containing information about the PEI core's operating
                          environment, such as the size and location of temporary RAM, the stack location and
                          the BFV location.
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index f4642c47c13a..c105a14a1fb0 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -178,7 +178,7 @@ CalculateHeaderChecksum (
   if (IS_FFS_FILE2 (FileHeader)) {
     CopyMem (&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER2));
     //
-    // Ingore State and File field in FFS header.
+    // Ignore State and File field in FFS header.
     //
     TestFileHeader.State = 0;
     TestFileHeader.IntegrityCheck.Checksum.File = 0;
@@ -187,7 +187,7 @@ CalculateHeaderChecksum (
   } else {
     CopyMem (&TestFileHeader, FileHeader, sizeof (EFI_FFS_FILE_HEADER));
     //
-    // Ingore State and File field in FFS header.
+    // Ignore State and File field in FFS header.
     //
     TestFileHeader.State = 0;
     TestFileHeader.IntegrityCheck.Checksum.File = 0;
@@ -528,7 +528,7 @@ PeiInitializeFv (
 }
 
 /**
-  Process Firmware Volum Information once FvInfoPPI or FvInfo2PPI install.
+  Process Firmware Volume Information once FvInfoPPI or FvInfo2PPI install.
   The FV Info will be registered into PeiCore private data structure.
   And search the inside FV image, if found, the new FV INFO(2) PPI will be installed.
 
@@ -537,7 +537,7 @@ PeiInitializeFv (
   @param Ppi               Address of the PPI that was installed.
 
   @retval EFI_SUCCESS    The FV Info is registered into PeiCore private data structure.
-  @return if not EFI_SUCESS, fail to verify FV.
+  @return if not EFI_SUCCESS, fail to verify FV.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Core/Pei/Hob/Hob.c b/MdeModulePkg/Core/Pei/Hob/Hob.c
index 5900f6042b60..20e022796e5f 100644
--- a/MdeModulePkg/Core/Pei/Hob/Hob.c
+++ b/MdeModulePkg/Core/Pei/Hob/Hob.c
@@ -1,5 +1,5 @@
 /** @file
-  This module provide Hand-Off Block manupulation.
+  This module provide Hand-Off Block manipulation.
 
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c
index d553d9128fdd..0db15acf7171 100644
--- a/MdeModulePkg/Core/Pei/Image/Image.c
+++ b/MdeModulePkg/Core/Pei/Image/Image.c
@@ -99,7 +99,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap (
    }
 
    //
-   // Test if the memory is avalaible or not.
+   // Test if the memory is available or not.
    //
    MemoryUsageBitMap    = Private->PeiCodeMemoryRangeUsageBitMap;
    BaseOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase - PeiCodeBase));
@@ -290,7 +290,7 @@ LoadAndRelocatePeCoffImage (
   }
 
   //
-  // Initilize local IsS3Boot and IsRegisterForShadow variable
+  // Initialize local IsS3Boot and IsRegisterForShadow variable
   //
   IsS3Boot = FALSE;
   if (Private->HobList.HandoffInformationTable->BootMode == BOOT_ON_S3_RESUME) {
@@ -363,7 +363,7 @@ LoadAndRelocatePeCoffImage (
       if (EFI_ERROR (Status)){
         DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED ERROR: Failed to load module at fixed address. \n"));
         //
-        // The PEIM is not assiged valid address, try to allocate page to load it.
+        // The PEIM is not assigned valid address, try to allocate page to load it.
         //
         Status = PeiServicesAllocatePages (EfiBootServicesCode,
                                            EFI_SIZE_TO_PAGES ((UINT32) AlignImageSize),
@@ -602,7 +602,7 @@ PeiLoadImageLoadImage (
       //
       // Copy the PDB file name to our temporary string, and replace .pdb with .efi
       // The PDB file name is limited in the range of 0~511.
-      // If the length is bigger than 511, trim the redudant characters to avoid overflow in array boundary.
+      // If the length is bigger than 511, trim the redundant characters to avoid overflow in array boundary.
       //
       for (Index = 0; Index < sizeof (EfiFileName) - 4; Index++) {
         EfiFileName[Index] = AsciiString[Index + StartIndex];
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index 706837890fde..549047fc9466 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
                          environment, such as the size and location of temporary RAM, the stack location and
                          the BFV location.
   @param OldCoreData     Pointer to the PEI Core data.
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
 
 **/
 VOID
@@ -61,7 +61,7 @@ InitializeMemoryServices (
   The usage model is that the PEIM that discovers the permanent memory shall invoke this service.
   This routine will hold discoveried memory information into PeiCore's private data,
   and set SwitchStackSignal flag. After PEIM who discovery memory is dispatched,
-  PeiDispatcher will migrate temporary memory to permenement memory.
+  PeiDispatcher will migrate temporary memory to permanent memory.
 
   @param PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
   @param MemoryBegin        Start of memory address.
@@ -86,7 +86,7 @@ PeiInstallPeiMemory (
   //
   // PEI_SERVICE.InstallPeiMemory should only be called one time during whole PEI phase.
   // If it is invoked more than one time, ASSERT information is given for developer debugging in debug tip and
-  // simply return EFI_SUCESS in release tip to ignore it.
+  // simply return EFI_SUCCESS in release tip to ignore it.
   //
   if (PrivateData->PeiMemoryInstalled) {
     DEBUG ((EFI_D_ERROR, "ERROR: PeiInstallPeiMemory is called more than once!\n"));
@@ -759,7 +759,7 @@ PeiFreePages (
 /**
 
   Pool allocation service. Before permanent memory is discoveried, the pool will
-  be allocated the heap in the temporary memory. Genenrally, the size of heap in temporary
+  be allocated the heap in the temporary memory. Generally, the size of heap in temporary
   memory does not exceed to 64K, so the biggest pool size could be allocated is
   64K.
 
@@ -790,7 +790,7 @@ PeiAllocatePool (
 
   //
   // Generally, the size of heap in temporary memory does not exceed to 64K,
-  // HobLength is multiples of 8 bytes, so the maxmium size of pool is 0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL)
+  // HobLength is multiples of 8 bytes, so the maximum size of pool is 0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL)
   //
   if (Size > (0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL))) {
     return EFI_OUT_OF_RESOURCES;
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index 33f056ea8f5d..cca57c4c0686 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -132,7 +132,7 @@ ShadowPeiCore (
   ASSERT_EFI_ERROR (Status);
 
   //
-  // Compute the PeiCore's function address after shaowed PeiCore.
+  // Compute the PeiCore's function address after shadowed PeiCore.
   // _ModuleEntryPoint is PeiCore main function entry
   //
   return (PEICORE_FUNCTION_POINTER)((UINTN) EntryPoint + (UINTN) PeiCore - (UINTN) _ModuleEntryPoint);
@@ -315,7 +315,7 @@ PeiCore (
       }
 
       //
-      // Shadow PEI Core. When permanent memory is avaiable, shadow
+      // Shadow PEI Core. When permanent memory is available, shadow
       // PEI Core and PEIMs to get high performance.
       //
       OldCoreData->ShadowedPeiCore = (PEICORE_FUNCTION_POINTER) (UINTN) PeiCore;
diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
index 964aee690e27..e3220266f0b2 100644
--- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
+++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
@@ -663,7 +663,7 @@ ProcessDispatchNotifyList (
     //
     // Check if the PEIM that was just dispatched resulted in any
     // Notifies getting installed.  If so, go process any dispatch
-    // level Notifies that match the previouly installed PPIs.
+    // level Notifies that match the previously installed PPIs.
     // Use "while" instead of "if" since ProcessNotify can modify
     // DispatchNotifyList.CurrentCount (with NotifyPpi) so we have
     // to iterate until the same.
diff --git a/MdeModulePkg/Core/Pei/Security/Security.c b/MdeModulePkg/Core/Pei/Security/Security.c
index 99da505538fa..32bc292b15c4 100644
--- a/MdeModulePkg/Core/Pei/Security/Security.c
+++ b/MdeModulePkg/Core/Pei/Security/Security.c
@@ -20,7 +20,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList = {
 
   @param PeiServices     An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
   @param OldCoreData     Pointer to the old core data.
-                         NULL if being run in non-permament memory mode.
+                         NULL if being run in non-permanent memory mode.
 
 **/
 VOID
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51623): https://edk2.groups.io/g/devel/message/51623
Mute This Topic: https://groups.io/mt/65773400/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list