From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DB0501A1E60 for ; Wed, 19 Oct 2016 00:51:01 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP; 19 Oct 2016 00:51:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,513,1473145200"; d="scan'208";a="21235084" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 19 Oct 2016 00:51:00 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 19 Oct 2016 00:51:00 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 19 Oct 2016 00:51:00 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.209]) by shsmsx102.ccr.corp.intel.com ([169.254.2.206]) with mapi id 14.03.0248.002; Wed, 19 Oct 2016 15:50:56 +0800 From: "Ni, Ruiyu" To: Gary Lin , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 24/33] Nt32Pkg: Fix typos in comments and variables Thread-Index: AQHSKdbtKoGhuP5V0UWxRR5SFJpqcqCvZ1mg Date: Wed, 19 Oct 2016 07:50:56 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E38839@SHSMSX104.ccr.corp.intel.com> References: <20161019070138.16424-1-glin@suse.com> <20161019070138.16424-25-glin@suse.com> In-Reply-To: <20161019070138.16424-25-glin@suse.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 24/33] Nt32Pkg: Fix typos in comments and variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 07:51:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Gary Lin > Sent: Wednesday, October 19, 2016 3:01 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: [edk2] [PATCH 24/33] Nt32Pkg: Fix typos in comments and variable= s >=20 > - discontiguous -> discontinuous > - reloaced -> relocated > - supresses -> suppresses > - debuging -> debugging > - suported -> supported > - availble -> available > - environmemt -> environment > - Seperator -> Separator > - remmeber -> remember > - interperted -> interpreted > - the a new -> the new > - initailized -> initialized > - attribue -> attribute > - boundry -> boundary > - nto -> not > - permenent -> permanent > - immediatly -> immediately > - excuted -> executed >=20 > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Gary Lin > --- > Nt32Pkg/Include/Ppi/NtAutoscan.h = | 2 +- >=20 > Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLi > b.c | 8 ++-- > Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLib. > c | 6 +-- > Nt32Pkg/Sec/SecMain.c = | 50 ++++++++++---------- > Nt32Pkg/Sec/SecMain.h = | 6 +-- > Nt32Pkg/Sec/WinNtThunk.c = | 2 +- > Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c = | 2 +- > 7 files changed, 38 insertions(+), 38 deletions(-) >=20 > diff --git a/Nt32Pkg/Include/Ppi/NtAutoscan.h > b/Nt32Pkg/Include/Ppi/NtAutoscan.h > index 49c0294..1891bb4 100644 > --- a/Nt32Pkg/Include/Ppi/NtAutoscan.h > +++ b/Nt32Pkg/Include/Ppi/NtAutoscan.h > @@ -41,7 +41,7 @@ EFI_STATUS >=20 > Routine Description: > This service is called from Index =3D=3D 0 until it returns EFI_UNSUPP= ORTED. > - It allows discontiguous memory regions to be supported by the emulator= . > + It allows discontinuous memory regions to be supported by the emulator= . > It uses gSystemMemory[] and gSystemMemoryCount that were created by > parsing the Windows environment variable EFI_MEMORY_SIZE. > The size comes from the varaible and the address comes from the call t= o > diff --git > a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraAction > Lib.c > b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActio > nLib.c > index 524d6c0..2f62d65 100644 > --- > a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraAction > Lib.c > +++ > b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActi > +++ onLib.c > @@ -290,7 +290,7 @@ PeCoffLoaderRelocateImageExtraAction ( > // If we load our own PE COFF images the Windows debugger can not > source > // level debug our code. If a valid PDB pointer exists usw it to load > // the *.dll file as a library using Windows* APIs. This allows > - // source level debug. The image is still loaded and reloaced > + // source level debug. The image is still loaded and relocated > // in the Framework memory space like on a real system (by the code > above), > // but the entry point points into the DLL loaded by the code bellow. > // > @@ -335,11 +335,11 @@ PeCoffLoaderRelocateImageExtraAction ( > if (Library !=3D NULL) { > // > // InitializeDriver is the entry point we put in all our EFI DLL's= . The > - // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > supresses the > + // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > + suppresses the > // normal DLL entry point of DllMain, and prevents other modules t= hat > are > // referenced in side the DllFileName from being loaded. There is = no error > // checking as the we can point to the PE32 image loaded by Tiano.= This > - // step is only needed for source level debuging > + // step is only needed for source level debugging > // > DllEntryPoint =3D (VOID *) (UINTN) mWinNt->GetProcAddress (Library= , > "InitializeDriver"); >=20 > @@ -355,7 +355,7 @@ PeCoffLoaderRelocateImageExtraAction ( > DEBUG ((EFI_D_ERROR, "WARNING: DLL already loaded. No source le= vel > debug %s. \n", DllFileName)); > } else { > // > - // This DLL is not already loaded, so source level debugging is = suported. > + // This DLL is not already loaded, so source level debugging is = supported. > // > ImageContext->EntryPoint =3D (EFI_PHYSICAL_ADDRESS) (UINTN) > DllEntryPoint; > DEBUG ((EFI_D_INFO, "LoadLibraryEx (%s,\n NULL, > DONT_RESOLVE_DLL_REFERENCES)\n", DllFileName)); > diff --git > a/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLi > b.c > b/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLi > b.c > index b05834e..682446a 100644 > --- > a/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActionLi > b.c > +++ > b/Nt32Pkg/Library/PeiNt32PeCoffExtraActionLib/PeiNt32PeCoffExtraActi > +++ onLib.c > @@ -155,7 +155,7 @@ PeCoffLoaderRelocateImageExtraAction ( > // If we load our own PE COFF images the Windows debugger can not > source > // level debug our code. If a valid PDB pointer exists usw it to load > // the *.dll file as a library using Windows* APIs. This allows > - // source level debug. The image is still loaded and reloaced > + // source level debug. The image is still loaded and relocated > // in the Framework memory space like on a real system (by the code > above), > // but the entry point points into the DLL loaded by the code bellow. > // > @@ -200,11 +200,11 @@ PeCoffLoaderRelocateImageExtraAction ( > if (Library !=3D NULL) { > // > // InitializeDriver is the entry point we put in all our EFI DLL's= . The > - // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > supresses the > + // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > + suppresses the > // normal DLL entry point of DllMain, and prevents other modules t= hat > are > // referenced in side the DllFileName from being loaded. There is = no error > // checking as the we can point to the PE32 image loaded by Tiano.= This > - // step is only needed for source level debuging > + // step is only needed for source level debugging > // > DllEntryPoint =3D (VOID *) (UINTN) mWinNt->GetProcAddress (Library= , > "InitializeDriver"); >=20 > diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c index > e9f72df..80539fa 100644 > --- a/Nt32Pkg/Sec/SecMain.c > +++ b/Nt32Pkg/Sec/SecMain.c > @@ -22,7 +22,7 @@ Abstract: > will be, how may FD's will be loaded and also what the boot mode is. >=20 > The SEC registers a set of services with the SEC core. gPrivateDispatc= hTable > - is a list of PPI's produced by the SEC that are availble for usage in = PEI. > + is a list of PPI's produced by the SEC that are available for usage in= PEI. >=20 > This code produces 128 K of temporary memory for the PEI stack by dire= ctly > allocate memory space with ReadWrite and Execute attribute. > @@ -161,7 +161,7 @@ Routine Description: > Arguments: > Argc - Number of command line arguments > Argv - Array of command line argument strings > - Envp - Array of environmemt variable strings > + Envp - Array of environment variable strings >=20 > Returns: > 0 - Normal exit > @@ -228,7 +228,7 @@ Returns: > // > // Allocate space for gSystemMemory Array > // > - gSystemMemoryCount =3D CountSeperatorsInString (MemorySizeStr, '!') += 1; > + gSystemMemoryCount =3D CountSeparatorsInString (MemorySizeStr, '!') + > + 1; > gSystemMemory =3D calloc (gSystemMemoryCount, sizeof > (NT_SYSTEM_MEMORY)); > if (gSystemMemory =3D=3D NULL) { > SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", > MemorySizeStr); @@ -237,7 +237,7 @@ Returns: > // > // Allocate space for gSystemMemory Array > // > - gFdInfoCount =3D CountSeperatorsInString (FirmwareVolumesStr, '!') + = 1; > + gFdInfoCount =3D CountSeparatorsInString (FirmwareVolumesStr, '!') + > + 1; > gFdInfo =3D calloc (gFdInfoCount, sizeof (NT_FD_INFO)); > if (gFdInfo =3D=3D NULL) { > SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", > FirmwareVolumesStr); @@ -291,7 +291,7 @@ Returns: > } >=20 > // > - // Open the FD and remmeber where it got mapped into our processes > address space > + // Open the FD and remember where it got mapped into our processes > + address space > // > Status =3D WinNtOpenFile ( > FileName, > @@ -307,7 +307,7 @@ Returns: >=20 > SecPrint (" FD loaded from"); > // > - // printf can't print filenames directly as the \ gets interperted a= s an > + // printf can't print filenames directly as the \ gets interpreted > + as an > // escape character. > // > for (Index2 =3D 0; FileName[Index2] !=3D '\0'; Index2++) { @@ -385,7= +385,7 > @@ Arguments: > CreationDisposition - The flags to pass to CreateFile(). Use to creat= e new > files for > memory emulation, and exiting files for firmware= volume > emulation > BaseAddress - The base address of the mapped file in the user = address > space. > - If passed in as NULL the a new memory region is= used. > + If passed in as NULL the new memory region is u= sed. > If passed in as non NULL the request memory reg= ion is used for > the mapping of the file into the process space= . > Length - The size of the mapped region in bytes > @@ -701,7 +701,7 @@ SecWinNtPeiAutoScan ( >=20 > Routine Description: > This service is called from Index =3D=3D 0 until it returns EFI_UNSUPP= ORTED. > - It allows discontiguous memory regions to be supported by the emulator= . > + It allows discontinuous memory regions to be supported by the emulator= . > It uses gSystemMemory[] and gSystemMemoryCount that were created by > parsing PcdWinNtMemorySizeForSecMain value. > The size comes from the Pcd value and the address comes from the > memory space @@ -746,7 +746,7 @@ SecWinNtWinNtThunkAddress > ( Routine Description: > Since the SEC is the only Windows program in stack it must export > an interface to do Win API calls. That's what the WinNtThunk address > - is for. gWinNt is initailized in WinNtThunk.c. > + is for. gWinNt is initialized in WinNtThunk.c. >=20 > Arguments: > InterfaceSize - sizeof (EFI_WIN_NT_THUNK_PROTOCOL); @@ -799,7 +799,7 > @@ Returns: > return Status; > } > // > - // Allocate space in NT (not emulator) memory with ReadWrite and > Execute attribue. > + // Allocate space in NT (not emulator) memory with ReadWrite and > Execute attribute. > // Extra space is for alignment > // > ImageContext.ImageAddress =3D (EFI_PHYSICAL_ADDRESS) (UINTN) > VirtualAlloc (NULL, (SIZE_T) (ImageContext.ImageSize + > (ImageContext.SectionAlignment * 2)), MEM_COMMIT, > PAGE_EXECUTE_READWRITE); @@ -807,7 +807,7 @@ Returns: > return EFI_OUT_OF_RESOURCES; > } > // > - // Align buffer on section boundry > + // Align buffer on section boundary > // > ImageContext.ImageAddress +=3D ImageContext.SectionAlignment - 1; > ImageContext.ImageAddress &=3D > ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1); @@ -853,7 > +853,7 @@ Arguments: >=20 > Returns: > EFI_SUCCESS - Return the Base address and size of the FV > - EFI_UNSUPPORTED - Index does nto map to an FD in the system > + EFI_UNSUPPORTED - Index does not map to an FD in the system >=20 > --*/ > { > @@ -956,28 +956,28 @@ Returns: > } >=20 > UINTN > -CountSeperatorsInString ( > +CountSeparatorsInString ( > IN CONST CHAR16 *String, > - IN CHAR16 Seperator > + IN CHAR16 Separator > ) > /*++ >=20 > Routine Description: > - Count the number of seperators in String > + Count the number of separators in String >=20 > Arguments: > String - String to process > - Seperator - Item to count > + Separator - Item to count >=20 > Returns: > - Number of Seperator in String > + Number of Separator in String >=20 > --*/ > { > UINTN Count; >=20 > for (Count =3D 0; *String !=3D '\0'; String++) { > - if (*String =3D=3D Seperator) { > + if (*String =3D=3D Separator) { > Count++; > } > } > @@ -1010,7 +1010,7 @@ SecNt32PeCoffRelocateImage ( > // If we load our own PE COFF images the Windows debugger can not > source > // level debug our code. If a valid PDB pointer exists usw it to load > // the *.dll file as a library using Windows* APIs. This allows > - // source level debug. The image is still loaded and reloaced > + // source level debug. The image is still loaded and relocated > // in the Framework memory space like on a real system (by the code > above), > // but the entry point points into the DLL loaded by the code bellow. > // > @@ -1055,11 +1055,11 @@ SecNt32PeCoffRelocateImage ( > if (Library !=3D NULL) { > // > // InitializeDriver is the entry point we put in all our EFI DLL's= . The > - // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > supresses the > + // DONT_RESOLVE_DLL_REFERENCES argument to LoadLIbraryEx() > + suppresses the > // normal DLL entry point of DllMain, and prevents other modules t= hat > are > // referenced in side the DllFileName from being loaded. There is = no error > // checking as the we can point to the PE32 image loaded by Tiano.= This > - // step is only needed for source level debuging > + // step is only needed for source level debugging > // > DllEntryPoint =3D (VOID *) (UINTN) GetProcAddress (Library, > "InitializeDriver"); >=20 > @@ -1103,7 +1103,7 @@ SecTemporaryRamSupport ( > ) > { > // > - // Migrate the whole temporary memory to permenent memory. > + // Migrate the whole temporary memory to permanent memory. > // > CopyMem ( > (VOID*)(UINTN)PermanentMemoryBase, > @@ -1113,8 +1113,8 @@ SecTemporaryRamSupport ( >=20 > // > // SecSwitchStack function must be invoked after the memory migration > - // immediatly, also we need fixup the stack change caused by new call = into > - // permenent memory. > + // immediately, also we need fixup the stack change caused by new > + call into // permanent memory. > // > SecSwitchStack ( > (UINT32) TemporaryMemoryBase, > @@ -1123,7 +1123,7 @@ SecTemporaryRamSupport ( >=20 > // > // We need *not* fix the return address because currently, > - // The PeiCore is excuted in flash. > + // The PeiCore is executed in flash. > // >=20 > // > diff --git a/Nt32Pkg/Sec/SecMain.h b/Nt32Pkg/Sec/SecMain.h index > 76522e3..8b19878 100644 > --- a/Nt32Pkg/Sec/SecMain.h > +++ b/Nt32Pkg/Sec/SecMain.h > @@ -524,9 +524,9 @@ Returns: > ; >=20 > UINTN > -CountSeperatorsInString ( > +CountSeparatorsInString ( > IN CONST CHAR16 *String, > - IN CHAR16 Seperator > + IN CHAR16 Separator > ) > /*++ >=20 > @@ -537,7 +537,7 @@ Routine Description: > Arguments: >=20 > String - TODO: add argument description > - Seperator - TODO: add argument description > + Separator - TODO: add argument description >=20 > Returns: >=20 > diff --git a/Nt32Pkg/Sec/WinNtThunk.c b/Nt32Pkg/Sec/WinNtThunk.c index > 9ab380c..3159ef4 100644 > --- a/Nt32Pkg/Sec/WinNtThunk.c > +++ b/Nt32Pkg/Sec/WinNtThunk.c > @@ -42,7 +42,7 @@ Abstract: > // point could be modified dynamically. The SEC does not do that, so we > must // disable the warning so we can compile the SEC. The previous > method was to // asign each element in code. The disadvantage to that > approach is it's harder -// to tell if all the elements have been initai= lized > properly. > +// to tell if all the elements have been initialized properly. > // > #pragma warning(disable : 4232) > #pragma warning(disable : 4996) > diff --git a/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c > b/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c > index 20774ee..8cd9188 100644 > --- a/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c > +++ b/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c > @@ -48,7 +48,7 @@ Routine Description: > Perform a call-back into the SEC simulator to get address of the Firmw= are > Hub >=20 > Arguments: > - FfsHeader - Ffs Header availible to every PEIM > + FfsHeader - Ffs Header available to every PEIM > PeiServices - General purpose services available to every PEIM. >=20 > Returns: > -- > 2.10.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel