Various typo in BaseTools.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Liming Gao <liming.gao@intel.com>
#\r
# armcc_wrapper.py ToolToExec [command line to convert]\r
#\r
-# anthing with the / will be converted via cygpath cygwin call or manually.\r
+# anything with the / will be converted via cygpath cygwin call or manually.\r
# -I/cygpath/c/example is a special case as you can not pass -I to cygpath\r
#\r
# ExceptionList if a tool takes an argument with a / add it to the exception list\r
<xs:documentation xml:lang="en-us">\r
The UserExtensions section is used to disseminate processing\r
instructions that may be custom to the content provided by the distribution. This section\r
- contains information that is common to all aspects of this disribution.\r
+ contains information that is common to all aspects of this distribution.\r
</xs:documentation>\r
</xs:annotation>\r
</xs:element>\r
important to reflect the present state of the matter\r
</xs:documentation>\r
<xs:documentation xml:lang="en-us">\r
- #2 Added definition/enumeration of UNDEFIND type 2 is\r
+ #2 Added definition/enumeration of UNDEFINED type 2 is\r
important since there is a large body of legacy code for which the GUID’s and other\r
code/data objects were not decorated with their usage. This document will allow for\r
importing today’s source artifacts and producing decorations using the ‘Undefined’ versus\r
</xs:sequence>\r
</xs:complexType>\r
</xs:element>\r
- <!-- End of PackageSurfaceArea PackageIncluces element. -->\r
+ <!-- End of PackageSurfaceArea PackageIncludes element. -->\r
\r
<xs:element minOccurs="0" maxOccurs="1" name="Modules">\r
<xs:complexType>\r
<xs:annotation>\r
<xs:documentation xml:lang="en-us">\r
The PCD must be within a\r
- specifed range of numeric values. Restricted to C style\r
- Relational, Equality and Logicial Operators and parenthesis\r
+ specified range of numeric values. Restricted to C style\r
+ Relational, Equality and Logical Operators and parenthesis\r
are valid. Only the CName for this PCD is permitted in the\r
ValidValueRange expression. All other values must be\r
numeric.\r
<xs:documentation xml:lang="en-us">\r
This string should be\r
defined by specifications. There are pre-defined error\r
- number ranges in the UEFI/PI specificaiton.\r
+ number ranges in the UEFI/PI specification.\r
</xs:documentation>\r
</xs:annotation>\r
<xs:complexType>\r
<xs:annotation>\r
<xs:documentation xml:lang="en-us">\r
The module will change the\r
- boot mode on some exection paths.\r
+ boot mode on some execution paths.\r
</xs:documentation>\r
</xs:annotation>\r
</xs:enumeration>\r
<xs:anyAttribute processContents="lax"/>\r
</xs:complexType>\r
</xs:element>\r
- <!-- The following elsements are common definitions used with the ref attribute for elements. -->\r
+ <!-- The following elements are common definitions used with the ref attribute for elements. -->\r
\r
<xs:element name="HelpText">\r
<xs:complexType>\r
# $(FV_DIR) Directory to store flash image files\r
# $(INC) Search path of current module\r
# $(NASM_INC) Search nasm file path of current module\r
-# $(INC_LIST) A file containing search pathes of current module\r
+# $(INC_LIST) A file containing search paths of current module\r
# $(LIBS) Static library files of current module\r
# $(<tool>_FLAGS) Tools flags of current module\r
# $(MODULE_NAME) Current module name\r
$(OBJCOPY) --strip-unneeded -R .eh_frame ${src}\r
\r
#\r
- #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly\r
+ #The below 2 lines are only needed for UNIXGCC tool chain, which generates PE image directly\r
#\r
-$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}\r
-$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug\r
# One, or more, of the following, IA32, IPF, X64, EBC, ARM\r
# or AArch64.\r
# Multiple values can be specified on a single line, using\r
-# space charaters to separate the values. These are used\r
+# space characters to separate the values. These are used\r
# during the parsing of a platform description file, \r
# restricting the build output target(s.)\r
# The Build Target ARCH is determined by (precedence high to low):\r
\r
\r
# Note: The Intel C++ Compiler 11.1 uses different installation path from previous versions\r
-# We use "ICC11" tag for ICC 11.1 while "ICC" tag is dedicated for eariler versions\r
+# We use "ICC11" tag for ICC 11.1 while "ICC" tag is dedicated for earlier versions\r
#\r
DEFINE ICC11_VERSION = 11.1\r
DEFINE ICC11_BUILD = 072\r
*_RVCTCYGWIN_ARM_FROMELF_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py\r
\r
#################\r
-# ASM 16 linker defintions\r
+# ASM 16 linker definitions\r
#################\r
*_*_*_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe\r
*_*_*_ASMLINK_FLAGS = /nologo /tiny\r
##################\r
# Rsa2048Sha256Sign tool definitions\r
#\r
-# Notes: This tool defintion uses a test signing key for development purposes only.\r
+# Notes: This tool definition uses a test signing key for development purposes only.\r
# The tool Rsa2048Sha256GenerateKeys can be used to generate a new private/public key\r
# and the gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer PCD value.\r
# A custom tool/script can be implemented using the new private/public key with\r
-# the Rsa2048Sha256Sign tool and this tool defintiion can be updated to use a\r
+# the Rsa2048Sha256Sign tool and this tool definition can be updated to use a\r
# custom tool/script.\r
#\r
# Generate new private/public key and gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer PCD value\r
This directory contains the next generation of EDK II build tools and template files.\r
Templates are located in the Conf directory, while the tools executables for\r
Microsoft Windows 32-bit Operating Systems are located in the Bin\Win32 directory, other\r
-directory contatins tools source.\r
+directory contains tools source.\r
\r
1. Build step to generate the binary tools.\r
\r
# This script will modife the C/Include/Common/BuildVersion.h file and the two\r
# Python scripts, Python/Common/BuildVersion.py and Python/UPT/BuildVersion.py.\r
# If SVN is available, the tool will obtain the current checked out version of\r
-# the source tree for including the the --version commands.\r
+# the source tree for including the --version commands.\r
\r
# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
#\r
\r
\r
def ShellCommandResults(CmdLine, Opt):\r
- """ Execute the comand, returning the output content """\r
+ """ Execute the command, returning the output content """\r
file_list = NamedTemporaryFile(delete=False)\r
filename = file_list.name\r
Results = []\r
ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER && \\r
ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER) {\r
//\r
- // upsupported PeImage subsystem type\r
+ // unsupported PeImage subsystem type\r
//\r
return RETURN_UNSUPPORTED;\r
}\r
// In Te image header there is not a field to describe the ImageSize.\r
// Actually, the ImageSize equals the RVA plus the VirtualSize of\r
// the last section mapped into memory (Must be rounded up to\r
- // a mulitple of Section Alignment). Per the PE/COFF specification, the\r
+ // a multiple of Section Alignment). Per the PE/COFF specification, the\r
// section headers in the Section Table must appear in order of the RVA\r
// values for the corresponding sections. So the ImageSize can be determined\r
// by the RVA and the VirtualSize of the last section header in the\r
break;\r
default:\r
//\r
- // For unknow Machine field, use Magic in optional Header\r
+ // For unknown Machine field, use Magic in optional Header\r
//\r
Magic = Hdr.Pe32->OptionalHeader.Magic;\r
}\r
)\r
{\r
//\r
- // skip preceeding white space\r
+ // skip preceding white space\r
//\r
while ((*Str != 0) && *Str == L' ') {\r
Str ++;\r
}\r
//\r
- // skip preceeding zeros\r
+ // skip preceding zeros\r
//\r
while ((*Str != 0) && *Str == L'0') {\r
Str ++;\r
/** @file\r
-CalcuateCrc32 routine.\r
+CalculateCrc32 routine.\r
\r
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
\r
Arguments:\r
\r
- Data - The buffer contaning the data to be processed\r
+ Data - The buffer containing the data to be processed\r
DataSize - The size of data to be processed\r
CrcOut - A pointer to the caller allocated UINT32 that on\r
contains the CRC32 checksum of Data\r
/** @file\r
-Header file for CalcuateCrc32 routine\r
+Header file for CalculateCrc32 routine\r
\r
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
\r
Arguments:\r
\r
- Data - The buffer contaning the data to be processed\r
+ Data - The buffer containing the data to be processed\r
DataSize - The size of data to be processed\r
CrcOut - A pointer to the caller allocated UINT32 that on\r
contains the CRC32 checksum of Data\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
+ EFI_SUCCESS - Decompression is successful\r
EFI_INVALID_PARAMETER - The source data is corrupted\r
\r
--*/\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
+ EFI_SUCCESS - Decompression is successful\r
EFI_INVALID_PARAMETER - The source data is corrupted\r
\r
--*/\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
+ EFI_SUCCESS - Decompression is successful\r
EFI_INVALID_PARAMETER - The source data is corrupted\r
\r
--*/\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
+ EFI_SUCCESS - Decompression is successful\r
EFI_INVALID_PARAMETER - The source data is corrupted\r
\r
**/\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
+ EFI_SUCCESS - Decompression is successful\r
EFI_INVALID_PARAMETER - The source data is corrupted\r
\r
**/\r
\r
Allocate memory spaces for data structures used in compression process\r
\r
-Argements: (VOID)\r
+Arguments: (VOID)\r
\r
Returns:\r
\r
\r
//\r
// We have just got a long match, the target tree\r
- // can be located by MatchPos + 1. Travese the tree\r
+ // can be located by MatchPos + 1. Traverse the tree\r
// from bottom up to get to a proper starting point.\r
// The usage of PERC_FLAG ensures proper node deletion\r
// in DeleteNode() later.\r
\r
Outputs rightmost n bits of x\r
\r
-Argments:\r
+Arguments:\r
\r
n - the rightmost n bits of the data is used\r
x - the data\r
#include "EfiUtilityMsgs.h"\r
\r
//\r
-// Declare module globals for keeping track of the the utility's\r
+// Declare module globals for keeping track of the utility's\r
// name and other settings.\r
//\r
STATIC STATUS mStatus = STATUS_SUCCESS;\r
at least something valid is not specified.\r
\r
FileName - name of the file or application. If not specified, then the\r
- utilty name (as set by the utility calling SetUtilityName()\r
+ utility name (as set by the utility calling SetUtilityName()\r
earlier) is used. Otherwise "Unknown utility" is used.\r
\r
LineNumber - the line number of error, typically used by parsers. If the\r
Arguments:\r
Type - "warning" or "error" string to insert into the message to be\r
printed. The first character of this string (converted to uppercase)\r
- is used to preceed the MessageCode value in the output string.\r
+ is used to precede the MessageCode value in the output string.\r
\r
FileName - name of the file where the warning was detected, or the name\r
of the application that detected the warning\r
\r
Arguments:\r
UtilityName - name of the utility, which will be printed with all\r
- error/warning/debug messags.\r
+ error/warning/debug messages.\r
\r
Returns:\r
NA\r
Arguments:\r
\r
FileType Type of file to search for.\r
- Instance Instace of the file type to return.\r
+ Instance Instance of the file type to return.\r
File Return pointer. In the case of an error, contents are undefined.\r
\r
Returns:\r
\r
File The file to search.\r
SectionType Type of file to search for.\r
- Instance Instace of the section to return.\r
+ Instance Instance of the section to return.\r
Section Return pointer. In the case of an error, contents are undefined.\r
\r
Returns:\r
Arguments:\r
\r
OldPath Path name of replace the final segment\r
- Peer The new path name to concatinate to become the peer path\r
+ Peer The new path name to concatenate to become the peer path\r
\r
Returns:\r
\r
Arguments:\r
\r
OldPath Path name of replace the final segment\r
- Peer The new path name to concatinate to become the peer path\r
+ Peer The new path name to concatenate to become the peer path\r
\r
Returns:\r
\r
} GUID_SEC_TOOL_ENTRY;\r
\r
//\r
-// Functin Implementation\r
+// Function Implementation\r
//\r
\r
EFI_HANDLE\r
CHAR8 *Delimiter;\r
BOOLEAN ParseError;\r
BOOLEAN ReadError;\r
- UINTN Occurrance;\r
+ UINTN Occurrence;\r
\r
//\r
// Check input parameters\r
//\r
// Initialize our instance counter for the search token\r
//\r
- Occurrance = 0;\r
+ Occurrence = 0;\r
\r
if (FindSection (InputFile, Section)) {\r
//\r
//\r
// Check if it is the correct instance\r
//\r
- if (Instance == Occurrance) {\r
+ if (Instance == Occurrence) {\r
//\r
// Copy the contents following the =\r
//\r
}\r
} else {\r
//\r
- // Increment the occurrance found\r
+ // Increment the occurrence found\r
//\r
- Occurrance++;\r
+ Occurrence++;\r
}\r
}\r
} while (\r
!ReadError &&\r
InputFile->CurrentFilePointer < InputFile->Eof &&\r
CurrentToken[0] != '[' &&\r
- Occurrance <= Instance\r
+ Occurrence <= Instance\r
);\r
}\r
//\r
Routine Description:\r
\r
Converts a null terminated ascii string that represents a number into a\r
- UINT64 value. A hex number may be preceeded by a 0x, but may not be\r
+ UINT64 value. A hex number may be preceded by a 0x, but may not be\r
succeeded by an h. A number without 0x or 0X is considered to be base 10\r
unless the IsHex input is true.\r
\r
Routine Description:\r
\r
Converts a null terminated ascii string that represents a number into a\r
- UINT64 value. A hex number may be preceeded by a 0x, but may not be\r
+ UINT64 value. A hex number may be preceded by a 0x, but may not be\r
succeeded by an h. A number without 0x or 0X is considered to be base 10\r
unless the IsHex input is true.\r
\r
}\r
\r
//\r
- // Check Input paramters\r
+ // Check Input parameters\r
//\r
if (*InputFileName == NULL) {\r
fprintf (stderr, "Missing option. Input files is not specified\n");\r
//\r
\r
/**\r
- Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and\r
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruction and\r
return the immediate data encoded in the instruction\r
\r
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
Update an ARM MOVT or MOVW immediate instruction immediate data.\r
\r
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
- @param Address New addres to patch into the instruction\r
+ @param Address New address to patch into the instruction\r
\r
**/\r
VOID\r
\r
\r
/**\r
- Pass in a pointer to an ARM MOVW/MOVT instruciton pair and\r
+ Pass in a pointer to an ARM MOVW/MOVT instruction pair and\r
return the immediate data encoded in the two` instruction\r
\r
- @param Instructions Pointer to ARM MOVW/MOVT insturction pair\r
+ @param Instructions Pointer to ARM MOVW/MOVT instruction pair\r
\r
@return Immediate address encoded in the instructions\r
\r
Update an ARM MOVW/MOVT immediate instruction instruction pair.\r
\r
@param Instructions Pointer to ARM MOVW/MOVT instruction pair\r
- @param Address New addres to patch into the instructions\r
+ @param Address New address to patch into the instructions\r
**/\r
VOID\r
EFIAPI\r
\r
\r
/**\r
- Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and\r
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruction and\r
return the immediate data encoded in the instruction\r
\r
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
Update an ARM MOVT or MOVW immediate instruction immediate data.\r
\r
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
- @param Address New addres to patch into the instruction\r
+ @param Address New address to patch into the instruction\r
**/\r
VOID\r
ThumbMovtImmediatePatch (\r
{\r
UINT16 Patch;\r
\r
- // First 16-bit chunk of instruciton\r
+ // First 16-bit chunk of instruction\r
Patch = ((Address >> 12) & 0x000f); // imm4\r
Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i\r
*Instruction = (*Instruction & ~0x040f) | Patch;\r
}\r
\r
/**\r
- Pass in a pointer to an ARM MOVW/MOVT instruciton pair and\r
+ Pass in a pointer to an ARM MOVW/MOVT instruction pair and\r
return the immediate data encoded in the two` instruction\r
\r
- @param Instructions Pointer to ARM MOVW/MOVT insturction pair\r
+ @param Instructions Pointer to ARM MOVW/MOVT instruction pair\r
\r
@return Immediate address encoded in the instructions\r
\r
Update an ARM MOVW/MOVT immediate instruction instruction pair.\r
\r
@param Instructions Pointer to ARM MOVW/MOVT instruction pair\r
- @param Address New addres to patch into the instructions\r
+ @param Address New address to patch into the instructions\r
**/\r
VOID\r
EFIAPI\r
FALSE - otherwise\r
\r
Notes:\r
- Preceeding white space is ignored.\r
+ Preceding white space is ignored.\r
The parser's buffer pointer is advanced past the end of the\r
token.\r
\r
// Make sure we didn't exceed our maximum nesting depth\r
//\r
if (NestDepth > MAX_NEST_DEPTH) {\r
- Error (NULL, 0, 3001, "Not Supported", "%s exceeeds max nesting depth (%u)", SourceFile->FileName, (unsigned) NestDepth);\r
+ Error (NULL, 0, 3001, "Not Supported", "%s exceeds max nesting depth (%u)", SourceFile->FileName, (unsigned) NestDepth);\r
Status = STATUS_ERROR;\r
goto Finish;\r
}\r
\r
Arguments:\r
\r
- Strin The string to 'strip'\r
+ String The string to 'strip'\r
\r
Returns:\r
\r
\r
Allocate memory spaces for data structures used in compression process\r
\r
-Argements:\r
+Arguments:\r
VOID\r
\r
Returns:\r
if (mMatchLen >= 4) {\r
//\r
// We have just got a long match, the target tree\r
- // can be located by MatchPos + 1. Travese the tree\r
+ // can be located by MatchPos + 1. Traverse the tree\r
// from bottom up to get to a proper starting point.\r
// The usage of PERC_FLAG ensures proper node deletion\r
// in DeleteNode() later.\r
\r
//\r
// Win32 include files do not compile clean with /W4, so we use the warning\r
-// pragma to suppress the warnings for Win32 only. This way our code can stil\r
+// pragma to suppress the warnings for Win32 only. This way our code can still\r
// compile at /W4 (highest warning level) with /WX (warnings cause build\r
// errors).\r
//\r
}\r
Str16 = (CHAR16 *)malloc(1024);\r
if (Str16 == NULL) {\r
- fprintf(stderr, "Resource, memory cannot be allcoated");\r
+ fprintf(stderr, "Resource, memory cannot be allocated");\r
return STATUS_ERROR;\r
}\r
Ascii2UnicodeString(Str, Str16);\r
all over this file.\r
\r
The only place where multi-instance device paths are supported is in\r
- environment varibles. Multi-instance device paths should never be placed\r
+ environment variables. Multi-instance device paths should never be placed\r
on a Handle.\r
\r
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
all over this file.\r
\r
The only place where multi-instance device paths are supported is in\r
- environment varibles. Multi-instance device paths should never be placed\r
+ environment variables. Multi-instance device paths should never be placed\r
on a Handle.\r
\r
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
ImageCount = 0;\r
for (;;) {\r
//\r
- // Save our postition in the file, since offsets in the headers\r
+ // Save our position in the file, since offsets in the headers\r
// are relative to the particular image.\r
//\r
ImageStart = ftell (InFptr);\r
\r
FileBuffer = (UINT8 *) malloc (FileSize);\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated!");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
fclose (InFile);\r
goto Finish;\r
}\r
// This data array will be located at the base of the Firmware Volume Header (FVH)\r
// in the boot block. It must not exceed 14 bytes of code. The last 2 bytes\r
// will be used to keep the FVH checksum consistent.\r
-// This code will be run in response to a starutp IPI for HT-enabled systems.\r
+// This code will be run in response to a startup IPI for HT-enabled systems.\r
//\r
#define SIZEOF_STARTUP_DATA_ARRAY 0x10\r
\r
case 0:\r
//\r
// 1 byte alignment\r
- //if bit 1 have set, 128K byte alignmnet\r
+ //if bit 1 have set, 128K byte alignment\r
//\r
if (FfsFile->Attributes & FFS_ATTRIB_DATA_ALIGNMENT2) {\r
*Alignment = 17;\r
memcpy ((UINT8 *)PadFile + CurFfsHeaderSize, ExtHeader, ExtHeader->ExtHeaderSize);\r
((EFI_FIRMWARE_VOLUME_HEADER *) FvImage->FileImage)->ExtHeaderOffset = (UINT16) ((UINTN) ((UINT8 *)PadFile + CurFfsHeaderSize) - (UINTN) FvImage->FileImage);\r
//\r
- // Make next file start at QWord Boundry\r
+ // Make next file start at QWord Boundary\r
//\r
while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {\r
FvImage->CurrentFilePointer++;\r
FileBuffer = malloc (FileSize);\r
if (FileBuffer == NULL) {\r
fclose (NewFile);\r
- Error (NULL, 0, 4001, "Resouce", "memory cannot be allocated!");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
return EFI_ABORTED;\r
}\r
//\r
- // Make next file start at QWord Boundry\r
+ // Make next file start at QWord Boundary\r
//\r
while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {\r
FvImage->CurrentFilePointer++;\r
return EFI_ABORTED;\r
}\r
\r
- // Add opcode for an uncondional branch with no link. i.e.: " B SecEntryPoint"\r
+ // Add opcode for an unconditional branch with no link. i.e.: " B SecEntryPoint"\r
ResetVector[0] |= ARMT_UNCONDITIONAL_JUMP_INSTRUCTION;\r
\r
// SWI handler movs pc,lr. Just in case a debugger uses SWI\r
ResetVector[2] = 0xE1B0F07E;\r
\r
// Place holder to support a common interrupt handler from ROM.\r
- // Currently not suppprted. For this to be used the reset vector would not be in this FV\r
+ // Currently not supported. For this to be used the reset vector would not be in this FV\r
// and the exception vectors would be hard coded in the ROM and just through this address\r
// to find a common handler in the a module in the FV.\r
ResetVector[3] = 0;\r
ARMT above has an entry in ResetVector[2] for SWI. The way we are using the ResetVector\r
array at the moment, for AArch64, does not allow us space for this as the header only\r
allows for a fixed amount of bytes at the start. If we are sure that UEFI will live\r
- within the first 4GB of addressable RAM we could potensioally adopt the same ResetVector\r
+ within the first 4GB of addressable RAM we could potentially adopt the same ResetVector\r
layout as above. But for the moment we replace the four 32bit vectors with two 64bit\r
vectors in the same area of the Image heasder. This allows UEFI to start from a 64bit\r
base.\r
Error(NULL, 0, 3000, "Invalid", "SEC Entry point must be within 128MB of the start of the FV");\r
return EFI_ABORTED;\r
}\r
- // Add opcode for an uncondional branch with no link. i.e.: " B SecEntryPoint"\r
+ // Add opcode for an unconditional branch with no link. i.e.: " B SecEntryPoint"\r
ResetVector[0] |= ARM64_UNCONDITIONAL_JUMP_INSTRUCTION;\r
}\r
\r
}\r
\r
//\r
- // Accumlate every FFS file size.\r
+ // Accumulate every FFS file size.\r
//\r
for (Index = 0; FvInfoPtr->FvFiles[Index][0] != 0; Index++) {\r
//\r
}\r
\r
//\r
- // Make next ffs file start at QWord Boundry\r
+ // Make next ffs file start at QWord Boundary\r
//\r
if (FvInfoPtr->IsPiFvImage) {\r
CurrentOffset = (CurrentOffset + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);\r
their base address to the parent image.\r
\r
Arguments:\r
- FvInfo A pointer to FV_INFO struture.\r
+ FvInfo A pointer to FV_INFO structure.\r
FfsFile A pointer to Ffs file image that may contain FvImage.\r
XipOffset The offset address to the parent FvImage base.\r
\r
return EFI_ABORTED;\r
}\r
\r
- // machine type is ARM, set a flag so ARM reset vector procesing occurs\r
+ // machine type is ARM, set a flag so ARM reset vector processing occurs\r
if ((MachineType == EFI_IMAGE_MACHINE_ARMT) || (MachineType == EFI_IMAGE_MACHINE_AARCH64)) {\r
VerboseMsg("Located ARM/AArch64 SEC/PEI core in child FV");\r
mArm = TRUE;\r
\r
Arguments:\r
\r
- FvInfo A pointer to FV_INFO struture.\r
+ FvInfo A pointer to FV_INFO structure.\r
FileName Ffs File PathName\r
FfsFile A pointer to Ffs file image.\r
XipOffset The offset address to use for rebasing the XIP file image.\r
#include "EfiUtilityMsgs.h"\r
\r
//\r
-// Different file separater for Linux and Windows\r
+// Different file separator for Linux and Windows\r
//\r
#define FILE_SEP_CHAR '/'\r
\r
);\r
\r
//\r
-// Rename ELF32 strucutres to common names to help when porting to ELF64.\r
+// Rename ELF32 structures to common names to help when porting to ELF64.\r
//\r
typedef Elf32_Shdr Elf_Shdr;\r
typedef Elf32_Ehdr Elf_Ehdr;\r
mCoffOffset = CoffAlign(mCoffOffset);\r
\r
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {\r
- Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 text section. Source level debug might not work correctly.", mInImageName);\r
+ Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 text section. Source level debug might not work correctly.", mInImageName);\r
}\r
\r
//\r
}\r
\r
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {\r
- Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName);\r
+ Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName);\r
}\r
\r
//\r
\r
default:\r
//\r
- // Ignore for unkown section type.\r
+ // Ignore for unknown section type.\r
//\r
VerboseMsg ("%s unknown section type %x. We ignore this unknown section type.", mInImageName, (unsigned)Shdr->sh_type);\r
break;\r
break;\r
\r
default:\r
- Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations, unkown type %d.", mInImageName, ELF32_R_TYPE (Rel->r_info));\r
+ Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations, unknown type %d.", mInImageName, ELF32_R_TYPE (Rel->r_info));\r
break;\r
}\r
}\r
);\r
\r
//\r
-// Rename ELF32 strucutres to common names to help when porting to ELF64.\r
+// Rename ELF32 structures to common names to help when porting to ELF64.\r
//\r
typedef Elf64_Shdr Elf_Shdr;\r
typedef Elf64_Ehdr Elf_Ehdr;\r
mCoffOffset = CoffAlign(mCoffOffset);\r
\r
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {\r
- Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 text section. Source level debug might not work correctly.", mInImageName);\r
+ Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 text section. Source level debug might not work correctly.", mInImageName);\r
}\r
\r
//\r
}\r
\r
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {\r
- Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName);\r
+ Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName);\r
}\r
\r
//\r
\r
default:\r
//\r
- // Ignore for unkown section type.\r
+ // Ignore for unknown section type.\r
//\r
VerboseMsg ("%s unknown section type %x. We ignore this unknown section type.", mInImageName, (unsigned)Shdr->sh_type);\r
break;\r
} SECTION_FILTER_TYPES;\r
\r
//\r
-// FunctionTalbe\r
+// FunctionTable\r
//\r
typedef struct {\r
VOID (*ScanSections) ();\r
//\r
fprintf (stdout, "Options:\n");\r
fprintf (stdout, " -o FileName, --outputfile FileName\n\\r
- File will be created to store the ouput content.\n");\r
+ File will be created to store the output content.\n");\r
fprintf (stdout, " -e EFI_FILETYPE, --efiImage EFI_FILETYPE\n\\r
Create Efi Image. EFI_FILETYPE is one of BASE,SMM_CORE,\n\\r
PEI_CORE, PEIM, DXE_CORE, DXE_DRIVER, UEFI_APPLICATION,\n\\r
Guid is used to specify hii package list guid.\n\\r
Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\\r
If not specified, the first Form FormSet guid is used.\n");\r
- fprintf (stdout, " --hiipackage Combine all input binary hii pacakges into \n\\r
+ fprintf (stdout, " --hiipackage Combine all input binary hii packages into \n\\r
a single package list as the text resource data(RC).\n\\r
It can't be combined with other action options\n\\r
except for -o option. It is a action option.\n\\r
If it is combined with other action options, the later\n\\r
input action option will override the previous one.\n");\r
- fprintf (stdout, " --hiibinpackage Combine all input binary hii pacakges into \n\\r
+ fprintf (stdout, " --hiibinpackage Combine all input binary hii packages into \n\\r
a single package list as the binary resource section.\n\\r
It can't be combined with other action options\n\\r
except for -o option. It is a action option.\n\\r
if (PeHdr->Pe32.OptionalHeader.SectionAlignment != PeHdr->Pe32.OptionalHeader.FileAlignment) {\r
//\r
// The only reason to expand zero fill sections is to make them compatible with XIP images.\r
- // If SectionAlignment is not equal to FileAlginment then it is not an XIP type image.\r
+ // If SectionAlignment is not equal to FileAlignment then it is not an XIP type image.\r
//\r
return;\r
}\r
goto Finish;\r
}\r
if (LogLevel > 9) {\r
- Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, currnt input level is %d", (int) LogLevel);\r
+ Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, current input level is %d", (int) LogLevel);\r
goto Finish;\r
}\r
SetPrintLevel (LogLevel);\r
VerboseMsg ("Dump the TE header information of the input TE image.");\r
break;\r
case FW_MCI_IMAGE:\r
- VerboseMsg ("Conver input MicroCode.txt file to MicroCode.bin file.");\r
+ VerboseMsg ("Convert input MicroCode.txt file to MicroCode.bin file.");\r
break;\r
case FW_MERGE_IMAGE:\r
VerboseMsg ("Combine the input multi microcode bin files to one bin file.");\r
break;\r
case FW_HII_PACKAGE_LIST_RCIMAGE:\r
- VerboseMsg ("Combine the input multi hii bin packages to one text pacakge list RC file.");\r
+ VerboseMsg ("Combine the input multi hii bin packages to one text package list RC file.");\r
break;\r
case FW_HII_PACKAGE_LIST_BINIMAGE:\r
- VerboseMsg ("Combine the input multi hii bin packages to one binary pacakge list file.");\r
+ VerboseMsg ("Combine the input multi hii bin packages to one binary package list file.");\r
break;\r
case FW_REBASE_IMAGE:\r
VerboseMsg ("Rebase the input image to new base address.");\r
goto Finish;\r
}\r
//\r
- // Get hii package list lenght\r
+ // Get hii package list length\r
//\r
HiiPackageListHeader.PackageLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);\r
for (Index = 0; Index < InputFileNum; Index ++) {\r
goto Finish;\r
}\r
if (memcmp (&HiiPackageListGuid, &mZeroGuid, sizeof (EFI_GUID)) == 0) {\r
- Error (NULL, 0, 3000, "Invalid", "HII pacakge list guid is not specified!");\r
+ Error (NULL, 0, 3000, "Invalid", "HII package list guid is not specified!");\r
goto Finish;\r
}\r
memcpy (&HiiPackageListHeader.PackageListGuid, &HiiPackageListGuid, sizeof (EFI_GUID));\r
\r
if (PeHdr->Pe32.FileHeader.Machine == IMAGE_FILE_MACHINE_ARM) {\r
// Some tools kick out IMAGE_FILE_MACHINE_ARM (0x1c0) vs IMAGE_FILE_MACHINE_ARMT (0x1c2)\r
- // so patch back to the offical UEFI value.\r
+ // so patch back to the official UEFI value.\r
PeHdr->Pe32.FileHeader.Machine = IMAGE_FILE_MACHINE_ARMT;\r
}\r
\r
//\r
memset (SectionHeader->Name, 0, sizeof (SectionHeader->Name));\r
//\r
- // Zero Execption Table\r
+ // Zero Exception Table\r
//\r
Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;\r
Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;\r
memset (RuntimeFunction, 0, sizeof (RUNTIME_FUNCTION));\r
}\r
//\r
- // Zero Execption Table\r
+ // Zero Exception Table\r
//\r
Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;\r
Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;\r
//\r
Buffer = (UINT8 *) malloc ((size_t) TotalLength);\r
if (Buffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Done;\r
}\r
CommonSect = (EFI_COMMON_SECTION_HEADER *) Buffer;\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
FileBuffer = (UINT8 *) malloc (InputLength);\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
\r
FileBuffer = (UINT8 *) malloc (InputLength + Offset);\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// InputLength != 0, but FileBuffer == NULL means out of resources.\r
//\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
goto Finish;\r
}\r
if (LogLevel > 9) {\r
- Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0~9, currnt input level is %d", (int) LogLevel);\r
+ Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0~9, current input level is %d", (int) LogLevel);\r
goto Finish;\r
}\r
SetPrintLevel (LogLevel);\r
if ((InputFileNum == 0) && (InputFileName == NULL)) {\r
InputFileName = (CHAR8 **) malloc (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *));\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
memset (InputFileName, 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));\r
);\r
\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
memset (&(InputFileName[InputFileNum]), 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));\r
DummyFileBuffer = (UINT8 *) malloc (DummyFileSize);\r
if (DummyFileBuffer == NULL) {\r
fclose(DummyFile);\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
\r
DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s and the size is %u bytes", DummyFileName, (unsigned) DummyFileSize);\r
\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
InFile = fopen(LongFilePath(InputFileName[0]), "rb");\r
InFileBuffer = (UINT8 *) malloc (InFileSize);\r
if (InFileBuffer == NULL) {\r
fclose(InFile);\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
\r
Index += (strlen (StringBuffer) * 2) + 2;\r
OutFileBuffer = (UINT8 *) malloc (Index);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
VersionSect = (EFI_VERSION_SECTION *) OutFileBuffer;\r
Index += (strlen (StringBuffer) * 2) + 2;\r
OutFileBuffer = (UINT8 *) malloc (Index);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
UiSect = (EFI_USER_INTERFACE_SECTION *) OutFileBuffer;\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
OutFileBuffer = (UINT8 *) malloc (InputLength);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
//\r
\r
#if _MSC_EXTENSIONS\r
//\r
- // use Microsoft* C complier dependent integer width types\r
+ // use Microsoft* C compiler dependent integer width types\r
//\r
typedef unsigned __int64 UINT64;\r
typedef __int64 INT64;\r
\r
#if _MSC_EXTENSIONS\r
//\r
- // use Microsoft* C complier dependent integer width types\r
+ // use Microsoft* C compiler dependent integer width types\r
//\r
typedef unsigned __int64 UINT64;\r
typedef __int64 INT64;\r
#ifndef TRUE\r
//\r
// BugBug: UEFI specification claims 1 and 0. We are concerned about the\r
-// complier portability so we did it this way.\r
+// compiler portability so we did it this way.\r
//\r
#define TRUE ((BOOLEAN)(1==1))\r
#endif\r
/// For vareqval (0x100), NameId is 0x100.\r
/// This value will convert to a Unicode String following this rule;\r
/// sprintf(StringBuffer, "%d", NameId) .\r
- /// The the Unicode String will be used as a EFI Variable Name.\r
+ /// The Unicode String will be used as a EFI Variable Name.\r
///\r
UINT16 NameId;\r
} EFI_IFR_GUID_VAREQNAME;\r
\r
///\r
-/// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.\r
+/// EDKII implementation extension GUID, used to indicate there are bit fields in the varstore.\r
///\r
#define EDKII_IFR_BIT_VARSTORE_GUID \\r
{ 0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60 ,0xA7, 0x1D}}\r
\r
///\r
-/// EDKII implementation extension flags, used to indaicate the disply style and bit width for bit filed storage.\r
+/// EDKII implementation extension flags, used to indicate the display style and bit width for bit filed storage.\r
/// Two high bits for display style and the low six bits for bit width.\r
///\r
#define EDKII_IFR_DISPLAY_BIT 0xC0\r
EFI_GUID FormatType;\r
\r
//\r
- // An arry of bytes of length Length.\r
+ // An array of bytes of length Length.\r
//\r
// UINT8 Data[1];\r
//\r
EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies\r
authenticated access, then the Data buffer should begin with an\r
authentication descriptor prior to the data payload and DataSize\r
- should reflect the the data.and descriptor size. The caller\r
+ should reflect the data.and descriptor size. The caller\r
shall digest the Monotonic Count value and the associated data\r
for the variable update using the SHA-256 1-way hash algorithm.\r
The ensuing the 32-byte digest will be signed using the private\r
#if _MSC_EXTENSIONS\r
\r
//\r
- // use Microsoft* C complier dependent integer width types\r
+ // use Microsoft* C compiler dependent integer width types\r
//\r
typedef unsigned __int64 UINT64;\r
typedef __int64 INT64;\r
//\r
#if _MSC_EXTENSIONS\r
//\r
- // Microsoft* compiler requires _EFIAPI useage, __cdecl is Microsoft* specific C.\r
+ // Microsoft* compiler requires _EFIAPI usage, __cdecl is Microsoft* specific C.\r
//\r
#define EFIAPI __cdecl\r
#endif\r
#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53\r
\r
//\r
-// "SPCR" Serial Port Concole Redirection Table\r
+// "SPCR" Serial Port Console Redirection Table\r
//\r
#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053\r
\r
#define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE 0x4746434D\r
\r
//\r
-// "SPCR" Serial Port Concole Redirection Table\r
+// "SPCR" Serial Port Console Redirection Table\r
//\r
#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053\r
\r
} PCI_TYPE_GENERIC;\r
\r
typedef struct {\r
- UINT32 CardBusSocketReg; // Cardus Socket/ExCA Base\r
+ UINT32 CardBusSocketReg; // Cardbus Socket/ExCA Base\r
// Address Register\r
//\r
UINT16 Reserved;\r
#define PCI_IF_8259_PIC 0x00\r
#define PCI_IF_ISA_PIC 0x01\r
#define PCI_IF_EISA_PIC 0x02\r
-#define PCI_IF_APIC_CONTROLLER 0x10 // I/O APIC interrupt controller , 32 bye none-prefectable memory.\r
+#define PCI_IF_APIC_CONTROLLER 0x10 // I/O APIC interrupt controller , 32 byte none-prefetchable memory.\r
#define PCI_IF_APIC_CONTROLLER2 0x20\r
#define PCI_SUBCLASS_TIMER 0x02\r
#define PCI_IF_8254_TIMER 0x00\r
If NULL, then the instance size is not output.\r
\r
@retval Pointer A pointer to the copy of the current device path instance.\r
- @retval NULL DevicePathInstace was NULL on entry or there was insufficient memory.\r
+ @retval NULL DevicePathInstance was NULL on entry or there was insufficient memory.\r
\r
**/\r
typedef\r
@param DestinationX X coordinate of destination for the BltBuffer.\r
@param DestinationY Y coordinate of destination for the BltBuffer.\r
@param Width Width of rectangle in BltBuffer in pixels.\r
- @param Height Hight of rectangle in BltBuffer in pixels.\r
+ @param Height Height of rectangle in BltBuffer in pixels.\r
@param Delta OPTIONAL\r
\r
@retval EFI_SUCCESS The Blt operation completed.\r
@retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
- @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
+ @retval EFI_DEVICE_ERROR A hardware error occurred writing to the video buffer.\r
\r
**/\r
typedef\r
#define __EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r
\r
//\r
-// Forward reference for pure ANSI compatability\r
+// Forward reference for pure ANSI compatibility\r
\r
typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;\r
\r
@param[in] DestinationX - X coordinate of destination for the BltBuffer.\r
@param[in] DestinationY - Y coordinate of destination for the BltBuffer.\r
@param[in] Width - Width of rectangle in BltBuffer in pixels.\r
- @param[in] Height - Hight of rectangle in BltBuffer in pixels.\r
+ @param[in] Height - Height of rectangle in BltBuffer in pixels.\r
@param[in] Delta - OPTIONAL\r
\r
@retval EFI_SUCCESS - The Blt operation completed.\r
@retval EFI_INVALID_PARAMETER - BltOperation is not valid.\r
- @retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer.\r
+ @retval EFI_DEVICE_ERROR - A hardware error occurred writing to the video buffer.\r
\r
--*/\r
typedef\r
\r
\r
//\r
- // use Microsoft C complier dependent integer width types\r
+ // use Microsoft C compiler dependent integer width types\r
//\r
typedef unsigned __int64 UINT64;\r
typedef __int64 INT64;\r
//\r
// Modifier to ensure that all protocol member functions and EFI intrinsics\r
// use the correct C calling convention. All protocol member functions and\r
-// EFI intrinsics are required to modify thier member functions with EFIAPI.\r
+// EFI intrinsics are required to modify their member functions with EFIAPI.\r
//\r
#if _MSC_EXTENSIONS\r
///\r
- /// Define the standard calling convention reguardless of optimization level.\r
+ /// Define the standard calling convention regardless of optimization level.\r
/// __cdecl is Microsoft* specific C extension.\r
///\r
#define EFIAPI __cdecl\r
#elif __GNUC__\r
///\r
- /// Define the standard calling convention reguardless of optimization level.\r
+ /// Define the standard calling convention regardless of optimization level.\r
/// efidecl is an extension to GCC that supports the differnece between x64\r
/// GCC ABI and x64 Microsoft* ABI. EFI is closer to the Microsoft* ABI and\r
/// EFIAPI makes sure the right ABI is used for public interfaces.\r
SRes:\r
SZ_OK - OK\r
SZ_ERROR_MEM - Memory allocation error\r
- SZ_ERROR_PARAM - Incorrect paramater in props\r
+ SZ_ERROR_PARAM - Incorrect parameter in props\r
SZ_ERROR_WRITE - ISeqOutStream write callback error\r
SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output\r
SZ_ERROR_PROGRESS - some break from progress callback\r
9.35 beta 2014-12-07\r
------------------------- \r
- 7zr.exe now support AES encryption.\r
-- SFX mudules were added to LZMA SDK\r
+- SFX modules were added to LZMA SDK\r
- Some bugs were fixed.\r
\r
\r
- C - small SFXs for installers (7z decompression)\r
- C++ - SFXs and SFXs for installers (7z decompression)\r
\r
- Precomiled binaries:\r
+ Precompiled binaries:\r
\r
- console programs for lzma / 7z / xz compression and decompression\r
- SFX modules for installers.\r
if (strlen(argv[0]) > 2) {\r
Status = CountVerboseLevel (&argv[0][2], strlen(argv[0]) - 2, &VerboseLevel);\r
if (EFI_ERROR (Status)) {\r
- Error (NULL, 0, 0x1003, NULL, "%s is invaild parameter!", argv[0]);\r
+ Error (NULL, 0, 0x1003, NULL, "%s is invalid parameter!", argv[0]);\r
return STATUS_ERROR;\r
}\r
}\r
//\r
// Don't recognize the parameter.\r
//\r
- Error (NULL, 0, 0x1003, NULL, "%s is invaild parameter!", argv[0]);\r
+ Error (NULL, 0, 0x1003, NULL, "%s is invalid parameter!", argv[0]);\r
return STATUS_ERROR;\r
}\r
\r
\r
Allocate memory spaces for data structures used in compression process\r
\r
-Argements:\r
+Arguments:\r
VOID\r
\r
Returns:\r
if (mMatchLen >= 4) {\r
//\r
// We have just got a long match, the target tree\r
- // can be located by MatchPos + 1. Travese the tree\r
+ // can be located by MatchPos + 1. Traverse the tree\r
// from bottom up to get to a proper starting point.\r
// The usage of PERC_FLAG ensures proper node deletion\r
// in DeleteNode() later.\r
fprintf (stdout, " --uefi\n\\r
Enable UefiCompress, use TianoCompress when without this option\n");\r
fprintf (stdout, " -o FileName, --output FileName\n\\r
- File will be created to store the ouput content.\n");\r
+ File will be created to store the output content.\n");\r
fprintf (stdout, " -v, --verbose\n\\r
Turn on verbose output with informational messages.\n");\r
fprintf (stdout, " -q, --quiet\n\\r
Source - The source buffer containing the compressed data.\r
Destination - The destination buffer to store the decompressed data\r
Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
- Version - 1 for EFI1.1 Decompress algoruthm, 2 for Tiano Decompress algorithm\r
+ Version - 1 for EFI1.1 Decompress algorithm, 2 for Tiano Decompress algorithm\r
\r
Returns:\r
\r
- RETURN_SUCCESS - Decompression is successfull\r
+ RETURN_SUCCESS - Decompression is successful\r
RETURN_INVALID_PARAMETER - The source data is corrupted\r
\r
--*/\r
\r
Sorcerer generated code may contain many calls to _t->type() in a\r
single statement. This change introduces a temporary variable\r
- to eliminate unnnecesary function calls.\r
+ to eliminate unnecesary function calls.\r
\r
Change implemented by Tom Molteno (tim videoscript.com).\r
\r
#275. (Changed in MR23) Addition of -nopurify option to antlr\r
\r
A long time ago the PURIFY macro was introduced to initialize\r
- return value arguments and get rid of annying messages from program\r
- that checked for unitialized variables.\r
+ return value arguments and get rid of annoying messages from program\r
+ that checked for uninitialized variables.\r
\r
This has caused significant annoyance for C++ users that had\r
- classes with virtual functions or non-trivial contructors because\r
+ classes with virtual functions or non-trivial constructors because\r
it would zero the object, including the pointer to the virtual\r
function table. This could be defeated by redefining\r
the PURIFY macro to be empty, but it was a constant surprise to\r
#266. (Changed in MR23) virtual function printMessage()\r
\r
Bill Menees (bill.menees gogallagher.com) has completed the\r
- tedious taks of replacing all calls to fprintf() with calls\r
+ tedious tasks of replacing all calls to fprintf() with calls\r
to the virtual function printMessage(). For classes which\r
have a pointer to the parser it forwards the printMessage()\r
call to the parser's printMessage() routine.\r
\r
- This should make it significanly easier to redirect pccts\r
+ This should make it significantly easier to redirect pccts\r
error and warning messages.\r
\r
#265. (Changed in MR23) Remove "labase++" in C++ mode\r
\r
#228. (Changed in MR20) dlg crashes on "()"\r
\r
- The following token defintion will cause DLG to crash.\r
+ The following token definition will cause DLG to crash.\r
\r
#token "()"\r
\r
\r
#195. (Changed in MR14) #line directive not at column 1\r
\r
- Under certain circunstances a predicate test could generate\r
+ Under certain circumstances a predicate test could generate\r
a #line directive which was not at column 1.\r
\r
Reported with fix by David KÃ¥gedal (davidk lysator.liu.se)\r
#164. (Changed in MR13) Unused variable _astp\r
\r
For many compilations, we have lived with warnings about\r
- the unused variable _astp. It turns out that this varible\r
+ the unused variable _astp. It turns out that this variable\r
can *never* be used because the code which references it was\r
commented out.\r
\r
\r
The first line of the makefiles require a definition of PCCTS_HOME.\r
\r
- These are in additiion to the AntlrMSVC50.* and DlgMSVC50.*\r
+ These are in addition to the AntlrMSVC50.* and DlgMSVC50.*\r
supplied by Jeff Vincent (JVincent@novell.com).\r
\r
#137. (Changed in MR11) Token getType(), getText(), getLine() const members\r
the variable [zz]traceOptionValueDefault is set to 0 or 1. When\r
the parser is initialized or [zz]traceReset() is called the\r
value of [zz]traceOptionValueDefault is copied to [zz]traceOptionValue.\r
- The value of [zz]traceGuessOptionValue is always initialzed to 1,\r
+ The value of [zz]traceGuessOptionValue is always initialized to 1,\r
but, as noted earlier, nothing will be reported unless\r
[zz]traceOptionValue is also positive.\r
\r
\r
The syntax of the class statement ("class parser-name {")\r
has been extended to allow for the specification of base\r
- classes. An arbirtrary number of tokens may now appear\r
+ classes. An arbitrary number of tokens may now appear\r
between the class name and the "{". They are output\r
again when the class declaration is generated. For\r
example:\r
This is especially important for predicates formed by rules\r
like the following:\r
\r
- uppperCaseVowel : <<isUpperCase(LATEXT(1))>>? vowel;\r
+ upperCaseVowel : <<isUpperCase(LATEXT(1))>>? vowel;\r
vowel: : <<isVowel(LATEXT(1))>>? LETTERS;\r
\r
These predicates are combined using AND since both must be\r
a predicate expression tree. Prior to 1.33MR10 this link was never\r
cleared and the next time the guard was used to construct a new\r
tree the link could contain a spurious reference to another element\r
- which had previosly been joined to it in the semantic predicate tree.\r
+ which had previously been joined to it in the semantic predicate tree.\r
\r
For example:\r
\r
tokens. They may not contain references to (...)+ and\r
(...)* blocks. This is now checked. This replaces the\r
fatal error message in item #78 with an appropriate\r
- (non-fatal) error messge.\r
+ (non-fatal) error message.\r
\r
In theory, context guards should be allowed to reference\r
rules. However, I have not had time to fix this.\r
correctly when the sets were of unequal sizes. Rewrote\r
set_equ to make it simpler and remove unnecessary and\r
expensive calls to set_deg(). This routine was not used\r
- in 1.33 vanila.\r
+ in 1.33 vanilla.\r
\r
#85. (Changed in 1.33MR10) Allow redefinition of MaxNumFiles\r
\r
\r
There were no changes in antlr or dlg output from the revised version.\r
\r
- The following fragment demonstates the problem by giving different\r
+ The following fragment demonstrates the problem by giving different\r
follow sets (option -pa) for var_access when built with k=1 and ck=2 on\r
1.33 vanilla and 1.33MR10:\r
\r
\r
1. start : r:rule t:Token <<$start=$r;>>\r
\r
- The $r refrence will not work when combined with\r
+ The $r reference will not work when combined with\r
the -gt option.\r
\r
2. start : t:Token <<$start=$t;>>\r
parse by "falling through". The parse can still be easily\r
resumed in other ways, but not in the most natural fashion.\r
\r
- This results in an inconsistentcy between named exception\r
+ This results in an inconsistency between named exception\r
handlers and exception handlers for alternatives. When\r
an exception handler for an alternative "falls through"\r
it goes to the nextmost outer handler - not the "normal\r
zzconsumeUntil()\r
zzconsumeUntilToken()\r
\r
-#58. (Changed in 1.33MR7) Added defintion of zzbufsize to dlgauto.h\r
+#58. (Changed in 1.33MR7) Added definition of zzbufsize to dlgauto.h\r
\r
#57. (Changed in 1.33MR7) Format of #line directive\r
\r
\r
#56. (Added in 1.33MR7) Jan Mikkelsen <janm@zeta.org.au>\r
\r
- Move PURIFY macro invocaton to after rule's init action.\r
+ Move PURIFY macro invocation to after rule's init action.\r
\r
-#55. (Fixed in 1.33MR7) Unitialized variables in ANTLRParser\r
+#55. (Fixed in 1.33MR7) Uninitialized variables in ANTLRParser\r
\r
Member variables inf_labase and inf_last were not initialized.\r
(See item #50.)\r
The reason for "Normal Action" is that the normal flow of the\r
program after a user-written exception handler is to "drop through".\r
In the case of an exception handler for a rule this results in\r
- the exection of a "return" statement. In the case of an\r
+ the execution of a "return" statement. In the case of an\r
exception handler attached to an alternative, rule, or token\r
this is the code that would have executed had there been no\r
exception.\r
\r
Repair bug introduced by 1.33MR1 for #tokdefs. The original fix\r
placed "DLGmaxToken=9999" and "DLGminToken=0" in the TokenType enum\r
- in order to fix a problem with an aggresive compiler assigning an 8\r
+ in order to fix a problem with an aggressive compiler assigning an 8\r
bit enum which might be too narrow. This caused #tokdefs to assume\r
that there were 9999 real tokens. The repair to the fix causes antlr to\r
ignore TokenTypes "DLGmaxToken" and "DLGminToken" in a #tokdefs file.\r
the variable [zz]traceOptionValueDefault is set to 0 or 1. When\r
the parser is initialized or [zz]traceReset() is called the\r
value of [zz]traceOptionValueDefault is copied to [zz]traceOptionValue.\r
- The value of [zz]traceGuessOptionValue is always initialzed to 1,\r
+ The value of [zz]traceGuessOptionValue is always initialized to 1,\r
but, as noted earlier, nothing will be reported unless\r
[zz]traceOptionValue is also positive.\r
\r
This is especially important for predicates formed by rules\r
like the following:\r
\r
- uppperCaseVowel : <<isUpperCase(LATEXT(1))>>? vowel;\r
+ upperCaseVowel : <<isUpperCase(LATEXT(1))>>? vowel;\r
vowel: : <<isVowel(LATEXT(1))>>? LETTERS;\r
\r
These predicates are combined using AND since both must be\r
parse by "falling through". The parse can still be easily\r
resumed in other ways, but not in the most natural fashion.\r
\r
- This results in an inconsistentcy between named exception\r
+ This results in an inconsistency between named exception\r
handlers and exception handlers for alternatives. When\r
an exception handler for an alternative "falls through"\r
it goes to the nextmost outer handler - not the "normal\r
The reason for "Normal Action" is that the normal flow of the\r
program after a user-written exception handler is to "drop through".\r
In the case of an exception handler for a rule this results in\r
- the exection of a "return" statement. In the case of an\r
+ the execution of a "return" statement. In the case of an\r
exception handler attached to an alternative, rule, or token\r
this is the code that would have executed had there been no\r
exception.\r
If the context guard g is not a subset of the lookahead context for r1\r
(in other words g is neither A nor B) then the code may execute r1 \r
even when the lookahead context is not satisfied. This is an error\r
- by the person coding the grammer, and the error should be reported to\r
+ by the person coding the grammar, and the error should be reported to\r
the user, but it isn't. expect. Some examples I've run seem to\r
indicate that such an error actually results in the rule becoming\r
unreachable.\r
\r
THM: In MR20 have fixed the most common cases.\r
\r
- The following token defintion will cause DLG to crash.\r
+ The following token definition will cause DLG to crash.\r
\r
#token "()"\r
\r
/* MR23 */ if (p!= NULL && akaString != NULL) {\r
/* MR23 */ if (p->akaString != NULL) {\r
/* MR23 */ if (strcmp(p->akaString,akaString) != 0) {\r
- /* MR23 */ warnFL(eMsg2("this #tokclass statment conflicts with a previous #tokclass %s(\"%s\") statement",\r
+ /* MR23 */ warnFL(eMsg2("this #tokclass statement conflicts with a previous #tokclass %s(\"%s\") statement",\r
/* MR23 */ t,p->akaString),\r
/* MR23 */ FileStr[save_file],save_line);\r
/* MR23 */ };\r
if (te != NULL && akaString != NULL) {\r
if (te->akaString != NULL) {\r
if (strcmp(te->akaString,akaString) != 0) {\r
- warnFL(eMsg2("this #token statment conflicts with a previous #token %s(\"%s\") statement",\r
+ warnFL(eMsg2("this #token statement conflicts with a previous #token %s(\"%s\") statement",\r
t,te->akaString),\r
FileStr[save_file],save_line);\r
};\r
/* MR23 */ if (p!= NULL && akaString != NULL) {\r
/* MR23 */ if (p->akaString != NULL) {\r
/* MR23 */ if (strcmp(p->akaString,akaString) != 0) {\r
-/* MR23 */ warnFL(eMsg2("this #tokclass statment conflicts with a previous #tokclass %s(\"%s\") statement",\r
+/* MR23 */ warnFL(eMsg2("this #tokclass statement conflicts with a previous #tokclass %s(\"%s\") statement",\r
/* MR23 */ t,p->akaString),\r
/* MR23 */ FileStr[save_file],save_line);\r
/* MR23 */ };\r
if (te != NULL && akaString != NULL) {\r
if (te->akaString != NULL) {\r
if (strcmp(te->akaString,akaString) != 0) {\r
- warnFL(eMsg2("this #token statment conflicts with a previous #token %s(\"%s\") statement",\r
+ warnFL(eMsg2("this #token statement conflicts with a previous #token %s(\"%s\") statement",\r
t,te->akaString),\r
FileStr[save_file],save_line);\r
};\r
"If this option is checked, ANTLR will ge"\r
"nerate a cross reference for all rules. "\r
"For each rule it will print a list of al"\r
- "l other rules that refrence it."\r
+ "l other rules that reference it."\r
},\r
/* [10] */\r
NotDependent {\r
};\r
};\r
\r
- /* ocurs at a later pass then for the exception_label */\r
+ /* occurs at a later pass then for the exception_label */\r
/* if an outerEG has been found then fill in the outer EG */\r
/* remove if from the list when the BlkLevel gets smaller */\r
\r
set_orin(&a, b);\r
set_free(b);\r
}\r
- set_free(rk); /* this has no members, but free it's memory */\r
+ set_free(rk); /* this has no members, but free its memory */\r
set_orin(rk_out, rk2); /* remember what we couldn't do */\r
set_free(rk2);\r
if (MR_MaintainBackTrace) MR_pointerStackPop(&MR_BackTraceStack);\r
long n;\r
int thisOverflow=0; /* MR9 */\r
long set_deg_value; /* MR10 */\r
- long threshhold; /* MR10 */\r
+ long threshold; /* MR10 */\r
\r
require(block!=NULL, "NULL block");\r
require(block->ntype==nJunction, "invalid block");\r
b = set_and(alt1->fset[i], alt2->fset[i]);\r
/* MR9 */ set_deg_value = set_deg(b);\r
/* MR10 */ if (n > 0) {\r
-/* MR10 */ threshhold = LONG_MAX / n;\r
-/* MR10 */ if (set_deg_value <= threshhold) {\r
+/* MR10 */ threshold = LONG_MAX / n;\r
+/* MR10 */ if (set_deg_value <= threshold) {\r
/* MR10 */ n *= set_deg_value;\r
/* MR10 */ } else {\r
/* MR10 */ n=LONG_MAX;\r
t = tlink(t, u, k2); /* any alts missing k2 toks, add u onto end */\r
Tfree(u); /* MR10 */\r
}\r
- set_free(rk); /* rk is empty, but free it's memory */\r
+ set_free(rk); /* rk is empty, but free its memory */\r
set_orin(rk_out, rk2); /* remember what we couldn't do */\r
set_free(rk2);\r
return t;\r
with input "C"\r
\r
Before MR21 the error message would be "expecting B - found C". After MR21\r
- the error message would be "expcect A, B - found C". This was good, but it\r
+ the error message would be "expect A, B - found C". This was good, but it\r
caused problems for those using parser exceptions because the reference to\r
B was generated inside the {...} where B really wasn't part of the block.\r
\r
followed by a loopBlock whereas the start of a (...)+ block is\r
represented as a single node: a plusBlock. So if first_item_is_guess_block\r
is called when the current node is a loopBegin it starts with the\r
- loop block rather than the the sub block which follows the loop block.\r
+ loop block rather than the sub block which follows the loop block.\r
However, we can't just skip past the loop block because some routines\r
depend on the old implementation. So, we provide a new implementation\r
which does skip the loopBlock. However, which should be called when ?\r
/* MR23\r
If there were only one return value operand and\r
it had an initializer then it would have been\r
- initiailized in the declaration.\r
+ initialized in the declaration.\r
*/\r
\r
returnValueInitializer = getInitializer(q->ret); /* MR23 */\r
/* NOTICE: this is done only here, for the method definition, but */\r
/* not for the method declaration inside the class */\r
/* definition. This is exactly the behaviour defined in */\r
- /* C++ standard for default paramters. */\r
+ /* C++ standard for default parameters. */\r
\r
DumpANSIFunctionArgDef(output,q, 0 /* emit initializers ? */);\r
_gen("\n");\r
blocks to look like (...|...| epsilon) since there were\r
intervening generics. This fixes the problem for this\r
particular case. Things like actions or empty blocks of\r
- various kinds will still cause problems, but I wasnt't\r
+ various kinds will still cause problems, but I wasn't\r
prepared to handle pathological cases like (A|()*). It\r
does handle (A | ()), which is a recommended idiom for\r
epsilon.\r
\r
/* M a x i m u m s */\r
\r
-/* MR20 Note G. Hobbelt These values are superceded by values in hash.h */\r
+/* MR20 Note G. Hobbelt These values are superseded by values in hash.h */\r
\r
#ifndef HashTableSize\r
#define HashTableSize 253\r
*\r
*/\r
\r
-/* MR5 Jan Mikkelsen 26-May-97 - added initalComma parameter */\r
+/* MR5 Jan Mikkelsen 26-May-97 - added initialComma parameter */\r
\r
void\r
#ifdef __USE_PROTOS\r
&pSeparator,\r
&nest);\r
\r
- /* MR26 Handle rule arguments such as: IIR_Bool (IIR_Decl::*contstraint)()\r
+ /* MR26 Handle rule arguments such as: IIR_Bool (IIR_Decl::*constraint)()\r
For this we need to strip off anything which follows the symbol.\r
*/\r
\r
* expression, such as "#pred NotA !A" or "#pred NotXY ! (X && Y) or\r
* "#pred XbarY !(X && Y)". In particular, it cannot be set by any\r
* predicate expression occurring under any other circumstances.\r
- * The #pred predicate expresssions are stored with in predEntry->pred\r
+ * The #pred predicate expressions are stored with in predEntry->pred\r
* and do not normally appear anywhere else until the predicates are\r
* "unfolded" in order to recognize redundancies, conflicts, and\r
* tautologies.\r
if (dfa_size<=dfa_allocated){\r
/* need to redo array */\r
if (!dfa_array){\r
- /* need some to do inital allocation */\r
+ /* need some to do initial allocation */\r
dfa_size=dfa_allocated+DFA_MIN;\r
dfa_array=(dfa_node **) malloc(sizeof(dfa_node*)*\r
dfa_size);\r
}\r
\r
\r
-/* past a pointer to the start start of the nfa graph\r
+/* past a pointer to the start of the nfa graph\r
* nfa_to_dfa convers this graph to dfa. The function returns\r
* a pointer to the first dfa state.\r
* NOTE: The function that prints out the table will have to figure out how\r
#endif\r
\r
/* Returns a pointer to a dfa node that has the same nfa nodes in it.\r
- * This may or maynot be a newly created node.\r
+ * This may or may not be a newly created node.\r
*/\r
dfa_node *\r
#ifdef __USE_PROTOS\r
extern char program[]; /* tells what program this is */\r
extern char version[]; /* tells what version this is */\r
extern char *file_str[]; /* file names being used */\r
-extern int err_found; /* flag to indicate error occured */\r
+extern int err_found; /* flag to indicate error occurred */\r
extern int action_no; /* last action function printed */\r
extern int func_action; /* should actions be turned into functions?*/\r
extern set used_chars; /* used to label trans. arcs */\r
extern int interactive; /* interactive scanner (avoid lookahead)*/\r
extern int mode_counter; /* keeps track of the number of %%name */\r
extern int dfa_basep[]; /* start of each group of dfa */\r
-extern int dfa_class_nop[];/* number of transistion arcs in */\r
+extern int dfa_class_nop[];/* number of transition arcs in */\r
/* each dfa in each mode */\r
extern int nfa_allocated;\r
extern int dfa_allocated;\r
{35, 175, 50, 225},\r
"On",\r
"-CC",\r
- "When this control is checked, DLG genera"\r
- "tes a scanner using C++ classes rather t"\r
- "han C functions."\r
+ "When this control is checked, DLG generates "\r
+ "a scanner using C++ classes rather than "\r
+ "C functions."\r
},\r
/* [2] */\r
Or {\r
"DLGLexer",\r
keepCase,\r
"-cl",\r
- "This entry specifies the name DLG uses f"\r
- "or the C++ lexer class."\r
+ "This entry specifies the name DLG uses for the C++ lexer class."\r
},\r
/* [3] */\r
NotDependent {\r
{66, 25, 85, 135},\r
"Output File",\r
"",\r
- "Choose the name of the file that will ho"\r
- "ld the DLG-produced scanner."\r
+ "Choose the name of the file that will hold the DLG-produced scanner."\r
},\r
NoMore {\r
\r
"mode.h",\r
keepCase,\r
"-m",\r
- "This entry specifies the name DLG uses f"\r
- "or its lexical mode output file."\r
+ "This entry specifies the name DLG uses for its lexical mode output file."\r
},\r
/* [11] */\r
NotDependent {\r
RadioButtons {\r
{ /* array radioArray: 3 elements */\r
/* [1] */\r
- {134, 175, 149, 255}, "None", "", Set, "When this option is selected, DLG will n"\r
- "ot compress its tables.",\r
+ {134, 175, 149, 255}, "None", "", Set, "When this option is selected, DLG will not "\r
+ "compress its tables.",\r
/* [2] */\r
- {134, 265, 149, 345}, "Level 1", "-C1", NotSet, "When this option is selected, DLG will r"\r
- "emove all unused characters from the tra"\r
- "nsition-from table.",\r
+ {134, 265, 149, 345}, "Level 1", "-C1", NotSet, "When this option is selected, DLG will "\r
+ "remove all unused characters from the transition-from table.",\r
/* [3] */\r
- {134, 360, 149, 450}, "Level 2", "-C2", NotSet, "When this option is selected, DLG will p"\r
- "erform level 1 compression plus it will "\r
+ {134, 360, 149, 450}, "Level 2", "-C2", NotSet, "When this option is selected, DLG will "\r
+ "perform level 1 compression plus it will "\r
"map equivalent characters into the same "\r
"character classes."\r
}\r
{165, 20, 180, 145},\r
"Case Sensitive",\r
"-ci",\r
- "When this control is checked, the DLG au"\r
- "tomaton will treat upper and lower case "\r
+ "When this control is checked, the DLG automaton "\r
+ "will treat upper and lower case "\r
"characters identically."\r
},\r
/* [14] */\r
{165, 150, 180, 300},\r
"Interactive Scanner",\r
"-i",\r
- "When this control is checked, DLG will g"\r
- "enerate as interactive a scanner as poss"\r
- "ible."\r
+ "When this control is checked, DLG will generate "\r
+ "as interactive a scanner as possible."\r
},\r
/* [15] */\r
NotDependent {\r
"Ambiguity Warnings",\r
"-Wambiguity",\r
"When this control is checked, DLG warns "\r
- "if more than one regular expression coul"\r
- "d match the same character sequence."\r
+ "if more than one regular expression could "\r
+ "match the same character sequence."\r
},\r
/* [16] */\r
NotDependent {\r
VersionString {\r
"1.33MR"\r
},\r
- "PCCTS was written by Terence Parr, Russe"\r
- "ll Quong, Will Cohen, and Hank Dietz: 19"\r
- "89-1998. MPW port by Scott Haney.",\r
+ "PCCTS was written by Terence Parr, Russell "\r
+ "Quong, Will Cohen, and Hank Dietz: 1989-1998. "\r
+ "MPW port by Scott Haney.",\r
noDialog\r
},\r
/* [17] */\r
{142, 20, 157, 148},\r
"Generate ANSI C",\r
"-ga",\r
- "When this control is checked, DLG genera"\r
- "tes ANSI C compatible code."\r
+ "When this control is checked, DLG generates "\r
+ "ANSI C compatible code."\r
}\r
}\r
}\r
if (nfa_size<=nfa_allocated){\r
/* need to redo array */\r
if (!nfa_array){\r
- /* need some to do inital allocation */\r
+ /* need some to do initial allocation */\r
nfa_size=nfa_allocated+NFA_MIN;\r
nfa_array=(nfa_node **) malloc(sizeof(nfa_node*)*\r
nfa_size);\r
if (nfa_size<=nfa_allocated){\r
/* need to redo array */\r
if (!nfa_array){\r
- /* need some to do inital allocation */\r
+ /* need some to do initial allocation */\r
nfa_size=nfa_allocated+NFA_MIN;\r
nfa_array=(nfa_node **) malloc(sizeof(nfa_node*)*\r
nfa_size);\r
\r
\r
/* given pointer to beginning of graph and recursively walks it trying\r
- * to find a maximal partition. This partion in returned in maximal_class\r
+ * to find a maximal partition. This partition in returned in maximal_class\r
*/\r
#ifdef __USE_PROTOS\r
void intersect_nfa_labels(nfa_node* start,set* maximal_class)\r
\r
//\r
// 8-Apr-97 MR1 Make operator -> a const member function\r
-// as weall as some other member functions\r
+// as well as some other member functions\r
//\r
ANTLRTokenPtr& ANTLRTokenPtr::operator = (const ANTLRTokenPtr & lhs) // MR1\r
{\r
/* By Hubert Holin (Hubert.Holin@Bigfoot.com), 1998. */\r
/* */\r
/* This is completely free stuff, do whatever you want with */\r
-/* it (but then, I will take no responsability for whatever */\r
+/* it (but then, I will take no responsibility for whatever */\r
/* may happen if you do either... caveat emptor!). */\r
/* */\r
/************************************************************/\r
\r
\r
// NOTES: The semantics of the copy constructor\r
-// and the affectation operator may be unwaranted...\r
+// and the affectation operator may be unwarranted...\r
// and the stream may not be reset.\r
//\r
// It would have been so much nicer for nextChar()\r
// to throw (of for the DLGInputStream to change status)\r
-// upon hiting EOF than to return an "int"...\r
+// upon hitting EOF than to return an "int"...\r
\r
template <\r
class E,\r
extern zzjmp_buf zzguess_start;\r
#endif\r
\r
-/* Define global veriables that refer to values exported by the scanner.\r
+/* Define global variables that refer to values exported by the scanner.\r
* These declarations duplicate those in dlgdef.h, but are needed\r
* if ANTLR is not to generate a .dlg file (-gx); PS, this is a hack.\r
*/\r
/** @file\r
\r
- VfrCompiler internal defintions.\r
+ VfrCompiler internal definitions.\r
\r
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
{ VFR_RETURN_DATA_STRING_ERROR, ": data field string error or not support"},\r
{ VFR_RETURN_DEFAULT_VALUE_REDEFINED, ": default value re-defined with different value"},\r
{ VFR_RETURN_CONSTANT_ONLY, ": only constant is allowed in the expression"},\r
- { VFR_RETURN_VARSTORE_NAME_REDEFINED_ERROR, ": Varstore name is defined by more than one varstores, it can't be referred as varstore, only varstore strucure name could be used."},\r
+ { VFR_RETURN_VARSTORE_NAME_REDEFINED_ERROR, ": Varstore name is defined by more than one varstores, it can't be referred as varstore, only varstore structure name could be used."},\r
{ VFR_RETURN_BIT_WIDTH_ERROR, ": bit width must be <= sizeof (type) * 8 and the max width can not > 32" },\r
{ VFR_RETURN_STRING_TO_UINT_OVERFLOW, ": String to UINT* Overflow"},\r
{ VFR_RETURN_CODEUNDEFINED, ": undefined Error Code" }\r
}\r
CNObj.SetFlags (0, Info.mVarType);\r
//\r
- // Use maximum value not to limit the vaild value for the undefined question.\r
+ // Use maximum value not to limit the valid value for the undefined question.\r
//\r
switch (Info.mVarType) {\r
case EFI_IFR_TYPE_NUM_SIZE_64:\r
}\r
//\r
// extract inconsistent opcode list\r
- // pNode is Incosistent opcode, tNode is End Opcode\r
+ // pNode is Inconsistent opcode, tNode is End Opcode\r
//\r
\r
//\r
//\r
// Define a lexical class for parsing quoted strings. Basically\r
// starts with a double quote, and ends with a double quote that\r
-// is not preceeded with a backslash.\r
+// is not preceded with a backslash.\r
//\r
#lexclass QUOTED_STRING\r
#token TheString "~[\"]*\"" << mode (START); >>\r
;\r
\r
//\r
-// keep classDeinition and validClassNames for compatibility but not generate\r
+// keep classDefinition and validClassNames for compatibility but not generate\r
// any IFR object\r
//\r
classDefinition[UINT16 & Class] :\r
\r
//\r
// Add new sub function for the sub expression extension to remember the ExpOpCount\r
-// This funciton is only called by sub expression.\r
+// This function is only called by sub expression.\r
//\r
vfrStatementExpressionSub [UINT32 RootLevel, UINT32 & ExpOpCount] :\r
andTerm[$RootLevel, $ExpOpCount]\r
VSEObj.SetAttributes (0x00000002); //hardcode EFI_VARIABLE_BOOTSERVICE_ACCESS attribute\r
VSEObj.SetGuid (&pNode->mGuid);\r
VSEObj.SetVarStoreId (pNode->mVarStoreId);\r
- // Generate old efi varstore storage structure for compatiable with old "VarEqVal" opcode,\r
+ // Generate old efi varstore storage structure for compatible with old "VarEqVal" opcode,\r
// which is 3 bytes less than new structure define in UEFI Spec 2.3.1.\r
VSEObj.SetBinaryLength (sizeof (EFI_IFR_VARSTORE_EFI) - 3);\r
#ifdef VFREXP_DEBUG\r
}\r
} else {\r
//\r
- // Check whether the bit fileds can be contained within one FieldType.\r
+ // Check whether the bit fields can be contained within one FieldType.\r
//\r
if (pTmp != NULL && pTmp->mIsBitField && strcmp (pTmp->mFieldType->mTypeName, pNewField->mFieldType->mTypeName) == 0 &&\r
(pTmp->mBitOffset - pTmp->mOffset * 8) + pTmp->mBitWidth + pNewField->mBitWidth <= pNewField->mFieldType->mTotalSize * 8) {\r
*VarStoreId = EFI_VARSTORE_ID_INVALID;\r
\r
//\r
- // Assume that Data strucutre name is used as StoreName, and check again.\r
+ // Assume that Data structure name is used as StoreName, and check again.\r
//\r
ReturnCode = GetVarStoreByDataType (StoreName, &pNode, StoreGuid);\r
if (pNode != NULL) {\r
SVfrQuestionNode *pNode = NULL;\r
\r
for (pNode = mQuestionList; pNode != NULL; pNode = pNode->mNext) {\r
- printf ("Question VarId is %s and QuesitonId is 0x%x\n", pNode->mVarIdStr, pNode->mQuestionId);\r
+ printf ("Question VarId is %s and QuestionId is 0x%x\n", pNode->mVarIdStr, pNode->mQuestionId);\r
}\r
}\r
\r
#\r
@cached_class_function\r
def CreateCodeFile(self, CreateModuleCodeFile=False):\r
- # only module has code to be greated, so do nothing if CreateModuleCodeFile is False\r
+ # only module has code to be created, so do nothing if CreateModuleCodeFile is False\r
if not CreateModuleCodeFile:\r
return\r
\r
\r
## Get tool chain definition\r
#\r
- # Get each tool defition for given tool chain from tools_def.txt and platform\r
+ # Get each tool definition for given tool chain from tools_def.txt and platform\r
#\r
@cached_property\r
def ToolDefinition(self):\r
\r
## Override PCD setting (type, value, ...)\r
#\r
- # @param ToPcd The PCD to be overrided\r
- # @param FromPcd The PCD overrideing from\r
+ # @param ToPcd The PCD to be overridden\r
+ # @param FromPcd The PCD overriding from\r
#\r
def _OverridePcd(self, ToPcd, FromPcd, Module="", Msg="", Library=""):\r
#\r
\r
## Apply PCD setting defined platform to a module\r
#\r
- # @param Module The module from which the PCD setting will be overrided\r
+ # @param Module The module from which the PCD setting will be overridden\r
#\r
# @retval PCD_list The list PCDs with settings from platform\r
#\r
\r
## Append build options in platform to a module\r
#\r
- # @param Module The module to which the build options will be appened\r
+ # @param Module The module to which the build options will be appended\r
#\r
# @retval options The options appended with build options in platform\r
#\r
self.SourceDir = mws.relpath(self.SourceDir, self.WorkspaceDir)\r
\r
self.SourceOverrideDir = None\r
- # use overrided path defined in DSC file\r
+ # use overridden path defined in DSC file\r
if self.MetaFile.Key in GlobalData.gOverrideDir:\r
self.SourceOverrideDir = GlobalData.gOverrideDir[self.MetaFile.Key]\r
\r
def Guid(self):\r
#\r
# To build same module more than once, the module path with FILE_GUID overridden has\r
- # the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the realy path\r
+ # the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the real path\r
# in DSC. The overridden GUID can be retrieved from file name\r
#\r
if os.path.basename(self.MetaFile.File) != os.path.basename(self.MetaFile.Path):\r
self.MetaFile.BaseName\r
))\r
\r
- ## Return the directory to store the intermediate object files of the mdoule\r
+ ## Return the directory to store the intermediate object files of the module\r
@cached_property\r
def OutputDir(self):\r
return _MakeDir((self.BuildDir, "OUTPUT"))\r
return path.join(self.PlatformInfo.BuildDir, TAB_FV_DIRECTORY, "Ffs", self.Guid + self.Name)\r
return ''\r
\r
- ## Return the directory to store auto-gened source files of the mdoule\r
+ ## Return the directory to store auto-gened source files of the module\r
@cached_property\r
def DebugDir(self):\r
return _MakeDir((self.BuildDir, "DEBUG"))\r
\r
## Get the depex string\r
#\r
- # @return : a string contain all depex expresion.\r
+ # @return : a string contain all depex expression.\r
def _GetDepexExpresionString(self):\r
DepexStr = ''\r
DepexList = []\r
for M in [self.Module] + self.DependentLibraryList:\r
Filename = M.MetaFile.Path\r
InfObj = InfSectionParser.InfSectionParser(Filename)\r
- DepexExpresionList = InfObj.GetDepexExpresionList()\r
- for DepexExpresion in DepexExpresionList:\r
- for key in DepexExpresion:\r
+ DepexExpressionList = InfObj.GetDepexExpresionList()\r
+ for DepexExpression in DepexExpressionList:\r
+ for key in DepexExpression:\r
Arch, ModuleType = key\r
- DepexExpr = [x for x in DepexExpresion[key] if not str(x).startswith('#')]\r
+ DepexExpr = [x for x in DepexExpression[key] if not str(x).startswith('#')]\r
# the type of build module is USER_DEFINED.\r
# All different DEPEX section tags would be copied into the As Built INF file\r
# and there would be separate DEPEX section tags\r
\r
DepexList = []\r
#\r
- # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion\r
+ # Append depex from dependent libraries, if not "BEFORE", "AFTER" expression\r
#\r
for M in [self.Module] + self.DependentLibraryList:\r
Inherited = False\r
IdfGenBinBuffer.close()\r
return RetVal\r
\r
- ## Return the list of library modules explicitly or implicityly used by this module\r
+ ## Return the list of library modules explicitly or implicitly used by this module\r
@cached_property\r
def DependentLibraryList(self):\r
# only merge library classes and PCD for non-library module\r
AsBuiltInfDict['userextension_tianocore_item'] = UserExtStr\r
\r
# Generated depex expression section in comments.\r
- DepexExpresion = self._GetDepexExpresionString()\r
- AsBuiltInfDict['depexsection_item'] = DepexExpresion if DepexExpresion else ''\r
+ DepexExpression = self._GetDepexExpresionString()\r
+ AsBuiltInfDict['depexsection_item'] = DepexExpression if DepexExpression else ''\r
\r
AsBuiltInf = TemplateString()\r
AsBuiltInf.Append(gAsBuiltInfHeaderString.Replace(AsBuiltInfDict))\r
\r
## constructor\r
#\r
- # @param Input The dictionary represeting input file(s) for a rule\r
- # @param Output The list represeting output file(s) for a rule\r
+ # @param Input The dictionary representing input file(s) for a rule\r
+ # @param Output The list representing output file(s) for a rule\r
# @param Command The list containing commands to generate the output from input\r
#\r
def __init__(self, Type, Input, Output, Command, ExtraDependency=None):\r
# @param RelativeToDir The relative path of the source file\r
# @param PathSeparator Path separator\r
#\r
- # @retval tuple (Source file in full path, List of individual sourcefiles, Destionation file, List of build commands)\r
+ # @retval tuple (Source file in full path, List of individual sourcefiles, Destination file, List of build commands)\r
#\r
def Apply(self, SourceFile, BuildRuleOrder=None):\r
if not self.CommandList or not self.DestFileList:\r
# @param LineIndex The line index of build rule text\r
#\r
def ParseSubSection(self, LineIndex):\r
- # currenly nothing here\r
+ # currently nothing here\r
pass\r
\r
## Placeholder for not supported sections\r
## Merge section information just got into rule database\r
def EndOfSection(self):\r
Database = self.RuleDatabase\r
- # if there's specific toochain family, 'COMMON' doesn't make sense any more\r
+ # if there's specific toolchain family, 'COMMON' doesn't make sense any more\r
if len(self._TotalToolChainFamilySet) > 1 and TAB_COMMON in self._TotalToolChainFamilySet:\r
self._TotalToolChainFamilySet.remove(TAB_COMMON)\r
for Family in self._TotalToolChainFamilySet:\r
# @param FileExt The extension of a file\r
# @param ToolChainFamily The tool chain family name\r
# @param BuildVersion The build version number. TAB_STAR means any rule\r
- # is applicalbe.\r
+ # is applicable.\r
#\r
# @retval FileType The file type string\r
# @retval FileBuildRule The object of FileBuildRule\r
NewFile = self.PlaceMacro(str(F), self.Macros)\r
# In order to use file list macro as dependency\r
if T.GenListFile:\r
- # gnu tools need forward slash path separater, even on Windows\r
+ # gnu tools need forward slash path separator, even on Windows\r
self.ListFileMacros[T.ListFileMacro].append(str(F).replace ('\\', '/'))\r
self.FileListMacros[T.FileListMacro].append(NewFile)\r
elif T.GenFileListMacro:\r
## Find dependencies for one source file\r
#\r
# By searching recursively "#include" directive in file, find out all the\r
- # files needed by given source file. The dependecies will be only searched\r
+ # files needed by given source file. The dependencies will be only searched\r
# in given search path list.\r
#\r
# @param File The source file\r
Offset = 0\r
if self.ItemSize == 0:\r
#\r
- # Variable length, need to calculte one by one\r
+ # Variable length, need to calculate one by one\r
# The only variable table is stringtable, it is not Composite item, should not reach here\r
#\r
assert(False)\r
Dict['STRING_TABLE_DB_VALUE'] = [StringArrayToList(x) for x in Dict['STRING_TABLE_VALUE']]\r
\r
StringTableValue = Dict['STRING_TABLE_DB_VALUE']\r
- # when calcute the offset, should use StringTableLen instead of StringTableValue, as string maxium len may be different with actual len\r
+ # when calcute the offset, should use StringTableLen instead of StringTableValue, as string maximum len may be different with actual len\r
StringTableLen = Dict['STRING_TABLE_LENGTH']\r
DbStringTableLen = DbStringItemList(0, RawDataList = StringTableValue, LenList = StringTableLen)\r
\r
'SKUID_TABLE_EMPTY' : 'TRUE',\r
'DATABASE_EMPTY' : 'TRUE',\r
'EXMAP_TABLE_EMPTY' : 'TRUE',\r
- 'PCD_DATABASE_UNINIT_EMPTY' : ' UINT8 dummy; /* PCD_DATABASE_UNINIT is emptry */',\r
+ 'PCD_DATABASE_UNINIT_EMPTY' : ' UINT8 dummy; /* PCD_DATABASE_UNINIT is empty */',\r
'SYSTEM_SKU_ID' : ' SKU_ID SystemSkuId;',\r
'SYSTEM_SKU_ID_VALUE' : '0U'\r
}\r
UserExtensionTianoCore.append({SubSection: SectionDataDict[key]})\r
return UserExtensionTianoCore\r
\r
- # Get depex expresion\r
+ # Get depex expression\r
#\r
# @return: a list include some dictionary that key is section and value is a list contain all data.\r
def GetDepexExpresionList(self):\r
- DepexExpresionList = []\r
+ DepexExpressionList = []\r
if not self._FileSectionDataList:\r
- return DepexExpresionList\r
+ return DepexExpressionList\r
for SectionDataDict in self._FileSectionDataList:\r
for key in SectionDataDict:\r
if key.lower() == "[depex]" or key.lower().startswith("[depex."):\r
SubKey = (SectionList[1], SectionList[2])\r
else:\r
EdkLogger.error("build", AUTOGEN_ERROR, 'Section %s is invalid.' % key)\r
- DepexExpresionList.append({SubKey: SectionDataDict[key]})\r
- return DepexExpresionList\r
+ DepexExpressionList.append({SubKey: SectionDataDict[key]})\r
+ return DepexExpressionList\r
\r
\r
\r
## GetLanguageCode\r
#\r
# Check the language code read from .UNI file and convert ISO 639-2 codes to RFC 4646 codes if appropriate\r
-# ISO 639-2 language codes supported in compatiblity mode\r
+# ISO 639-2 language codes supported in compatibility mode\r
# RFC 4646 language codes supported in native mode\r
#\r
# @param LangName: Language codes read from .UNI file\r
#\r
-# @retval LangName: Valid lanugage code in RFC 4646 format or None\r
+# @retval LangName: Valid language code in RFC 4646 format or None\r
#\r
def GetLanguageCode(LangName, IsCompatibleMode, File):\r
length = len(LangName)\r
## @file\r
-# Standardized Error Hanlding infrastructures.\r
+# Standardized Error Handling infrastructures.\r
#\r
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
\r
_InfoLogger.log(WARN, LogText)\r
\r
- # Raise an execption if indicated\r
+ # Raise an exception if indicated\r
if _WarningAsError == True:\r
raise FatalError(WARNING_AS_ERROR)\r
\r
## Log ERROR message\r
#\r
# Once an error messages is logged, the tool's execution will be broken by raising\r
-# an execption. If you don't want to break the execution later, you can give\r
+# an exception. If you don't want to break the execution later, you can give\r
# "RaiseError" with "False" value.\r
#\r
# @param ToolName The name of the tool. If not given, the name of caller\r
# @param File The name of file which caused the error.\r
# @param Line The line number in the "File" which caused the warning.\r
# @param ExtraData More information associated with "Message"\r
-# @param RaiseError Raise an exception to break the tool's executuion if\r
+# @param RaiseError Raise an exception to break the tool's execution if\r
# it's True. This is the default behavior.\r
#\r
def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=None, RaiseError=IsRaiseError):\r
\r
## Constructor\r
#\r
- # @param OpenMessage The string printed before progress charaters\r
- # @param CloseMessage The string printed after progress charaters\r
- # @param ProgressChar The charater used to indicate the progress\r
- # @param Interval The interval in seconds between two progress charaters\r
+ # @param OpenMessage The string printed before progress characters\r
+ # @param CloseMessage The string printed after progress characters\r
+ # @param ProgressChar The character used to indicate the progress\r
+ # @param Interval The interval in seconds between two progress characters\r
#\r
def __init__(self, OpenMessage="", CloseMessage="", ProgressChar='.', Interval=1.0):\r
self.PromptMessage = OpenMessage\r
if Progressor._StopFlag is None:\r
Progressor._StopFlag = threading.Event()\r
\r
- ## Start to print progress charater\r
+ ## Start to print progress character\r
#\r
- # @param OpenMessage The string printed before progress charaters\r
+ # @param OpenMessage The string printed before progress characters\r
#\r
def Start(self, OpenMessage=None):\r
if OpenMessage is not None:\r
Progressor._ProgressThread.setDaemon(False)\r
Progressor._ProgressThread.start()\r
\r
- ## Stop printing progress charater\r
+ ## Stop printing progress character\r
#\r
- # @param CloseMessage The string printed after progress charaters\r
+ # @param CloseMessage The string printed after progress characters\r
#\r
def Stop(self, CloseMessage=None):\r
OriginalCodaMessage = self.CodaMessage\r
\r
## Override __cmp__ function\r
#\r
- # Customize the comparsion operation of two PathClass\r
+ # Customize the comparison operation of two PathClass\r
#\r
# @retval 0 The two PathClass are different\r
# @retval -1 The first PathClass is less than the second PathClass\r
self.Path = os.path.join(RealRoot, RealFile)\r
return ErrorCode, ErrorInfo\r
\r
-## Parse PE image to get the required PE informaion.\r
+## Parse PE image to get the required PE information.\r
#\r
class PeImageClass():\r
## Constructor\r
# @param class:\r
#\r
# @var WORKSPACE: defined the current WORKSPACE\r
-# @var PACKAGES_PATH: defined the other WORKSAPCE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH\r
+# @var PACKAGES_PATH: defined the other WORKSPACE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH\r
#\r
class MultipleWorkspace(object):\r
WORKSPACE = ''\r
\r
## getPkgPath()\r
#\r
- # get all package pathes.\r
+ # get all package paths.\r
#\r
# @param cls The class pointer\r
#\r
Macros[Record[0]] = Record[1]\r
\r
#\r
- # Overrided by Global Macros\r
+ # Overridden by Global Macros\r
#\r
Macros.update(GlobalMacro)\r
\r
Macros[Record[0]] = Record[1]\r
\r
#\r
- # Overrided by Global Macros\r
+ # Overridden by Global Macros\r
#\r
Macros.update(GlobalMacro)\r
\r
# @param Table: The Table to be inserted\r
# @param FileID: The ID of belonging file\r
# @param Filename: The name of belonging file\r
-# @param CurrentSection: The name of currect section\r
+# @param CurrentSection: The name of current section\r
# @param SectionItemList: A list of items of the section\r
# @param ArchList: A list of arches\r
# @param ThirdList: A list of third parameters, ModuleType for LibraryClass and SkuId for Dynamic Pcds\r
return rangeid\r
\r
\r
- def NegtiveRange(self, Oprand1):\r
+ def NegativeRange(self, Oprand1):\r
rangeContainer1 = self.operanddict[Oprand1]\r
\r
\r
if Operator in ["!", "NOT", "not"]:\r
if not gGuidPattern.match(Oprand1.strip()):\r
raise BadExpression(ERR_STRING_EXPR % Operator)\r
- return self.NegtiveRange(Oprand1)\r
+ return self.NegativeRange(Oprand1)\r
else:\r
if Operator in ["==", ">=", "<=", ">", "<", '^']:\r
return self.EvalRange(Operator, Oprand1)\r
\r
## GetSplitValueList\r
#\r
-# Get a value list from a string with multiple values splited with SplitTag\r
+# Get a value list from a string with multiple values split with SplitTag\r
# The default SplitTag is DataType.TAB_VALUE_SPLIT\r
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']\r
#\r
\r
## GetSplitList\r
#\r
-# Get a value list from a string with multiple values splited with SplitString\r
+# Get a value list from a string with multiple values split with SplitString\r
# The default SplitTag is DataType.TAB_VALUE_SPLIT\r
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']\r
#\r
# Return False if invalid format\r
#\r
# @param String: String with DEFINE statement\r
-# @param Arch: Supportted Arch\r
+# @param Arch: Supported Arch\r
# @param Defines: DEFINE statement to be parsed\r
#\r
# @retval 0 DEFINE statement found, and valid\r
#\r
# @param String: String with INCLUDE statement\r
# @param IncludeFiles: INCLUDE statement to be parsed\r
-# @param Arch: Supportted Arch\r
+# @param Arch: Supported Arch\r
#\r
# @retval True\r
# @retval False\r
## NormPath\r
#\r
# Create a normal path\r
-# And replace DFEINE in the path\r
+# And replace DEFINE in the path\r
#\r
# @param Path: The input value for Path to be converted\r
# @param Defines: A set for DEFINE statement\r
\r
## Split string\r
#\r
-# Revmove '"' which startswith and endswith string\r
+# Remove '"' which startswith and endswith string\r
#\r
-# @param String: The string need to be splited\r
+# @param String: The string need to be split\r
#\r
# @retval String: The string after removed '""'\r
#\r
## Convert the class to a string\r
#\r
# Convert each member of the class to string\r
- # Organize to a signle line format string\r
+ # Organize to a single line format string\r
#\r
# @retval Rtn Formatted String\r
#\r
# @param Header: Header of a Function\r
# @param Modifier: Modifier of a Function\r
# @param Name: Name of a Function\r
-# @param ReturnStatement: ReturnStatement of a Funciont\r
+# @param ReturnStatement: ReturnStatement of a Function\r
# @param StartLine: StartLine of a Function\r
# @param StartColumn: StartColumn of a Function\r
# @param EndLine: EndLine of a Function\r
# @var Header: Header of a Function\r
# @var Modifier: Modifier of a Function\r
# @var Name: Name of a Function\r
-# @var ReturnStatement: ReturnStatement of a Funciont\r
+# @var ReturnStatement: ReturnStatement of a Function\r
# @var StartLine: StartLine of a Function\r
# @var StartColumn: StartColumn of a Function\r
# @var EndLine: EndLine of a Function\r
## @file\r
# The file defines the Lexer for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
## @file\r
# The file defines the parser for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
WS : (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}\r
;\r
\r
-// ingore '\' of line concatenation\r
+// ignore '\' of line concatenation\r
BS : ('\\') {$channel=HIDDEN;}\r
;\r
\r
-// ingore function modifiers\r
+// ignore function modifiers\r
//FUNC_MODIFIERS : 'EFIAPI' {$channel=HIDDEN;}\r
// ;\r
\r
## @file\r
# The file defines the Lexer for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
## @file\r
# The file defines the parser for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
# Check whether only capital letters are used for #define declarations\r
def NamingConventionCheckDefineStatement(self, FileTable):\r
if EccGlobalData.gConfig.NamingConventionCheckDefineStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of #define statement ...")\r
+ EdkLogger.quiet("Checking naming convention of #define statement ...")\r
\r
SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_DEFINE)\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
# Check whether only capital letters are used for typedef declarations\r
def NamingConventionCheckTypedefStatement(self, FileTable):\r
if EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of #typedef statement ...")\r
+ EdkLogger.quiet("Checking naming convention of #typedef statement ...")\r
\r
SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_TYPEDEF)\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
# Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.\r
def NamingConventionCheckIfndefStatement(self, FileTable):\r
if EccGlobalData.gConfig.NamingConventionCheckIfndefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of #ifndef statement ...")\r
+ EdkLogger.quiet("Checking naming convention of #ifndef statement ...")\r
\r
SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_IFNDEF)\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
# Check whether the path name followed the rule\r
def NamingConventionCheckPathName(self):\r
if EccGlobalData.gConfig.NamingConventionCheckPathName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of file path name ...")\r
+ EdkLogger.quiet("Checking naming convention of file path name ...")\r
Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$')\r
SqlCommand = """select ID, Name from File"""\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
# Check whether the variable name followed the rule\r
def NamingConventionCheckVariableName(self, FileTable):\r
if EccGlobalData.gConfig.NamingConventionCheckVariableName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of variable name ...")\r
+ EdkLogger.quiet("Checking naming convention of variable name ...")\r
Pattern = re.compile(r'^[A-Zgm]+\S*[a-z]\S*$')\r
\r
SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE)\r
# Check whether the function name followed the rule\r
def NamingConventionCheckFunctionName(self):\r
if EccGlobalData.gConfig.NamingConventionCheckFunctionName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of function name ...")\r
+ EdkLogger.quiet("Checking naming convention of function name ...")\r
Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$')\r
SqlCommand = """select ID, Name from Function"""\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
# Check whether NO use short variable name with single character\r
def NamingConventionCheckSingleCharacterVariable(self, FileTable):\r
if EccGlobalData.gConfig.NamingConventionCheckSingleCharacterVariable == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
- EdkLogger.quiet("Checking naming covention of single character variable name ...")\r
+ EdkLogger.quiet("Checking naming convention of single character variable name ...")\r
\r
SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE)\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
\r
## Database\r
#\r
-# This class defined the ECC databse\r
+# This class defined the ECC database\r
# During the phase of initialization, the database will create all tables and\r
# insert all records of table DataModel\r
#\r
self.Conn = sqlite3.connect(self.DbPath, isolation_level = 'DEFERRED')\r
self.Conn.execute("PRAGMA page_size=4096")\r
self.Conn.execute("PRAGMA synchronous=OFF")\r
- # to avoid non-ascii charater conversion error\r
+ # to avoid non-ascii character conversion error\r
self.Conn.text_factory = str\r
self.Cur = self.Conn.cursor()\r
\r
\r
## UpdateIdentifierBelongsToFunction\r
#\r
- # Update the field "BelongsToFunction" for each Indentifier\r
+ # Update the field "BelongsToFunction" for each Identifier\r
#\r
#\r
def UpdateIdentifierBelongsToFunction_disabled(self):\r
\r
## UpdateIdentifierBelongsToFunction\r
#\r
- # Update the field "BelongsToFunction" for each Indentifier\r
+ # Update the field "BelongsToFunction" for each Identifier\r
#\r
#\r
def UpdateIdentifierBelongsToFunction(self):\r
Op.write("%s\r" % Filename)\r
#Dsc(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb)\r
self.MetaFile = DscParser(PathClass(Filename, Root), MODEL_FILE_DSC, MetaFileStorage(EccGlobalData.gDb.TblDsc.Cur, Filename, MODEL_FILE_DSC, True))\r
- # alwasy do post-process, in case of macros change\r
+ # always do post-process, in case of macros change\r
self.MetaFile.DoPostProcess()\r
self.MetaFile.Start()\r
self.MetaFile._PostProcess()\r
if Options.Workspace:\r
os.environ["WORKSPACE"] = Options.Workspace\r
\r
- # Check workspace envirnoment\r
+ # Check workspace environment\r
if "WORKSPACE" not in os.environ:\r
EdkLogger.error("ECC", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",\r
ExtraData="WORKSPACE")\r
## @file\r
-# Standardized Error Hanlding infrastructures.\r
+# Standardized Error Handling infrastructures.\r
#\r
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2 : "The #ifndef must be the first line of code following the file header comment",\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_3 : "The #endif must appear on the last line in the file",\r
ERROR_INCLUDE_FILE_CHECK_DATA : "Include files should contain only public or only private data and cannot contain code or define data variables",\r
- ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the inlcude file with same names",\r
+ ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the include file with same names",\r
\r
ERROR_DECLARATION_DATA_TYPE_CHECK_ALL : "",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE : "There should be no use of int, unsigned, char, void, static, long in any .c, .h or .asl files",\r
from Common.MultipleWorkspace import MultipleWorkspace as mws\r
from Ecc import EccGlobalData\r
import re\r
-## Get the inlcude path list for a source file\r
+## Get the include path list for a source file\r
#\r
# 1. Find the source file belongs to which inf file\r
# 2. Find the inf's package\r
\r
while not LBFound and (Str[Index].isalnum() or Str[Index] == '_'):\r
Index += 1\r
- # maybe type-cast at the begining, skip it.\r
+ # maybe type-cast at the beginning, skip it.\r
RemainingStr = Str[Index:].lstrip()\r
if RemainingStr.startswith(')') and not LBFound:\r
Index += 1\r
for M in MList:\r
if M in EccGlobalData.gConfig.ModifierSet:\r
continue\r
- # remove array sufix\r
+ # remove array suffix\r
if M.startswith('[') or M.endswith(']'):\r
continue\r
ReturnType += M + ' '\r
Type = GetDataTypeFromModifier(Field[0:Index])\r
return Type.strip()\r
else:\r
- # For the condition that the field in struct is an array with [] sufixes...\r
+ # For the condition that the field in struct is an array with [] suffixes...\r
if not Field[Index + len(FieldName)].isalnum():\r
Type = GetDataTypeFromModifier(Field[0:Index])\r
return Type.strip()\r
Field = Field.strip()\r
if Field == '':\r
continue\r
- # For the condition that the field in struct is an array with [] sufixes...\r
+ # For the condition that the field in struct is an array with [] suffixes...\r
if Field[-1] == ']':\r
LBPos = Field.find('[')\r
Field = Field[0:LBPos]\r
## @file\r
# The file defines the Lexer for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
## @file\r
# The file defines the parser for C source files.\r
#\r
-# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.\r
+# THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE.\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
print('################# ' + self.FileName + '#####################')\r
\r
print('/****************************************/')\r
- print('/*************** ASSIGNMENTS ***************/')\r
+ print('/************** ASSIGNMENTS *************/')\r
print('/****************************************/')\r
- for asign in FileProfile.AssignmentExpressionList:\r
- print(str(asign.StartPos) + asign.Name + asign.Operator + asign.Value)\r
+ for assign in FileProfile.AssignmentExpressionList:\r
+ print(str(assign.StartPos) + assign.Name + assign.Operator + assign.Value)\r
\r
print('/****************************************/')\r
print('/********* PREPROCESS DIRECTIVES ********/')\r
\r
## Database class\r
#\r
-# This class defined the EOT databse\r
+# This class defined the EOT database\r
# During the phase of initialization, the database will create all tables and\r
# insert all records of table DataModel\r
#\r
self.Conn = sqlite3.connect(self.DbPath, isolation_level = 'DEFERRED')\r
self.Conn.execute("PRAGMA page_size=8192")\r
self.Conn.execute("PRAGMA synchronous=OFF")\r
- # to avoid non-ascii charater conversion error\r
+ # to avoid non-ascii character conversion error\r
self.Conn.text_factory = str\r
self.Cur = self.Conn.cursor()\r
\r
\r
## UpdateIdentifierBelongsToFunction() method\r
#\r
- # Update the field "BelongsToFunction" for each Indentifier\r
+ # Update the field "BelongsToFunction" for each Identifier\r
#\r
# @param self: The object pointer\r
#\r
gConsumedProtocolLibrary['EfiLocateProtocolInterface'] = 0\r
gConsumedProtocolLibrary['EfiHandleProtocol'] = 1\r
\r
-# Dict for callback PROTOCOL function callling\r
+# Dict for callback PROTOCOL function calling\r
gCallbackProtocolLibrary = OrderedDict()\r
gCallbackProtocolLibrary['EfiRegisterProtocolCallback'] = 2\r
\r
% (Identifier, '.NotifyPpi', '->NotifyPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)\r
SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode)\r
\r
- # Find Procotols\r
+ # Find Protocols\r
ItemMode = 'Produced'\r
SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s\r
where (Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \\r
# @param Database: Eot database\r
# @param SourceFileList: A list for all source file belonging this INF file\r
# @param SourceOverridePath: Override path for source file\r
- # @param Edk_Source: Envirnoment variable EDK_SOURCE\r
- # @param Efi_Source: Envirnoment variable EFI_SOURCE\r
+ # @param Edk_Source: Environment variable EDK_SOURCE\r
+ # @param Efi_Source: Environment variable EFI_SOURCE\r
#\r
def __init__(self, Filename = None, Database = None, SourceFileList = None, SourceOverridePath = None, Edk_Source = None, Efi_Source = None):\r
self.Identification = Identification()\r
# @param MergeMultipleLines: Switch for if merge multiple lines\r
# @param LineNo: Default line no\r
#\r
-# @return Lines: The file contents after remvoing comments\r
+# @return Lines: The file contents after removing comments\r
#\r
def PreProcess(Filename, MergeMultipleLines = True, LineNo = -1):\r
Lines = []\r
# @param Table: Table to be searched\r
# @param Key: The keyword\r
#\r
-# @return Value: The value of the the keyword\r
+# @return Value: The value of the keyword\r
#\r
def FindKeyValue(Db, Table, Key):\r
SqlCommand = """select Value from %s where Name = '%s' and (Model = %s or Model = %s)""" % (Table, Key, MODEL_IDENTIFIER_VARIABLE, MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)\r
Content = """ </table></td>\r
</tr>"""\r
self.WriteLn(Content)\r
- #End of Consumed Ppi/Portocol\r
+ #End of Consumed Ppi/Protocol\r
\r
# Find Produced Ppi/Protocol\r
SqlCommand = """select ModuleName, ItemType, GuidName, GuidValue, GuidMacro from Report\r
EndPos = CurLine.find(')', StartPos+2)\r
while StartPos != -1 and EndPos != -1 and self._Token not in {TAB_IF_DEF, TAB_IF_N_DEF, TAB_IF, TAB_ELSE_IF}:\r
MacroName = CurLine[StartPos+2: EndPos]\r
- MacorValue = self._GetMacroValue(MacroName)\r
- if MacorValue is not None:\r
- CurLine = CurLine.replace('$(' + MacroName + ')', MacorValue, 1)\r
- if MacorValue.find('$(') != -1:\r
+ MacroValue = self._GetMacroValue(MacroName)\r
+ if MacroValue is not None:\r
+ CurLine = CurLine.replace('$(' + MacroName + ')', MacroValue, 1)\r
+ if MacroValue.find('$(') != -1:\r
PreIndex = StartPos\r
else:\r
- PreIndex = StartPos + len(MacorValue)\r
+ PreIndex = StartPos + len(MacroValue)\r
else:\r
PreIndex = EndPos + 1\r
StartPos = CurLine.find('$(', PreIndex)\r
\r
## _GetNextToken() method\r
#\r
- # Get next token unit before a seperator\r
+ # Get next token unit before a separator\r
# If found, the string value is put into self._Token\r
#\r
# @param self The object pointer\r
StartLine = self.CurrentLineNumber\r
while StartLine == self.CurrentLineNumber:\r
TempChar = self._CurrentChar()\r
- # Try to find the end char that is not a space and not in seperator tuple.\r
+ # Try to find the end char that is not a space and not in separator tuple.\r
# That is, when we got a space or any char in the tuple, we got the end of token.\r
if not str(TempChar).isspace() and TempChar not in SEPARATORS:\r
self._GetOneChar()\r
- # if we happen to meet a seperator as the first char, we must proceed to get it.\r
- # That is, we get a token that is a seperator char. nomally it is the boundary of other tokens.\r
+ # if we happen to meet a separator as the first char, we must proceed to get it.\r
+ # That is, we get a token that is a separator char. normally it is the boundary of other tokens.\r
elif StartPos == self.CurrentOffsetWithinLine and TempChar in SEPARATORS:\r
self._GetOneChar()\r
break\r
\r
## _GetNextGuid() method\r
#\r
- # Get next token unit before a seperator\r
+ # Get next token unit before a separator\r
# If found, the GUID string is put into self._Token\r
#\r
# @param self The object pointer\r
while CurrentLine == self.CurrentLineNumber:\r
\r
TempChar = self._CurrentChar()\r
- # Try to find the end char that is not a space and not in seperator tuple.\r
+ # Try to find the end char that is not a space and not in separator tuple.\r
# That is, when we got a space or any char in the tuple, we got the end of token.\r
if not str(TempChar).isspace() and not TempChar in SEPARATORS:\r
if not self._UndoOneChar():\r
return\r
- # if we happen to meet a seperator as the first char, we must proceed to get it.\r
- # That is, we get a token that is a seperator char. nomally it is the boundary of other tokens.\r
+ # if we happen to meet a separator as the first char, we must proceed to get it.\r
+ # That is, we get a token that is a separator char. normally it is the boundary of other tokens.\r
elif StartPos == self.CurrentOffsetWithinLine and TempChar in SEPARATORS:\r
return\r
else:\r
\r
## _GetNextHexNumber() method\r
#\r
- # Get next HEX data before a seperator\r
+ # Get next HEX data before a separator\r
# If found, the HEX data is put into self._Token\r
#\r
# @param self The object pointer\r
\r
## _GetNextDecimalNumber() method\r
#\r
- # Get next decimal data before a seperator\r
+ # Get next decimal data before a separator\r
# If found, the decimal data is put into self._Token\r
#\r
# @param self The object pointer\r
\r
Inf = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClassObj, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
#\r
- # Set Ffs BaseName, MdouleGuid, ModuleType, Version, OutputPath\r
+ # Set Ffs BaseName, ModuleGuid, ModuleType, Version, OutputPath\r
#\r
self.BaseName = Inf.BaseName\r
self.ModuleGuid = Inf.Guid\r
GenFdsGlobalVariable.VerboseLogger("InfFileName :%s" % self.InfFileName)\r
\r
#\r
- # Set OutputPath = ${WorkSpace}\Build\Fv\Ffs\${ModuleGuid}+ ${MdouleName}\\r
+ # Set OutputPath = ${WorkSpace}\Build\Fv\Ffs\${ModuleGuid}+ ${ModuleName}\\r
#\r
\r
self.OutputPath = os.path.join(GenFdsGlobalVariable.FfsDir, \\r
\r
## _InitializeInf()\r
#\r
- # Initilize the inf file to create FV\r
+ # Initialize the inf file to create FV\r
#\r
# @param self The object pointer\r
# @param BaseAddress base address of FV\r
EFI_HASH_ALGORITHM_SHA256_GUID = uuid.UUID('{51aa59de-fdf2-4ea3-bc63-875fb7842ee9}')\r
\r
#\r
-# Structure defintion to unpack EFI_CERT_BLOCK_RSA_2048_SHA256 from UEFI 2.4 Specification\r
+# Structure definition to unpack EFI_CERT_BLOCK_RSA_2048_SHA256 from UEFI 2.4 Specification\r
#\r
# typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {\r
# EFI_GUID HashType;\r
# Query all records of the table\r
#\r
def Query(self):\r
- EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)\r
+ EdkLogger.verbose("\nQuery table %s started ..." % self.Table)\r
SqlCommand = """select * from %s""" % self.Table\r
self.Cur.execute(SqlCommand)\r
for Rs in self.Cur:\r
# @param Header: Header of a Function\r
# @param Modifier: Modifier of a Function\r
# @param Name: Name of a Function\r
- # @param ReturnStatement: ReturnStatement of a Funciont\r
+ # @param ReturnStatement: ReturnStatement of a Function\r
# @param StartLine: StartLine of a Function\r
# @param StartColumn: StartColumn of a Function\r
# @param EndLine: EndLine of a Function\r
# @param Header: Header of a Function\r
# @param Modifier: Modifier of a Function\r
# @param Name: Name of a Function\r
- # @param ReturnStatement: ReturnStatement of a Funciont\r
+ # @param ReturnStatement: ReturnStatement of a Function\r
# @param StartLine: StartLine of a Function\r
# @param StartColumn: StartColumn of a Function\r
# @param EndLine: EndLine of a Function\r
#\r
# @param ID: ID of a Query\r
# @param Name: Name of a Query\r
- # @param Modifer: Modifier of a Query\r
+ # @param Modifier: Modifier of a Query\r
# @param Value: Type of a Query\r
# @param Model: Model of a Query\r
#\r
if os.path.exists(dscFullPath):\r
Line = "%-30s = %s\n" % (Key, self.Opt.DSCFILE)\r
else:\r
- EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,\r
+ EdkLogger.error("TargetTool", BuildToolError.FILE_NOT_FOUND,\r
"DSC file %s does not exist!" % self.Opt.DSCFILE, RaiseError=False)\r
elif Key == TAB_TAT_DEFINES_TOOL_CHAIN_CONF and self.Opt.TOOL_DEFINITION_FILE is not None:\r
tooldefFullPath = os.path.join(self.WorkSpace, self.Opt.TOOL_DEFINITION_FILE)\r
if os.path.exists(tooldefFullPath):\r
Line = "%-30s = %s\n" % (Key, self.Opt.TOOL_DEFINITION_FILE)\r
else:\r
- EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,\r
+ EdkLogger.error("TargetTool", BuildToolError.FILE_NOT_FOUND,\r
"Tooldef file %s does not exist!" % self.Opt.TOOL_DEFINITION_FILE, RaiseError=False)\r
\r
elif self.Opt.NUM >= 2:\r
InjectedFile = MatchList[1]\r
InjectedFile = os.path.normpath(InjectedFile)\r
InjectedFile = os.path.normcase(InjectedFile)\r
- # The first injetcted file must be the preprocessed file itself\r
+ # The first injected file must be the preprocessed file itself\r
if PreprocessedFile == "":\r
PreprocessedFile = InjectedFile\r
LineControlDirectiveFound = True\r
#\r
# @param PkgObj: A package object\r
# @param DpObj: A distribution object\r
- # @return: True if package depex satisified\r
+ # @return: True if package depex satisfied\r
# False else\r
#\r
def CheckPackageDepexSatisfied(self, PkgObj, DpObj=None):\r
\r
## Get a list of module information that comes from DP.\r
#\r
- # @param DpGuid: A Distrabution Guid\r
- # @param DpVersion: A Distrabution version\r
+ # @param DpGuid: A Distribution Guid\r
+ # @param DpVersion: A Distribution version\r
#\r
def GetSModInsPathListFromDp(self, DpGuid, DpVersion):\r
\r
\r
## Get a list of package information.\r
#\r
- # @param DpGuid: A Distrabution Guid\r
- # @param DpVersion: A Distrabution version\r
+ # @param DpGuid: A Distribution Guid\r
+ # @param DpVersion: A Distribution version\r
#\r
def GetPackageListFromDp(self, DpGuid, DpVersion):\r
\r
\r
## Get a list of modules that depends on package information from a DP.\r
#\r
- # @param DpGuid: A Distrabution Guid\r
- # @param DpVersion: A Distrabution version\r
+ # @param DpGuid: A Distribution Guid\r
+ # @param DpVersion: A Distribution version\r
#\r
def GetDpDependentModuleList(self, DpGuid, DpVersion):\r
\r
\r
## Get Dp's list of modules.\r
#\r
- # @param DpGuid: A Distrabution Guid\r
- # @param DpVersion: A Distrabution version\r
+ # @param DpGuid: A Distribution Guid\r
+ # @param DpVersion: A Distribution version\r
#\r
def GetDpModuleList(self, DpGuid, DpVersion):\r
ModList = []\r
File = codecs.open(ContainerFile, 'w', Encoding)\r
File.write(u'\uFEFF' + Content)\r
File.stream.close()\r
- Md5Sigature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
if (ContainerFile, Md5Sum) not in PackageObject.FileList:\r
PackageObject.FileList.append((ContainerFile, Md5Sum))\r
\r
File = codecs.open(ContainerFile, 'wb', Encoding)\r
File.write(u'\uFEFF' + Content)\r
File.stream.close()\r
- Md5Sigature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
if (ContainerFile, Md5Sum) not in ModuleObject.FileList:\r
ModuleObject.FileList.append((ContainerFile, Md5Sum))\r
\r
# verify MD5 signature when existed\r
#\r
if DistPkg.Header.Signature != '':\r
- Md5Sigature = md5(__FileHookOpen__(ContentFile, 'rb').read())\r
- if DistPkg.Header.Signature != Md5Sigature.hexdigest():\r
+ Md5Signature = md5(__FileHookOpen__(ContentFile, 'rb').read())\r
+ if DistPkg.Header.Signature != Md5Signature.hexdigest():\r
ContentZipFile.Close()\r
Logger.Error("InstallPkg", FILE_CHECKSUM_FAILURE,\r
ExtraData=ContentFile)\r
#\r
for Package in PackageList:\r
FilePath = PackageToDec(Package, DistPkg.Header)\r
- Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
if (FilePath, Md5Sum) not in Package.FileList:\r
Package.FileList.append((FilePath, Md5Sum))\r
\r
for (Module, Package) in ModuleList:\r
CheckCNameInModuleRedefined(Module, DistPkg)\r
FilePath = ModuleToInf(Module, Package, DistPkg.Header)\r
- Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
if Package:\r
if (FilePath, Md5Sum) not in Package.FileList:\r
Package.FileList.append((FilePath, Md5Sum))\r
else:\r
chmod(ToFile, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)\r
\r
- Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
\r
return Md5Sum\r
\r
chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH)\r
else:\r
chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR|stat.S_IWGRP|stat.S_IWOTH)\r
- Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read())\r
- Md5Sum = Md5Sigature.hexdigest()\r
+ Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read())\r
+ Md5Sum = Md5Signature.hexdigest()\r
if (ToFile, Md5Sum) not in Package.FileList:\r
Package.FileList.append((ToFile, Md5Sum))\r
Package.SetIncludeArchList(PackageIncludeArchList)\r
\r
return IsValidListExpr(ListExpr)\r
\r
-## _CheckExpreesion\r
+## _CheckExpression\r
#\r
# @param Expression: Pcd value expression\r
#\r
\r
def GenerateTokenList (Comment):\r
#\r
- # Tokenize Comment using '#' and ' ' as token seperators\r
+ # Tokenize Comment using '#' and ' ' as token separators\r
#\r
- RelplacedComment = None\r
- while Comment != RelplacedComment:\r
- RelplacedComment = Comment\r
+ ReplacedComment = None\r
+ while Comment != ReplacedComment:\r
+ ReplacedComment = Comment\r
Comment = Comment.replace('##', '#').replace(' ', ' ').replace(' ', '#').strip('# ')\r
return Comment.split('#')\r
\r
NumTokens = 1\r
\r
#\r
- # Initialze HelpText to Comment.\r
+ # Initialize HelpText to Comment.\r
# Content will be remove from HelpText as matching tokens are found\r
#\r
HelpText = Comment\r
\r
#\r
- # Tokenize Comment using '#' and ' ' as token seperators\r
+ # Tokenize Comment using '#' and ' ' as token separators\r
#\r
List = GenerateTokenList (Comment)\r
\r
TAB_STR_TOKENERR = 'ERR'\r
\r
#\r
-# Dictionary of usage tokens and their synonmys\r
+# Dictionary of usage tokens and their synonyms\r
#\r
ALL_USAGE_TOKENS = {\r
"PRODUCES" : "PRODUCES",\r
gCONTENT_FILE = "dist.content"\r
\r
#\r
-# File name for XML file in the distibution\r
+# File name for XML file in the distribution\r
#\r
gDESC_FILE = 'dist.pkg'\r
\r
FileGuidString = ""\r
VerString = ""\r
\r
- OrignalString = String\r
+ OriginalString = String\r
String = String.strip()\r
if not String:\r
return None, None\r
ST.ERR_FILELIST_EXIST % (String),\r
File=GlobalData.gINF_MODULE_NAME,\r
Line=LineNo,\r
- ExtraData=OrignalString)\r
+ ExtraData=OriginalString)\r
\r
#\r
# Validate file exist/format.\r
ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID % (String),\r
File=GlobalData.gINF_MODULE_NAME,\r
Line=LineNo,\r
- ExtraData=OrignalString)\r
+ ExtraData=OriginalString)\r
return False\r
if IsValidFileFlag:\r
FileLinesList = []\r
ExtraData=Path)\r
\r
#\r
- # Check if '..' in the file name(without suffixe)\r
+ # Check if '..' in the file name(without suffix)\r
#\r
if (TAB_SPLIT + TAB_SPLIT) in Path:\r
Logger.Error("Unicode File Parser",\r
#\r
\r
'''\r
-PaserValidate\r
+ParserValidate\r
'''\r
\r
import os.path\r
#\r
def IsValidBoolType(BoolString):\r
#\r
- # Valid Ture\r
+ # Valid True\r
#\r
if BoolString == 'TRUE' or \\r
BoolString == 'True' or \\r
## Is valid Tool Family or not\r
#\r
# @param ToolFamily: A string contain Tool Family need to be judged.\r
-# Famlily := [A-Z]([a-zA-Z0-9])*\r
+# Family := [A-Z]([a-zA-Z0-9])*\r
#\r
def IsValidToolFamily(ToolFamily):\r
- ReIsValieFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)\r
- if ReIsValieFamily.match(ToolFamily) is None:\r
+ ReIsValidFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)\r
+ if ReIsValidFamily.match(ToolFamily) is None:\r
return False\r
return True\r
\r
def IsValidArch(Arch):\r
if Arch == 'common':\r
return True\r
- ReIsValieArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL)\r
- if ReIsValieArch.match(Arch) is None:\r
+ ReIsValidArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL)\r
+ if ReIsValidArch.match(Arch) is None:\r
return False\r
return True\r
\r
# INF, DEC specs\r
# @param SectionDict: section statement dict, key is SectionAttrs(arch,\r
# moduletype or platform may exist as needed) list\r
-# seperated by space,\r
+# separated by space,\r
# value is statement\r
#\r
def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):\r
\r
## GetSplitValueList\r
#\r
-# Get a value list from a string with multiple values splited with SplitTag\r
+# Get a value list from a string with multiple values split with SplitTag\r
# The default SplitTag is DataType.TAB_VALUE_SPLIT\r
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']\r
#\r
# Return False if invalid format\r
#\r
# @param String: String with DEFINE statement\r
-# @param Arch: Supportted Arch\r
+# @param Arch: Supported Arch\r
# @param Defines: DEFINE statement to be parsed\r
#\r
def GenDefines(String, Arch, Defines):\r
## NormPath\r
#\r
# Create a normal path\r
-# And replace DFEINE in the path\r
+# And replace DEFINE in the path\r
#\r
# @param Path: The input value for Path to be converted\r
# @param Defines: A set for DEFINE statement\r
\r
## Split string\r
#\r
-# Revmove '"' which startswith and endswith string\r
+# Remove '"' which startswith and endswith string\r
#\r
-# @param String: The string need to be splited\r
+# @param String: The string need to be split\r
#\r
def SplitString(String):\r
if String.startswith('\"'):\r
return False\r
return False\r
\r
-## Check if the string is HexDgit and its interger value within limit of UINT32\r
+## Check if the string is HexDgit and its integer value within limit of UINT32\r
#\r
# Return true if all characters in the string are digits and there is at\r
# least one character\r
## GetLanguageCode1766\r
#\r
# Check the language code read from .UNI file and convert RFC 4646 codes to RFC 1766 codes\r
-# RFC 1766 language codes supported in compatiblity mode\r
+# RFC 1766 language codes supported in compatibility mode\r
# RFC 4646 language codes supported in native mode\r
#\r
# @param LangName: Language codes read from .UNI file\r
#\r
-# @retval LangName: Valid lanugage code in RFC 1766 format or None\r
+# @retval LangName: Valid language code in RFC 1766 format or None\r
#\r
def GetLanguageCode1766(LangName, File=None):\r
return LangName\r
## GetLanguageCode\r
#\r
# Check the language code read from .UNI file and convert RFC 1766 codes to RFC 4646 codes if appropriate\r
-# RFC 1766 language codes supported in compatiblity mode\r
+# RFC 1766 language codes supported in compatibility mode\r
# RFC 4646 language codes supported in native mode\r
#\r
# @param LangName: Language codes read from .UNI file\r
\r
## FormatUniEntry\r
#\r
-# Formated the entry in Uni file.\r
+# Formatted the entry in Uni file.\r
#\r
# @param StrTokenName StrTokenName.\r
# @param TokenValueList A list need to be processed.\r
# @param ContainerFile ContainerFile.\r
#\r
-# @return formated entry\r
+# @return formatted entry\r
def FormatUniEntry(StrTokenName, TokenValueList, ContainerFile):\r
SubContent = ''\r
PreFormatLength = 40\r
MultiLineFeedExits = False\r
#\r
# 0: initial value\r
- # 1: signle String entry exist\r
- # 2: line feed exist under the some signle String entry\r
+ # 1: single String entry exist\r
+ # 2: line feed exist under the some single String entry\r
#\r
StringEntryExistsFlag = 0\r
for Line in FileIn:\r
StringEntryExistsFlag = 2\r
#\r
# If the '#string' line and the '#language' line are not in the same line,\r
- # there should be only one line feed character betwwen them\r
+ # there should be only one line feed character between them\r
#\r
if MultiLineFeedExits:\r
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
\r
MultiLineFeedExits = False\r
#\r
- # Process comment embeded in string define lines\r
+ # Process comment embedded in string define lines\r
#\r
FindFlag = Line.find(u'//')\r
if FindFlag != -1 and Line.find(u'//') < Line.find(u'"'):\r
\r
#\r
# Check Abstract, Description, BinaryAbstract and BinaryDescription order,\r
- # should be Abstract, Description, BinaryAbstract, BinaryDesctiption\r
+ # should be Abstract, Description, BinaryAbstract, BinaryDescription\r
AbstractPosition = -1\r
DescriptionPosition = -1\r
BinaryAbstractPosition = -1\r
\r
_INFO_LOGGER.log(WARN, LogText)\r
#\r
- # Raise an execption if indicated\r
+ # Raise an exception if indicated\r
#\r
if GlobalData.gWARNING_AS_ERROR == True:\r
raise FatalError(WARNING_AS_ERROR)\r
## Log ERROR message\r
#\r
# Once an error messages is logged, the tool's execution will be broken by\r
-# raising an execption. If you don't want to break the execution later, you\r
+# raising an exception. If you don't want to break the execution later, you\r
# can give "RaiseError" with "False" value.\r
#\r
# @param ToolName The name of the tool. If not given, the name of caller\r
# @param File The name of file which caused the error.\r
# @param Line The line number in the "File" which caused the warning.\r
# @param ExtraData More information associated with "Message"\r
-# @param RaiseError Raise an exception to break the tool's executuion if\r
+# @param RaiseError Raise an exception to break the tool's execution if\r
# it's True. This is the default behavior.\r
#\r
def Error(ToolName, ErrorCode, Message=None, File=None, Line=None, \\r
ERR_INF_PARSER_LIBRARY_SECTION_LIBNAME_MISSING = \\r
_("Format invalid. Please specify a library name.")\r
ERR_INF_PARSER_SOURCES_SECTION_CONTENT_ERROR = \\r
- _("The format is incorrect. It should be formated as follows: "\r
+ _("The format is incorrect. It should be formatted as follows: "\r
"FileName, Family | TagName | ToolCode | FeatureFlagExpr.")\r
ERR_INF_PARSER_PCD_SECTION_TYPE_ERROR = \\r
_("The PCD section type is incorrect. The value should be this list: %s")\r
"Should like following: <TokenSpaceGuidCName>.<PcdCName> ")\r
ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR = \\r
_("The format is incorrect. "\r
- "It should be formated as follows: CName | FeatureFlag.")\r
+ "It should be formatted as follows: CName | FeatureFlag.")\r
ERR_INF_PARSER_PACKAGE_SECTION_CONTENT_ERROR = \\r
_("The format is incorrect. "\r
- "It should be formated as follows: <TokenSpaceGuidCName>.<PcdCName>")\r
+ "It should be formatted as follows: <TokenSpaceGuidCName>.<PcdCName>")\r
ERR_INF_PARSER_PCD_TAIL_COMMENTS_INVALID = \\r
_("The format is incorrect. "\r
"Multiple usage descriptions must be described on subsequent lines.")\r
_("The following file listed in the module "\r
"directory is not listed in the INF: %s")\r
ERR_INF_PARSER_VERSION_NUMBER_DEPRICATED = \\r
- _("VERSION_NUMBER depricated. "\r
+ _("VERSION_NUMBER deprecated. "\r
"The INF file %s should be modified to use the VERSION_STRING instead.")\r
ERR_INF_PARSER_VER_EXIST_BOTH_NUM_STR = \\r
_("The INF file %s defines both VERSION_NUMBER and VERSION_STRING, "\r
"the distribution to be replaced during replace. Current given: '%s'.")\r
ERR_UNIPARSE_DBLQUOTE_UNMATCHED = \\r
_("Only Language entry can contain a couple of matched quote in one line")\r
-ERR_UNIPARSE_NO_SECTION_EXIST = _("No PakcageDef or ModuleDef section exists in the UNI file.")\r
+ERR_UNIPARSE_NO_SECTION_EXIST = _("No PackageDef or ModuleDef section exists in the UNI file.")\r
ERR_UNIPARSE_STRNAME_FORMAT_ERROR = _("The String Token Name %s must start with \"STR_\"")\r
ERR_UNIPARSE_SEP_LANGENTRY_LINE = _("Each <LangEntry> should be in a separate line :%s.")\r
ERR_UNIPARSE_MULTI_ENTRY_EXIST = \\r
ERR_DECPARSE_CGUID_NOT_FOUND = _("Unable to find the GUID value of this GUID CName : '%s'.")\r
ERR_DECPARSE_FILEOPEN = _("Unable to open: [%s].")\r
ERR_DECPARSE_SECTION_EMPTY = _("Empty sections are not allowed.")\r
-ERR_DECPARSE_SECTION_UE = _("Incorrect UserExtentions format. "\r
+ERR_DECPARSE_SECTION_UE = _("Incorrect UserExtensions format. "\r
"Must be UserExtenxions.UserId.IdString[.Arch]+.")\r
ERR_DECPARSE_SECTION_UE_USERID = _("Invalid UserId, must be underscore"\r
"or alphanumeric characters.")\r
## @file\r
-# Standardized Error Hanlding infrastructures.\r
+# Standardized Error Handling infrastructures.\r
#\r
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
ContentFileClosed = True\r
\r
#\r
- # Add Md5Sigature\r
+ # Add Md5Signature\r
#\r
DistPkg.Header.Signature = md5(open(str(ContentFile), 'rb').read()).hexdigest()\r
#\r
\r
## DecDefineObject\r
#\r
-# Class to hold define section infomation\r
+# Class to hold define section information\r
#\r
class DecDefineObject(_DecBaseObject):\r
def __init__(self, PkgFullName):\r
\r
## DecPpiObject\r
#\r
-# Class for PPI seciont\r
+# Class for PPI section\r
#\r
# @param DecGuidObjectBase: Dec Guid Object Base\r
#\r
\r
## _DecUserExtension\r
#\r
-# Parse user extention section\r
+# Parse user extension section\r
#\r
class _DecUserExtension(_DecBase):\r
def __init__(self, RawData):\r
SectionNames.append(SectionName)\r
#\r
# In DEC specification, all section headers have at most two part:\r
- # SectionName.Arch except UserExtention\r
+ # SectionName.Arch except UserExtension\r
#\r
if len(ItemList) > 2:\r
self._LoggerError(ST.ERR_DECPARSE_SECTION_SUBTOOMANY % Item)\r
FileGuidString = ""\r
VerString = ""\r
\r
- OrignalString = String\r
+ OriginalString = String\r
String = String.strip()\r
if not String:\r
return None, None\r
#\r
# To deal with library instance specified by file name\r
#\r
- FileLinesList = GetFileLineContent(String, WorkSpace, LineNo, OrignalString)\r
+ FileLinesList = GetFileLineContent(String, WorkSpace, LineNo, OriginalString)\r
\r
\r
ReFindFileGuidPattern = re.compile("^\s*FILE_GUID\s*=.*$")\r
\r
#\r
# get a non-overlap set of include path, IncludePathList should be\r
- # sorted, and path should be end with path seperator '\'\r
+ # sorted, and path should be end with path separator '\'\r
#\r
NonOverLapList = []\r
for Path1 in IncludePathList:\r
NonOverLapList.append(Path1)\r
#\r
# revert the list so the longest path shown first in list, also need\r
- # to remove the extra path seperator '\'\r
+ # to remove the extra path separator '\'\r
# as this list is used to search the supported Arch info\r
#\r
for IndexN in range (0, len(IncludePathList)):\r
self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension])\r
#\r
# Get all meta-file header information\r
- # the record is list of items formated:\r
+ # the record is list of items formatted:\r
# [LineValue, Arch, StartLine, ID, Third]\r
#\r
InfHeaderObj = self.Parser.InfHeader\r
## Generate the define statement that will be put into userextension\r
# Not support comments.\r
#\r
-# @param HeaderComment: the original header comment (# not remvoed)\r
+# @param HeaderComment: the original header comment (# not removed)\r
# @param Name: the definition keyword, should not be empty or none\r
# @param Value: the definition keyword value\r
-# @param TailComment: the original Tail comment (# not remvoed)\r
+# @param TailComment: the original Tail comment (# not removed)\r
#\r
# @return: the regenerated define statement\r
#\r
#\r
# check whether modified by users\r
#\r
- Md5Sigature = md5(open(str(Path), 'rb').read())\r
- if Md5Sum != Md5Sigature.hexdigest():\r
+ Md5Signature = md5(open(str(Path), 'rb').read())\r
+ if Md5Sum != Md5Signature.hexdigest():\r
Logger.Info(ST.MSG_CONFIRM_REMOVE2 % Path)\r
Input = stdin.readline()\r
Input = Input.replace('\r', '').replace('\n', '')\r
self.dec = _DecBase(FileContent('dummy', []))\r
\r
def testCorrectMacro(self):\r
- self.dec._MacroParser('DEFINE MARCRO1 = test1')\r
- self.failIf('MARCRO1' not in self.dec._LocalMacro)\r
- self.assertEqual(self.dec._LocalMacro['MARCRO1'], 'test1')\r
+ self.dec._MacroParser('DEFINE MACRO1 = test1')\r
+ self.failIf('MACRO1' not in self.dec._LocalMacro)\r
+ self.assertEqual(self.dec._LocalMacro['MACRO1'], 'test1')\r
\r
def testErrorMacro1(self):\r
# Raise fatal error, macro name must be upper case letter\r
## Convert the class to a string\r
#\r
# Convert each member of the class to string\r
- # Organize to a signle line format string\r
+ # Organize to a single line format string\r
#\r
# @retval Rtn Formatted String\r
#\r
\r
## Retrieve all information in [Defines] section\r
#\r
- # (Retriving all [Defines] information in one-shot is just to save time.)\r
+ # (Retrieving all [Defines] information in one-shot is just to save time.)\r
#\r
def _GetHeaderInfo(self):\r
RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]\r
if self._Protocols is None:\r
#\r
# tdict is a special kind of dict, used for selecting correct\r
- # protocol defition for given ARCH\r
+ # protocol definition for given ARCH\r
#\r
ProtocolDict = tdict(True)\r
PrivateProtocolDict = tdict(True)\r
if self._Ppis is None:\r
#\r
# tdict is a special kind of dict, used for selecting correct\r
- # PPI defition for given ARCH\r
+ # PPI definition for given ARCH\r
#\r
PpiDict = tdict(True)\r
PrivatePpiDict = tdict(True)\r
if self._Guids is None:\r
#\r
# tdict is a special kind of dict, used for selecting correct\r
- # GUID defition for given ARCH\r
+ # GUID definition for given ARCH\r
#\r
GuidDict = tdict(True)\r
PrivateGuidDict = tdict(True)\r
\r
## Retrieve all information in [Defines] section\r
#\r
- # (Retriving all [Defines] information in one-shot is just to save time.)\r
+ # (Retrieving all [Defines] information in one-shot is just to save time.)\r
#\r
def _GetHeaderInfo(self):\r
RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]\r
\r
## Retrieve all information in [Defines] section\r
#\r
- # (Retriving all [Defines] information in one-shot is just to save time.)\r
+ # (Retrieving all [Defines] information in one-shot is just to save time.)\r
#\r
@cached_class_function\r
def _GetHeaderInfo(self):\r
RetVal[Arch, ModuleType] = TemporaryDictionary[Arch, ModuleType]\r
return RetVal\r
\r
- ## Retrieve depedency expression\r
+ ## Retrieve dependency expression\r
@cached_property\r
def DepexExpression(self):\r
RetVal = tdict(False, 2)\r
ScopeKey = tuple(ScopeKey)\r
#\r
# DecParser SectionType is a list, will contain more than one item only in Pcd Section\r
- # As Pcd section macro usage is not alllowed, so here it is safe\r
+ # As Pcd section macro usage is not allowed, so here it is safe\r
#\r
if isinstance(self, DecParser):\r
SectionDictKey = self._SectionType[0], ScopeKey\r
SortedLibraryList.append(Item)\r
\r
#\r
- # Build the list of constructor and destructir names\r
+ # Build the list of constructor and destructor names\r
# The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order\r
#\r
SortedLibraryList.reverse()\r
#\r
# @param DbPath Path of database file\r
# @param GlobalMacros Global macros used for replacement during file parsing\r
-# @prarm RenewDb=False Create new database file if it's already there\r
+# @param RenewDb=False Create new database file if it's already there\r
#\r
class WorkspaceDatabase(object):\r
\r
Arch = None\r
return (FilePath, Arch) in self._CACHE_\r
\r
- # key = (FilePath, Arch=None, Target=None, Toochain=None)\r
+ # key = (FilePath, Arch=None, Target=None, Toolchain=None)\r
def __getitem__(self, Key):\r
FilePath = Key[0]\r
KeyLength = len(Key)\r
Arch,\r
MetaFileStorage(self.WorkspaceDb, FilePath, FileType)\r
)\r
- # alwasy do post-process, in case of macros change\r
+ # always do post-process, in case of macros change\r
MetaFile.DoPostProcess()\r
# object the build is based on\r
BuildObject = self._GENERATOR_[FileType](\r
#\r
# @param DbPath Path of database file\r
# @param GlobalMacros Global macros used for replacement during file parsing\r
- # @prarm RenewDb=False Create new database file if it's already there\r
+ # @param RenewDb=False Create new database file if it's already there\r
#\r
def __init__(self):\r
self.DB = dict()\r
time.sleep(0.1)\r
except BaseException as X:\r
#\r
- # TRICK: hide the output of threads left runing, so that the user can\r
+ # TRICK: hide the output of threads left running, so that the user can\r
# catch the error message easily\r
#\r
EdkLogger.SetLevel(EdkLogger.ERROR)\r
self.CompleteFlag = True\r
except:\r
#\r
- # TRICK: hide the output of threads left runing, so that the user can\r
+ # TRICK: hide the output of threads left running, so that the user can\r
# catch the error message easily\r
#\r
if not BuildTask._ErrorFlag.isSet():\r
LaunchCommand(["GenFw", "--address", str(BaseAddress), "-r", ModuleOutputImage], ModuleInfo.OutputDir)\r
LaunchCommand(["GenFw", "--address", str(BaseAddress), "-r", ModuleDebugImage], ModuleInfo.DebugDir)\r
#\r
- # Collect funtion address from Map file\r
+ # Collect function address from Map file\r
#\r
ImageMapTable = ModuleOutputImage.replace('.efi', '.map')\r
FunctionList = []\r
#\r
MapBuffer.append('(IMAGE=%s)\n\n' % (ModuleDebugImage))\r
#\r
- # Add funtion address\r
+ # Add function address\r
#\r
for Function in FunctionList:\r
if AddrIsOffset:\r
print('Original data did not match decompress(compress(data))')\r
self.DisplayBinaryData('original data', start)\r
self.DisplayBinaryData('after compression', self.ReadTmpFile('output1'))\r
- self.DisplayBinaryData('after decomression', finish)\r
+ self.DisplayBinaryData('after decompression', finish)\r
self.assertTrue(startEqualsFinish)\r
\r
def testRandomDataCycles(self):\r
\af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13252123 \hich\af41\dbch\af13\loch\f41 described }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 in the FDF file }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \r
\fs18\cf1\insrsid13252123 \hich\af41\dbch\af13\loch\f41 such as }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 the \hich\f41 \lquote \loch\f41 InfFIle\hich\f41 \rquote \loch\f41 \r
statement format the GenFds tool }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13252123 \hich\af41\dbch\af13\loch\f41 will determing the }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 \hich\f41 \r
- input files from the path of \'93\loch\f41 $(outputDir)\\ $(Arch) \\ $(ActivePlatfromName) \\$(ModuleName) \\$(ModuleName) \\DEBUG\r
+ input files from the path of \'93\loch\f41 $(outputDir)\\ $(Arch) \\ $(ActivePlatformName) \\$(ModuleName) \\$(ModuleName) \\DEBUG\r
\par }\pard \ltrpar\ql \fi-360\li420\ri0\sb200\nowidctlpar\tx420\wrapdefault\faauto\rin0\lin420\itap0 {\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 1.\tab If Arch list was }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \r
\fs18\cf1\insrsid13252123 \hich\af41\dbch\af13\loch\f41 specified}{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 , }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13252123 \hich\af41\dbch\af13\loch\f41 \r
the }{\rtlch\fcs1 \af41\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 GenFds tool will use this Arch instead of Arch List in Target.txt file\r
\fs24\lang1033\langfe1033\loch\af41\hich\af41\dbch\af13\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af41\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5513321 {\*\bkmkend OLE_LINK3}{\*\bkmkend OLE_LINK4}{\*\bkmkend OLE_LINK5}\hich\af41\dbch\af13\loch\f41 \r
Example\r
\par }\pard\plain \ltrpar\ql \li60\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin60\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af41\hich\af41\dbch\af13\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af41\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 1. WORKSAPCE has already set. $(WORKSPACE) = c:\\work\\\hich\af41\dbch\af13\loch\f41 EdkII. The Fdf file is in c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf. Output directory is c:\\work\\EdkII\\\r
+\ltrch\fcs0 \fs18\cf1\insrsid5513321 \hich\af41\dbch\af13\loch\f41 1. WORKSPACE has already set. $(WORKSPACE) = c:\\work\\\hich\af41\dbch\af13\loch\f41 EdkII. The Fdf file is in c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf. Output directory is c:\\work\\EdkII\\\r
Build\\Nt32\\Debug_MyTools. ActivePlatform is C:\\work\\EdkII\\Nt32Pkg\\Nt32Pkg.dsc\r
\par \hich\af41\dbch\af13\loch\f41 GenFds \hich\f41 \endash \loch\f41 f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \hich\f41 \endash \loch\f41 o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTo\hich\af41\dbch\af13\loch\f41 ols \hich\f41 \endash \loch\f41 p c:\\work\\EdkII\r
\\Nt32pkg\\Nt32Pkg.dsc\r
-\par \hich\af41\dbch\af13\loch\f41 GenFds \hich\f41 \endash \loch\f41 f $(WORKSPACE)\\Nt32Pkg\\Nt32Pkg.fdf \hich\f41 \endash \loch\f41 o $(WORSPACE)\\Build\\Nt32\\Debug_MyTools \hich\f41 \endash \loch\f41 p $(WORKSAPCE)\\Nt32Pkg\\Nt32Pkg.dsc\r
+\par \hich\af41\dbch\af13\loch\f41 GenFds \hich\f41 \endash \loch\f41 f $(WORKSPACE)\\Nt32Pkg\\Nt32Pkg.fdf \hich\f41 \endash \loch\f41 o $(WORSPACE)\\Build\\Nt32\\Debug_MyTools \hich\f41 \endash \loch\f41 p $(WORKSPACE)\\Nt32Pkg\\Nt32Pkg.dsc\r
\par \r
\par \hich\af41\dbch\af13\loch\f41 GenFds \hich\f41 \endash \loch\f41 f Nt32Pkg\\Nt32Pkg.fdf \hich\f41 \endash \loch\f41 o Build\\Nt32\\Debug_MyTools \hich\f41 \endash \loch\f41 p Nt32Pkg\\Nt32Pkg.dsc\r
\par \hich\af41\dbch\af13\loch\f41 2. Generate on\hich\af41\dbch\af13\loch\f41 e FD which is defined in FDF file. Use \hich\f41 \lquote \loch\f41 -r\hich\f41 \rquote \loch\f41 \r
\ab\af43\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4815795 \r
\par }{\rtlch\fcs1 \ab\af43\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid8459339 \hich\af43\dbch\af31505\loch\f43 Filename1 [FilenameN]\r
\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af43\afs18 \ltrch\fcs0 \fs18\cf1\insrsid8459339 \hich\af43\dbch\af31505\loch\f43 \r
-Input PE/PE32+ image, or TE image, or MicroCode Txt file, or MicroCode bin file, or hii binary pakcages.\r
+Input PE/PE32+ image, or TE image, or MicroCode Txt file, or MicroCode bin file, or hii binary packages.\r
\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af43\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid8459339 \hich\af43\dbch\af31505\loch\f43 -o FileName, --outputfile FileName\r
\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af43\afs18 \ltrch\fcs0 \fs18\cf1\insrsid8459339 \hich\af43\dbch\af31505\loch\f43 \r
The EFI image, TeImage, AcpiImage, MicroBin, hii package lists file or other modified PE image\hich\af43\dbch\af31505\loch\f43 will be created.\r
If you do not have a tianocore.org account, you can make use of the 'guest'\r
account with an empty password.\r
\r
-In a web browser, you can 'browse' the relavent source at this location:\r
+In a web browser, you can 'browse' the relevant source at this location:\r
http://sourceforge.net/p/edk2-buildtools/code/HEAD/tree/trunk/BaseTools/gcc\r
\r
-Or, with subversion, you can download the relavent source with this command:\r
+Or, with subversion, you can download the relevant source with this command:\r
svn co https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools/gcc\r
if result:\r
print('All files have been downloaded & verified')\r
else:\r
- print('An error occured while downloading a file')\r
+ print('An error occurred while downloading a file')\r
return\r
\r
Extracter(sources, config).ExtractAll()\r
\r
:check_c_tools\r
echo.\r
- echo !!! ERROR !!! Binary C tools are missing. They are requried to be built from BaseTools Source.\r
+ echo !!! ERROR !!! Binary C tools are missing. They are required to be built from BaseTools Source.\r
echo.\r
\r
:check_build_environment\r
"<python_source_dir>/build/build.py" directly.\r
\r
* Convert Python source to exe file\r
- The tools written in Python can be coverted into executable program which can\r
+ The tools written in Python can be converted into executable program which can\r
be executed without Python interpreter. One of the conversion tools is called\r
cx_Freeze, available at: \r
\r
of such entity.\r
* "Contribution" shall mean any original work of authorship,\r
including any modifications or additions to an existing work,\r
- that is intentionally submitted by You to the TinaoCore site for\r
+ that is intentionally submitted by You to the TianoCore site for\r
inclusion in, or documentation of, any of the Content. For the\r
purposes of this definition, "submitted" means any form of\r
electronic, verbal, or written communication sent to the\r
:checkNt32Flag\r
if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
\r
-@REM The Nt32 Emluation Platform requires Microsoft Libraries\r
+@REM The Nt32 Emulation Platform requires Microsoft Libraries\r
@REM and headers to interface with Windows.\r
if /I "%1"=="--nt32" (\r
if /I "%2"=="X64" (\r