]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Image/Image.c
MdeModulePkg: Fix typos in comments and variables
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Image / Image.c
index c75ef35eee2d0ee15dad367344c03992a3dcd422..d659de8b3e64781b8a3170d187256ec856c57b11 100644 (file)
@@ -139,12 +139,12 @@ GetImageReadFunction (
   return EFI_SUCCESS;\r
 }\r
 /**\r
-  To check memory usage bit map arry to figure out if the memory range the image will be loaded in is available or not. If \r
-  memory range is avaliable, the function will mark the correponding bits to 1 which indicates the memory range is used.\r
+  To check memory usage bit map array to figure out if the memory range the image will be loaded in is available or not. If\r
+  memory range is available, the function will mark the corresponding bits to 1 which indicates the memory range is used.\r
   The function is only invoked when load modules at fixed address feature is enabled. \r
   \r
   @param  Private                  Pointer to the private data passed in from caller\r
-  @param  ImageBase                The base addres the image will be loaded at.\r
+  @param  ImageBase                The base address the image will be loaded at.\r
   @param  ImageSize                The size of the image\r
   \r
   @retval EFI_SUCCESS              The memory range the image will be loaded in is available\r
@@ -207,7 +207,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap (
 }\r
 /**\r
 \r
-  Get the fixed loadding address from image header assigned by build tool. This function only be called\r
+  Get the fixed loading address from image header assigned by build tool. This function only be called\r
   when Loading module at Fixed address feature enabled.\r
 \r
   @param ImageContext              Pointer to the image context structure that describes the PE/COFF\r
@@ -215,7 +215,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap (
   @param Private                    Pointer to the private data passed in from caller\r
 \r
   @retval EFI_SUCCESS               An fixed loading address is assigned to this image by build tools .\r
-  @retval EFI_NOT_FOUND             The image has no assigned fixed loadding address.\r
+  @retval EFI_NOT_FOUND             The image has no assigned fixed loading address.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -228,14 +228,14 @@ GetPeCoffImageFixLoadingAssignedAddress(
    EFI_STATUS                         Status;\r
    EFI_IMAGE_SECTION_HEADER           SectionHeader;\r
    EFI_IMAGE_OPTIONAL_HEADER_UNION    *ImgHdr;\r
-   EFI_PHYSICAL_ADDRESS               FixLoaddingAddress;\r
+   EFI_PHYSICAL_ADDRESS               FixLoadingAddress;\r
    UINT16                             Index;\r
    UINTN                              Size;\r
    UINT16                             NumberOfSections;\r
    UINT64                             ValueInSectionHeader;\r
  \r
 \r
-   FixLoaddingAddress = 0;\r
+   FixLoadingAddress = 0;\r
    Status = EFI_NOT_FOUND;\r
 \r
    //\r
@@ -244,7 +244,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
    ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)((CHAR8* )ImageContext->Handle + ImageContext->PeCoffHeaderOffset);\r
    if (ImageContext->IsTeImage) {\r
      //\r
-     // for TE image, the fix loadding address is saved in first section header that doesn't point\r
+     // for TE image, the fix loading address is saved in first section header that doesn't point\r
      // to code section.\r
      //\r
      SectionHeaderOffset = sizeof (EFI_TE_IMAGE_HEADER);\r
@@ -286,7 +286,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
        // for XIP PEIM, ImageBase field holds the image base address running on the Flash. And PointerToRelocations & PointerToLineNumbers\r
        // hold the image base address when it is shadow to the memory. And there is an assumption that when the feature is enabled, if a\r
        // module is assigned a loading address by tools, PointerToRelocations & PointerToLineNumbers fields should NOT be Zero, or\r
-       // else, these 2 fileds should be set to Zero\r
+       // else, these 2 fields should be set to Zero\r
        //\r
        ValueInSectionHeader = ReadUnaligned64((UINT64*)&SectionHeader.PointerToRelocations);\r
        if (ValueInSectionHeader != 0) {\r
@@ -296,32 +296,32 @@ GetPeCoffImageFixLoadingAssignedAddress(
          if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) > 0) {\r
            //\r
            // When LMFA feature is configured as Load Module at Fixed Absolute Address mode, PointerToRelocations & PointerToLineNumbers field\r
-           // hold the absolute address of image base runing in memory\r
+           // hold the absolute address of image base running in memory\r
            //\r
-           FixLoaddingAddress = ValueInSectionHeader;\r
+           FixLoadingAddress = ValueInSectionHeader;\r
          } else {\r
            //\r
            // When LMFA feature is configured as Load Module at Fixed offset mode, PointerToRelocations & PointerToLineNumbers field\r
            // hold the offset relative to a platform-specific top address.\r
            //\r
-           FixLoaddingAddress = (EFI_PHYSICAL_ADDRESS)(Private->LoadModuleAtFixAddressTopAddress + (INT64)ValueInSectionHeader);\r
+           FixLoadingAddress = (EFI_PHYSICAL_ADDRESS)(Private->LoadModuleAtFixAddressTopAddress + (INT64)ValueInSectionHeader);\r
          }\r
          //\r
-         // Check if the memory range is avaliable.\r
+         // Check if the memory range is available.\r
          //\r
-         Status = CheckAndMarkFixLoadingMemoryUsageBitMap (Private, FixLoaddingAddress, (UINT32) ImageContext->ImageSize);\r
+         Status = CheckAndMarkFixLoadingMemoryUsageBitMap (Private, FixLoadingAddress, (UINT32) ImageContext->ImageSize);\r
          if (!EFI_ERROR(Status)) {\r
            //\r
-           // The assigned address is valid. Return the specified loadding address\r
+           // The assigned address is valid. Return the specified loading address\r
            //\r
-           ImageContext->ImageAddress = FixLoaddingAddress;\r
+           ImageContext->ImageAddress = FixLoadingAddress;\r
          }\r
        }\r
        break;\r
      }\r
      SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER);\r
    }\r
-   DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address 0x%11p. Status= %r \n", (VOID *)(UINTN)FixLoaddingAddress, Status));\r
+   DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED INFO: Loading module at fixed address 0x%11p. Status= %r \n", (VOID *)(UINTN)FixLoadingAddress, Status));\r
    return Status;\r
 }\r
 /**\r