]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/Sec/SecMain.c
Nt32Pkg: Fix typos in comments and variables
[mirror_edk2.git] / Nt32Pkg / Sec / SecMain.c
index e9f72dfba10e39460e5f0b5115ad10d0705dfd3b..80539faa33221f8c3ca2f469c19f8057d1cdf93d 100644 (file)
@@ -22,7 +22,7 @@ Abstract:
   will be, how may FD's will be loaded and also what the boot mode is.\r
 \r
   The SEC registers a set of services with the SEC core. gPrivateDispatchTable\r
-  is a list of PPI's produced by the SEC that are availble for usage in PEI.\r
+  is a list of PPI's produced by the SEC that are available for usage in PEI.\r
 \r
   This code produces 128 K of temporary memory for the PEI stack by directly\r
   allocate memory space with ReadWrite and Execute attribute.\r
@@ -161,7 +161,7 @@ Routine Description:
 Arguments:\r
   Argc - Number of command line arguments\r
   Argv - Array of command line argument strings\r
-  Envp - Array of environmemt variable strings\r
+  Envp - Array of environment variable strings\r
 \r
 Returns:\r
   0 - Normal exit\r
@@ -228,7 +228,7 @@ Returns:
   //\r
   // Allocate space for gSystemMemory Array\r
   //\r
-  gSystemMemoryCount  = CountSeperatorsInString (MemorySizeStr, '!') + 1;\r
+  gSystemMemoryCount  = CountSeparatorsInString (MemorySizeStr, '!') + 1;\r
   gSystemMemory       = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));\r
   if (gSystemMemory == NULL) {\r
     SecPrint ("ERROR : Can not allocate memory for %S.  Exiting.\n", MemorySizeStr);\r
@@ -237,7 +237,7 @@ Returns:
   //\r
   // Allocate space for gSystemMemory Array\r
   //\r
-  gFdInfoCount  = CountSeperatorsInString (FirmwareVolumesStr, '!') + 1;\r
+  gFdInfoCount  = CountSeparatorsInString (FirmwareVolumesStr, '!') + 1;\r
   gFdInfo       = calloc (gFdInfoCount, sizeof (NT_FD_INFO));\r
   if (gFdInfo == NULL) {\r
     SecPrint ("ERROR : Can not allocate memory for %S.  Exiting.\n", FirmwareVolumesStr);\r
@@ -291,7 +291,7 @@ Returns:
     }\r
 \r
     //\r
-    // Open the FD and remmeber where it got mapped into our processes address space\r
+    // Open the FD and remember where it got mapped into our processes address space\r
     //\r
     Status = WinNtOpenFile (\r
               FileName,\r
@@ -307,7 +307,7 @@ Returns:
 \r
     SecPrint ("  FD loaded from");\r
     //\r
-    // printf can't print filenames directly as the \ gets interperted as an\r
+    // printf can't print filenames directly as the \ gets interpreted as an\r
     //  escape character.\r
     //\r
     for (Index2 = 0; FileName[Index2] != '\0'; Index2++) {\r
@@ -385,7 +385,7 @@ Arguments:
   CreationDisposition - The flags to pass to CreateFile().  Use to create new files for\r
                         memory emulation, and exiting files for firmware volume emulation\r
   BaseAddress         - The base address of the mapped file in the user address space.\r
-                         If passed in as NULL the new memory region is used.\r
+                         If passed in as NULL the new memory region is used.\r
                          If passed in as non NULL the request memory region is used for\r
                           the mapping of the file into the process space.\r
   Length              - The size of the mapped region in bytes\r
@@ -701,7 +701,7 @@ SecWinNtPeiAutoScan (
 \r
 Routine Description:\r
   This service is called from Index == 0 until it returns EFI_UNSUPPORTED.\r
-  It allows discontiguous memory regions to be supported by the emulator.\r
+  It allows discontinuous memory regions to be supported by the emulator.\r
   It uses gSystemMemory[] and gSystemMemoryCount that were created by\r
   parsing PcdWinNtMemorySizeForSecMain value.\r
   The size comes from the Pcd value and the address comes from the memory space \r
@@ -746,7 +746,7 @@ SecWinNtWinNtThunkAddress (
 Routine Description:\r
   Since the SEC is the only Windows program in stack it must export\r
   an interface to do Win API calls. That's what the WinNtThunk address\r
-  is for. gWinNt is initailized in WinNtThunk.c.\r
+  is for. gWinNt is initialized in WinNtThunk.c.\r
 \r
 Arguments:\r
   InterfaceSize - sizeof (EFI_WIN_NT_THUNK_PROTOCOL);\r
@@ -799,7 +799,7 @@ Returns:
     return Status;\r
   }\r
   //\r
-  // Allocate space in NT (not emulator) memory with ReadWrite and Execute attribue. \r
+  // Allocate space in NT (not emulator) memory with ReadWrite and Execute attribute. \r
   // Extra space is for alignment\r
   //\r
   ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS) (UINTN) VirtualAlloc (NULL, (SIZE_T) (ImageContext.ImageSize + (ImageContext.SectionAlignment * 2)), MEM_COMMIT, PAGE_EXECUTE_READWRITE);\r
@@ -807,7 +807,7 @@ Returns:
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
-  // Align buffer on section boundry\r
+  // Align buffer on section boundary\r
   //\r
   ImageContext.ImageAddress += ImageContext.SectionAlignment - 1;\r
   ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1);\r
@@ -853,7 +853,7 @@ Arguments:
 \r
 Returns:\r
   EFI_SUCCESS     - Return the Base address and size of the FV\r
-  EFI_UNSUPPORTED - Index does nto map to an FD in the system\r
+  EFI_UNSUPPORTED - Index does not map to an FD in the system\r
 \r
 --*/\r
 {\r
@@ -956,28 +956,28 @@ Returns:
 }\r
 \r
 UINTN\r
-CountSeperatorsInString (\r
+CountSeparatorsInString (\r
   IN  CONST CHAR16   *String,\r
-  IN  CHAR16         Seperator\r
+  IN  CHAR16         Separator\r
   )\r
 /*++\r
 \r
 Routine Description:\r
-  Count the number of seperators in String\r
+  Count the number of separators in String\r
 \r
 Arguments:\r
   String    - String to process\r
-  Seperator - Item to count\r
+  Separator - Item to count\r
 \r
 Returns:\r
-  Number of Seperator in String\r
+  Number of Separator in String\r
 \r
 --*/\r
 {\r
   UINTN Count;\r
 \r
   for (Count = 0; *String != '\0'; String++) {\r
-    if (*String == Seperator) {\r
+    if (*String == Separator) {\r
       Count++;\r
     }\r
   }\r
@@ -1010,7 +1010,7 @@ SecNt32PeCoffRelocateImage (
   // If we load our own PE COFF images the Windows debugger can not source\r
   //  level debug our code. If a valid PDB pointer exists usw it to load\r
   //  the *.dll file as a library using Windows* APIs. This allows \r
-  //  source level debug. The image is still loaded and reloaced\r
+  //  source level debug. The image is still loaded and relocated\r
   //  in the Framework memory space like on a real system (by the code above),\r
   //  but the entry point points into the DLL loaded by the code bellow. \r
   //\r
@@ -1055,11 +1055,11 @@ SecNt32PeCoffRelocateImage (
     if (Library != NULL) {\r
       //\r
       // InitializeDriver is the entry point we put in all our EFI DLL's. The\r
-      // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() supresses the \r
+      // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() suppresses the \r
       // normal DLL entry point of DllMain, and prevents other modules that are\r
       // referenced in side the DllFileName from being loaded. There is no error \r
       // checking as the we can point to the PE32 image loaded by Tiano. This \r
-      // step is only needed for source level debuging\r
+      // step is only needed for source level debugging\r
       //\r
       DllEntryPoint = (VOID *) (UINTN) GetProcAddress (Library, "InitializeDriver");\r
 \r
@@ -1103,7 +1103,7 @@ SecTemporaryRamSupport (
   )\r
 {\r
   //\r
-  // Migrate the whole temporary memory to permenent memory.\r
+  // Migrate the whole temporary memory to permanent memory.\r
   // \r
   CopyMem (\r
     (VOID*)(UINTN)PermanentMemoryBase, \r
@@ -1113,8 +1113,8 @@ SecTemporaryRamSupport (
 \r
   //\r
   // SecSwitchStack function must be invoked after the memory migration\r
-  // immediatly, also we need fixup the stack change caused by new call into \r
-  // permenent memory.\r
+  // immediately, also we need fixup the stack change caused by new call into \r
+  // permanent memory.\r
   // \r
   SecSwitchStack (\r
     (UINT32) TemporaryMemoryBase,\r
@@ -1123,7 +1123,7 @@ SecTemporaryRamSupport (
 \r
   //\r
   // We need *not* fix the return address because currently, \r
-  // The PeiCore is excuted in flash.\r
+  // The PeiCore is executed in flash.\r
   //\r
 \r
   //\r