summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/Common
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-07-05 17:40:04 +0800
committerLiming Gao <liming.gao@intel.com>2018-07-09 10:25:47 +0800
commitf7496d717357b9af78414d19679b073403812340 (patch)
tree67621e65fd181bdf8a12d12e7706579beaaed0fb /BaseTools/Source/C/Common
parent39456d00f36e04b7e7efb208f350f4e83b6c3531 (diff)
downloadedk2-f7496d717357b9af78414d19679b073403812340.zip
edk2-f7496d717357b9af78414d19679b073403812340.tar.gz
edk2-f7496d717357b9af78414d19679b073403812340.tar.bz2
BaseTools: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/C/Common')
-rw-r--r--BaseTools/Source/C/Common/BasePeCoff.c116
-rw-r--r--BaseTools/Source/C/Common/BinderFuncs.h8
-rw-r--r--BaseTools/Source/C/Common/CommonLib.c60
-rw-r--r--BaseTools/Source/C/Common/CommonLib.h6
-rw-r--r--BaseTools/Source/C/Common/Compress.h20
-rw-r--r--BaseTools/Source/C/Common/Crc32.c16
-rw-r--r--BaseTools/Source/C/Common/Crc32.h16
-rw-r--r--BaseTools/Source/C/Common/Decompress.c4
-rw-r--r--BaseTools/Source/C/Common/Decompress.h16
-rw-r--r--BaseTools/Source/C/Common/EfiCompress.c500
-rw-r--r--BaseTools/Source/C/Common/EfiUtilityMsgs.h18
-rw-r--r--BaseTools/Source/C/Common/FirmwareVolumeBuffer.c6
-rw-r--r--BaseTools/Source/C/Common/FvLib.c38
-rw-r--r--BaseTools/Source/C/Common/FvLib.h20
-rw-r--r--BaseTools/Source/C/Common/MemoryFile.c16
-rw-r--r--BaseTools/Source/C/Common/MemoryFile.h16
-rw-r--r--BaseTools/Source/C/Common/MyAlloc.c16
-rw-r--r--BaseTools/Source/C/Common/MyAlloc.h16
-rw-r--r--BaseTools/Source/C/Common/OsPath.c20
-rw-r--r--BaseTools/Source/C/Common/OsPath.h18
-rw-r--r--BaseTools/Source/C/Common/ParseGuidedSectionTools.c20
-rw-r--r--BaseTools/Source/C/Common/ParseGuidedSectionTools.h16
-rw-r--r--BaseTools/Source/C/Common/ParseInf.c54
-rw-r--r--BaseTools/Source/C/Common/ParseInf.h40
-rw-r--r--BaseTools/Source/C/Common/PeCoffLib.h58
-rw-r--r--BaseTools/Source/C/Common/PeCoffLoaderEx.c128
-rw-r--r--BaseTools/Source/C/Common/SimpleFileParsing.c46
-rw-r--r--BaseTools/Source/C/Common/SimpleFileParsing.h16
-rw-r--r--BaseTools/Source/C/Common/StringFuncs.c18
-rw-r--r--BaseTools/Source/C/Common/StringFuncs.h16
-rw-r--r--BaseTools/Source/C/Common/TianoCompress.c96
31 files changed, 727 insertions, 727 deletions
diff --git a/BaseTools/Source/C/Common/BasePeCoff.c b/BaseTools/Source/C/Common/BasePeCoff.c
index fb7ce25..1d89a30 100644
--- a/BaseTools/Source/C/Common/BasePeCoff.c
+++ b/BaseTools/Source/C/Common/BasePeCoff.c
@@ -2,15 +2,15 @@
Functions to get info and load PE/COFF image.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "PeCoffLib.h"
typedef union {
- VOID *Header;
+ VOID *Header;
EFI_IMAGE_OPTIONAL_HEADER32 *Optional32;
EFI_IMAGE_OPTIONAL_HEADER64 *Optional64;
} EFI_IMAGE_OPTIONAL_HEADER_POINTER;
@@ -90,12 +90,12 @@ Arguments:
ImageContext - The context of the image being loaded
PeHdr - The buffer in which to return the PE header
-
+
TeHdr - The buffer in which to return the TE header
Returns:
- RETURN_SUCCESS if the PE or TE Header is read,
+ RETURN_SUCCESS if the PE or TE Header is read,
Otherwise, the error status from reading the PE/COFF or TE image using the ImageRead function.
--*/
@@ -135,7 +135,7 @@ Returns:
//
// Check the PE/COFF Header Signature. If not, then try to get a TE header
//
- *TeHdr = (EFI_TE_IMAGE_HEADER *)*PeHdr;
+ *TeHdr = (EFI_TE_IMAGE_HEADER *)*PeHdr;
if ((*TeHdr)->Signature != EFI_TE_IMAGE_HEADER_SIGNATURE) {
return RETURN_UNSUPPORTED;
}
@@ -163,7 +163,7 @@ Arguments:
ImageContext - The context of the image being loaded
PeHdr - The buffer in which to return the PE header
-
+
TeHdr - The buffer in which to return the TE header
Returns:
@@ -174,7 +174,7 @@ Returns:
--*/
{
//
- // See if the machine type is supported.
+ // See if the machine type is supported.
// We support a native machine type (IA-32/Itanium-based)
//
if (ImageContext->IsTeImage == FALSE) {
@@ -182,7 +182,7 @@ Returns:
} else {
ImageContext->Machine = TeHdr->Machine;
}
-
+
if (ImageContext->Machine != EFI_IMAGE_MACHINE_IA32 && \
ImageContext->Machine != EFI_IMAGE_MACHINE_IA64 && \
ImageContext->Machine != EFI_IMAGE_MACHINE_X64 && \
@@ -191,7 +191,7 @@ Returns:
ImageContext->Machine != EFI_IMAGE_MACHINE_AARCH64) {
if (ImageContext->Machine == IMAGE_FILE_MACHINE_ARM) {
//
- // There are two types of ARM images. Pure ARM and ARM/Thumb.
+ // There are two types of ARM images. Pure ARM and ARM/Thumb.
// If we see the ARM say it is the ARM/Thumb so there is only
// a single machine type we need to check for ARM.
//
@@ -204,8 +204,8 @@ Returns:
} else {
//
- // unsupported PeImage machine type
- //
+ // unsupported PeImage machine type
+ //
return RETURN_UNSUPPORTED;
}
}
@@ -225,8 +225,8 @@ Returns:
ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER && \
ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER) {
//
- // upsupported PeImage subsystem type
- //
+ // upsupported PeImage subsystem type
+ //
return RETURN_UNSUPPORTED;
}
@@ -348,7 +348,7 @@ Returns:
ImageContext->ImageSize = (UINT64) OptionHeader.Optional32->SizeOfImage;
ImageContext->SectionAlignment = OptionHeader.Optional32->SectionAlignment;
ImageContext->SizeOfHeaders = OptionHeader.Optional32->SizeOfHeaders;
-
+
//
// Modify ImageSize to contain .PDB file name if required and initialize
// PdbRVA field...
@@ -361,7 +361,7 @@ Returns:
ImageContext->ImageSize = (UINT64) OptionHeader.Optional64->SizeOfImage;
ImageContext->SectionAlignment = OptionHeader.Optional64->SectionAlignment;
ImageContext->SizeOfHeaders = OptionHeader.Optional64->SizeOfHeaders;
-
+
//
// Modify ImageSize to contain .PDB file name if required and initialize
// PdbRVA field...
@@ -371,7 +371,7 @@ Returns:
DebugDirectoryEntryRva = DebugDirectoryEntry->VirtualAddress;
}
}
-
+
if (DebugDirectoryEntryRva != 0) {
//
// Determine the file offset of the debug directory... This means we walk
@@ -382,8 +382,8 @@ Returns:
SectionHeaderOffset = (UINTN)(
ImageContext->PeCoffHeaderOffset +
- sizeof (UINT32) +
- sizeof (EFI_IMAGE_FILE_HEADER) +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
PeHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
@@ -413,12 +413,12 @@ Returns:
SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER);
}
- if (DebugDirectoryEntryFileOffset != 0) {
+ if (DebugDirectoryEntryFileOffset != 0) {
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {
//
// Read next debug directory entry
//
- Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
+ Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
Status = ImageContext->ImageRead (
ImageContext->Handle,
DebugDirectoryEntryFileOffset + Index,
@@ -489,8 +489,8 @@ Returns:
//
// In Te image header there is not a field to describe the ImageSize.
- // Actually, the ImageSize equals the RVA plus the VirtualSize of
- // the last section mapped into memory (Must be rounded up to
+ // Actually, the ImageSize equals the RVA plus the VirtualSize of
+ // the last section mapped into memory (Must be rounded up to
// a mulitple of Section Alignment). Per the PE/COFF specification, the
// section headers in the Section Table must appear in order of the RVA
// values for the corresponding sections. So the ImageSize can be determined
@@ -627,9 +627,9 @@ Returns:
// Use DestinationAddress field of ImageContext as the relocation address even if it is 0.
//
BaseAddress = ImageContext->DestinationAddress;
-
+
if (!(ImageContext->IsTeImage)) {
- PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)((UINTN)ImageContext->ImageAddress +
+ PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)((UINTN)ImageContext->ImageAddress +
ImageContext->PeCoffHeaderOffset);
OptionHeader.Header = (VOID *) &(PeHdr->Pe32.OptionalHeader);
if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
@@ -708,20 +708,20 @@ Returns:
Adjust = (UINT64) (BaseAddress - TeHdr->ImageBase);
TeHdr->ImageBase = (UINT64) (BaseAddress);
MachineType = TeHdr->Machine;
-
+
//
// Find the relocation block
//
RelocDir = &TeHdr->DataDirectory[0];
RelocBase = (EFI_IMAGE_BASE_RELOCATION *)(UINTN)(
- ImageContext->ImageAddress +
+ ImageContext->ImageAddress +
RelocDir->VirtualAddress +
- sizeof(EFI_TE_IMAGE_HEADER) -
+ sizeof(EFI_TE_IMAGE_HEADER) -
TeHdr->StrippedSize
);
RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *) ((UINTN) RelocBase + (UINTN) RelocDir->Size - 1);
}
-
+
//
// Run the relocation information and apply the fixups
//
@@ -739,13 +739,13 @@ Returns:
} else {
FixupBase = (CHAR8 *)(UINTN)(ImageContext->ImageAddress +
RelocBase->VirtualAddress +
- sizeof(EFI_TE_IMAGE_HEADER) -
+ sizeof(EFI_TE_IMAGE_HEADER) -
TeHdr->StrippedSize
);
}
if ((CHAR8 *) RelocEnd < (CHAR8 *) ((UINTN) ImageContext->ImageAddress) ||
- (CHAR8 *) RelocEnd > (CHAR8 *)((UINTN)ImageContext->ImageAddress +
+ (CHAR8 *) RelocEnd > (CHAR8 *)((UINTN)ImageContext->ImageAddress +
(UINTN)ImageContext->ImageSize)) {
ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION;
return RETURN_LOAD_ERROR;
@@ -961,12 +961,12 @@ Returns:
((UINTN)ImageContext->ImageAddress + ImageContext->PeCoffHeaderOffset);
OptionHeader.Header = (VOID *) &(PeHdr->Pe32.OptionalHeader);
-
+
FirstSection = (EFI_IMAGE_SECTION_HEADER *) (
(UINTN)ImageContext->ImageAddress +
ImageContext->PeCoffHeaderOffset +
- sizeof(UINT32) +
- sizeof(EFI_IMAGE_FILE_HEADER) +
+ sizeof(UINT32) +
+ sizeof(EFI_IMAGE_FILE_HEADER) +
PeHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
NumberOfSections = (UINTN) (PeHdr->Pe32.FileHeader.NumberOfSections);
@@ -1016,7 +1016,7 @@ Returns:
return RETURN_LOAD_ERROR;
}
-
+
if (ImageContext->IsTeImage) {
Base = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);
End = (CHAR8 *) ((UINTN) End + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);
@@ -1286,19 +1286,19 @@ PeCoffLoaderGetPdbPointer (
if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {
DirectoryEntry = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];
TEImageAdjust = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;
-
+
//
// Get the DebugEntry offset in the raw data image.
//
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (Hdr.Te + 1);
Index = Hdr.Te->NumberOfSections;
for (Index1 = 0; Index1 < Index; Index1 ++) {
- if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&
+ if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&
(DirectoryEntry->VirtualAddress < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {
DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN) Hdr.Te +
- DirectoryEntry->VirtualAddress -
- SectionHeader [Index1].VirtualAddress +
- SectionHeader [Index1].PointerToRawData +
+ DirectoryEntry->VirtualAddress -
+ SectionHeader [Index1].VirtualAddress +
+ SectionHeader [Index1].PointerToRawData +
TEImageAdjust);
break;
}
@@ -1334,8 +1334,8 @@ PeCoffLoaderGetPdbPointer (
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
(UINT8 *) Hdr.Pe32 +
- sizeof (UINT32) +
- sizeof (EFI_IMAGE_FILE_HEADER) +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
Hdr.Pe32->FileHeader.SizeOfOptionalHeader
);
Index = Hdr.Pe32->FileHeader.NumberOfSections;
@@ -1362,12 +1362,12 @@ PeCoffLoaderGetPdbPointer (
// Get the DebugEntry offset in the raw data image.
//
for (Index1 = 0; Index1 < Index; Index1 ++) {
- if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&
+ if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&
(DirectoryEntry->VirtualAddress < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {
DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) (
- (UINTN) Pe32Data +
- DirectoryEntry->VirtualAddress -
- SectionHeader[Index1].VirtualAddress +
+ (UINTN) Pe32Data +
+ DirectoryEntry->VirtualAddress -
+ SectionHeader[Index1].VirtualAddress +
SectionHeader[Index1].PointerToRawData);
break;
}
@@ -1383,7 +1383,7 @@ PeCoffLoaderGetPdbPointer (
//
// Scan the directory to find the debug entry.
- //
+ //
for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) {
if (EFI_IMAGE_DEBUG_TYPE_CODEVIEW == DebugEntry->Type) {
if (DebugEntry->SizeOfData > 0) {
@@ -1392,13 +1392,13 @@ PeCoffLoaderGetPdbPointer (
//
CodeViewEntryPointer = NULL;
for (Index1 = 0; Index1 < Index; Index1 ++) {
- if ((DebugEntry->RVA >= SectionHeader[Index1].VirtualAddress) &&
+ if ((DebugEntry->RVA >= SectionHeader[Index1].VirtualAddress) &&
(DebugEntry->RVA < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {
CodeViewEntryPointer = (VOID *) (
- ((UINTN)Pe32Data) +
- (UINTN) DebugEntry->RVA -
- SectionHeader[Index1].VirtualAddress +
- SectionHeader[Index1].PointerToRawData +
+ ((UINTN)Pe32Data) +
+ (UINTN) DebugEntry->RVA -
+ SectionHeader[Index1].VirtualAddress +
+ SectionHeader[Index1].PointerToRawData +
(UINTN)TEImageAdjust);
break;
}
diff --git a/BaseTools/Source/C/Common/BinderFuncs.h b/BaseTools/Source/C/Common/BinderFuncs.h
index 310d76a..fadcece 100644
--- a/BaseTools/Source/C/Common/BinderFuncs.h
+++ b/BaseTools/Source/C/Common/BinderFuncs.h
@@ -1,9 +1,9 @@
/** @file
-Prototypes for binder functions that allow common code to be written which then
-links to implementation of these functions which is appropriate for the specific
+Prototypes for binder functions that allow common code to be written which then
+links to implementation of these functions which is appropriate for the specific
environment that they are running under.
-
-Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
+
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/BaseTools/Source/C/Common/CommonLib.c b/BaseTools/Source/C/Common/CommonLib.c
index 15509e3..618aada 100644
--- a/BaseTools/Source/C/Common/CommonLib.c
+++ b/BaseTools/Source/C/Common/CommonLib.c
@@ -2,13 +2,13 @@
Common basic Library Functions
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -136,7 +136,7 @@ Arguments:
Returns:
= 0 if Guid1 == Guid2
- != 0 if Guid1 != Guid2
+ != 0 if Guid1 != Guid2
--*/
{
@@ -169,7 +169,7 @@ GetFileImage (
Routine Description:
- This function opens a file and reads it into a memory buffer. The function
+ This function opens a file and reads it into a memory buffer. The function
will allocate the memory buffer and returns the size of the buffer.
Arguments:
@@ -332,7 +332,7 @@ CalculateChecksum8 (
IN UINTN Size
)
/*++
-
+
Routine Description:
This function calculates the value needed for a valid UINT8 checksum
@@ -357,7 +357,7 @@ CalculateSum8 (
IN UINTN Size
)
/*++
-
+
Routine Description::
This function calculates the UINT8 sum for the requested region.
@@ -394,7 +394,7 @@ CalculateChecksum16 (
IN UINTN Size
)
/*++
-
+
Routine Description::
This function calculates the value needed for a valid UINT16 checksum
@@ -419,7 +419,7 @@ CalculateSum16 (
IN UINTN Size
)
/*++
-
+
Routine Description:
This function calculates the UINT16 sum for the requested region.
@@ -518,7 +518,7 @@ Returns:
EFI_SUCCESS The GUID was printed.
EFI_INVALID_PARAMETER The input was NULL.
EFI_BUFFER_TOO_SMALL The input buffer was not big enough
-
+
--*/
{
if (Guid == NULL) {
@@ -593,7 +593,7 @@ char *strlwr(char *s)
#define WINDOWS_UNC_EXTENSION_PATH "\\\\?\\UNC"
//
-// Global data to store full file path. It is not required to be free.
+// Global data to store full file path. It is not required to be free.
//
CHAR8 mCommonLibFullPath[MAX_LONG_FILE_PATH];
@@ -604,32 +604,32 @@ LongFilePath (
/*++
Routine Description:
- Convert FileName to the long file path, which can support larger than 260 length.
+ Convert FileName to the long file path, which can support larger than 260 length.
Arguments:
- FileName - FileName.
+ FileName - FileName.
Returns:
LongFilePath A pointer to the converted long file path.
-
+
--*/
{
#ifdef __GNUC__
//
- // __GNUC__ may not be good way to differentiate unix and windows. Need more investigation here.
- // unix has no limitation on file path. Just return FileName.
+ // __GNUC__ may not be good way to differentiate unix and windows. Need more investigation here.
+ // unix has no limitation on file path. Just return FileName.
//
return FileName;
#else
CHAR8 *RootPath;
CHAR8 *PathPointer;
CHAR8 *NextPointer;
-
+
PathPointer = (CHAR8 *) FileName;
-
+
if (FileName != NULL) {
//
- // Add the extension string first to support long file path.
+ // Add the extension string first to support long file path.
//
mCommonLibFullPath[0] = 0;
strcpy (mCommonLibFullPath, WINDOWS_EXTENSION_PATH);
@@ -642,7 +642,7 @@ Returns:
FileName ++;
} else if (strlen (FileName) < 3 || FileName[1] != ':' || (FileName[2] != '\\' && FileName[2] != '/')) {
//
- // Relative file path. Convert it to absolute path.
+ // Relative file path. Convert it to absolute path.
//
RootPath = getcwd (NULL, 0);
if (RootPath != NULL) {
@@ -675,7 +675,7 @@ Returns:
return NULL;
}
strncat (mCommonLibFullPath, FileName, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);
-
+
//
// Convert directory separator '/' to '\\'
//
@@ -685,7 +685,7 @@ Returns:
*PathPointer = '\\';
}
} while (*PathPointer ++ != '\0');
-
+
//
// Convert ":\\\\" to ":\\", because it doesn't work with WINDOWS_EXTENSION_PATH.
//
@@ -693,7 +693,7 @@ Returns:
*(PathPointer + 2) = '\0';
strncat (mCommonLibFullPath, PathPointer + 3, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);
}
-
+
//
// Convert ".\\" to "", because it doesn't work with WINDOWS_EXTENSION_PATH.
//
@@ -701,7 +701,7 @@ Returns:
*PathPointer = '\0';
strncat (mCommonLibFullPath, PathPointer + 2, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);
}
-
+
//
// Convert "\\.\\" to "\\", because it doesn't work with WINDOWS_EXTENSION_PATH.
//
@@ -732,10 +732,10 @@ Returns:
break;
}
}
-
+
PathPointer = mCommonLibFullPath;
}
-
+
return PathPointer;
#endif
}
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index dccb192..fa10fac 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -451,14 +451,14 @@ SplitStr (
/*++
Routine Description:
- Convert FileName to the long file path, which can support larger than 260 length.
+ Convert FileName to the long file path, which can support larger than 260 length.
Arguments:
- FileName - FileName.
+ FileName - FileName.
Returns:
LongFilePath A pointer to the converted long file path.
-
+
--*/
#ifdef __cplusplus
diff --git a/BaseTools/Source/C/Common/Compress.h b/BaseTools/Source/C/Common/Compress.h
index beb2ebe..e114b5c 100644
--- a/BaseTools/Source/C/Common/Compress.h
+++ b/BaseTools/Source/C/Common/Compress.h
@@ -1,16 +1,16 @@
/** @file
Header file for compression routine.
Providing both EFI and Tiano Compress algorithms.
-
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
+
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
**/
#ifndef _COMPRESS_H_
diff --git a/BaseTools/Source/C/Common/Crc32.c b/BaseTools/Source/C/Common/Crc32.c
index 05d7a8d..dc15887 100644
--- a/BaseTools/Source/C/Common/Crc32.c
+++ b/BaseTools/Source/C/Common/Crc32.c
@@ -1,14 +1,14 @@
/** @file
CalcuateCrc32 routine.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/Crc32.h b/BaseTools/Source/C/Common/Crc32.h
index 8146171..766f443 100644
--- a/BaseTools/Source/C/Common/Crc32.h
+++ b/BaseTools/Source/C/Common/Crc32.h
@@ -1,14 +1,14 @@
/** @file
Header file for CalcuateCrc32 routine
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c
index 8f1afb4..9906888 100644
--- a/BaseTools/Source/C/Common/Decompress.c
+++ b/BaseTools/Source/C/Common/Decompress.c
@@ -1,8 +1,8 @@
/** @file
-Decompressor. Algorithm Ported from OPSD code (Decomp.asm) for Efi and Tiano
+Decompressor. Algorithm Ported from OPSD code (Decomp.asm) for Efi and Tiano
compress algorithm.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
diff --git a/BaseTools/Source/C/Common/Decompress.h b/BaseTools/Source/C/Common/Decompress.h
index 2899ed5..22ac1df 100644
--- a/BaseTools/Source/C/Common/Decompress.h
+++ b/BaseTools/Source/C/Common/Decompress.h
@@ -1,14 +1,14 @@
/** @file
Header file for compression routine
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/EfiCompress.c b/BaseTools/Source/C/Common/EfiCompress.c
index b225fee..33d4c5e 100644
--- a/BaseTools/Source/C/Common/EfiCompress.c
+++ b/BaseTools/Source/C/Common/EfiCompress.c
@@ -1,17 +1,17 @@
/** @file
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman
-coding. LZ77 transforms the source data into a sequence of Original Characters
-and Pointers to repeated strings. This sequence is further divided into Blocks
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman
+coding. LZ77 transforms the source data into a sequence of Original Characters
+and Pointers to repeated strings. This sequence is further divided into Blocks
and Huffman codings are applied to each Block.
-
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -60,13 +60,13 @@ typedef INT16 NODE;
//
STATIC
-VOID
+VOID
PutDword(
IN UINT32 Data
);
STATIC
-EFI_STATUS
+EFI_STATUS
AllocateMemory (
);
@@ -75,160 +75,160 @@ VOID
FreeMemory (
);
-STATIC
-VOID
+STATIC
+VOID
InitSlide (
);
-STATIC
-NODE
+STATIC
+NODE
Child (
- IN NODE q,
+ IN NODE q,
IN UINT8 c
);
-STATIC
-VOID
+STATIC
+VOID
MakeChild (
- IN NODE q,
- IN UINT8 c,
+ IN NODE q,
+ IN UINT8 c,
IN NODE r
);
-
-STATIC
-VOID
+
+STATIC
+VOID
Split (
IN NODE Old
);
-STATIC
-VOID
+STATIC
+VOID
InsertNode (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
DeleteNode (
);
-STATIC
-VOID
+STATIC
+VOID
GetNextMatch (
);
-
-STATIC
-EFI_STATUS
+
+STATIC
+EFI_STATUS
Encode (
);
-STATIC
-VOID
+STATIC
+VOID
CountTFreq (
);
-STATIC
-VOID
+STATIC
+VOID
WritePTLen (
- IN INT32 n,
- IN INT32 nbit,
+ IN INT32 n,
+ IN INT32 nbit,
IN INT32 Special
);
-STATIC
-VOID
+STATIC
+VOID
WriteCLen (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
EncodeC (
IN INT32 c
);
-STATIC
-VOID
+STATIC
+VOID
EncodeP (
IN UINT32 p
);
-STATIC
-VOID
+STATIC
+VOID
SendBlock (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
Output (
- IN UINT32 c,
+ IN UINT32 c,
IN UINT32 p
);
-STATIC
-VOID
+STATIC
+VOID
HufEncodeStart (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
HufEncodeEnd (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
MakeCrcTable (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
PutBits (
- IN INT32 n,
+ IN INT32 n,
IN UINT32 x
);
-
-STATIC
-INT32
+
+STATIC
+INT32
FreadCrc (
- OUT UINT8 *p,
+ OUT UINT8 *p,
IN INT32 n
);
-
-STATIC
-VOID
+
+STATIC
+VOID
InitPutBits (
);
-
-STATIC
-VOID
+
+STATIC
+VOID
CountLen (
IN INT32 i
);
-STATIC
-VOID
+STATIC
+VOID
MakeLen (
IN INT32 Root
);
-
-STATIC
-VOID
+
+STATIC
+VOID
DownHeap (
IN INT32 i
);
-STATIC
-VOID
+STATIC
+VOID
MakeCode (
- IN INT32 n,
- IN UINT8 Len[],
+ IN INT32 n,
+ IN UINT8 Len[],
OUT UINT16 Code[]
);
-
-STATIC
-INT32
+
+STATIC
+INT32
MakeTree (
- IN INT32 NParm,
- IN UINT16 FreqParm[],
- OUT UINT8 LenParm[],
+ IN INT32 NParm,
+ IN UINT16 FreqParm[],
+ OUT UINT8 LenParm[],
OUT UINT16 CodeParm[]
);
@@ -286,7 +286,7 @@ Returns:
--*/
{
EFI_STATUS Status = EFI_SUCCESS;
-
+
//
// Initializations
//
@@ -300,7 +300,7 @@ Returns:
mPrev = NULL;
mNext = NULL;
-
+
mSrc = SrcBuffer;
mSrcUpperLimit = mSrc + SrcSize;
mDst = DstBuffer;
@@ -308,28 +308,28 @@ Returns:
PutDword(0L);
PutDword(0L);
-
+
MakeCrcTable ();
mOrigSize = mCompSize = 0;
mCrc = INIT_CRC;
-
+
//
// Compress it
//
-
+
Status = Encode();
if (EFI_ERROR (Status)) {
return EFI_OUT_OF_RESOURCES;
}
-
+
//
// Null terminate the compressed data
//
if (mDst < mDstUpperLimit) {
*mDst++ = 0;
}
-
+
//
// Fill in compressed size and original size
//
@@ -340,7 +340,7 @@ Returns:
//
// Return
//
-
+
if (mCompSize + 1 + 8 > *DstSize) {
*DstSize = mCompSize + 1 + 8;
return EFI_BUFFER_TOO_SMALL;
@@ -351,8 +351,8 @@ Returns:
}
-STATIC
-VOID
+STATIC
+VOID
PutDword(
IN UINT32 Data
)
@@ -361,13 +361,13 @@ PutDword(
Routine Description:
Put a dword to output stream
-
+
Arguments:
Data - the dword to put
-
+
Returns: (VOID)
-
+
--*/
{
if (mDst < mDstUpperLimit) {
@@ -395,7 +395,7 @@ AllocateMemory ()
Routine Description:
Allocate memory spaces for data structures used in compression process
-
+
Argements: (VOID)
Returns:
@@ -406,7 +406,7 @@ Returns:
--*/
{
UINT32 i;
-
+
mText = malloc (WNDSIZ * 2 + MAXMATCH);
if (mText == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -425,7 +425,7 @@ Returns:
mParent == NULL || mPrev == NULL || mNext == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
mBufSiz = 16 * 1024U;
while ((mBuf = malloc(mBufSiz)) == NULL) {
mBufSiz = (mBufSiz / 10U) * 9U;
@@ -434,7 +434,7 @@ Returns:
}
}
mBuf[0] = 0;
-
+
return EFI_SUCCESS;
}
@@ -445,7 +445,7 @@ FreeMemory ()
Routine Description:
Called when compression is completed to free memory previously allocated.
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -455,48 +455,48 @@ Returns: (VOID)
if (mText) {
free (mText);
}
-
+
if (mLevel) {
free (mLevel);
}
-
+
if (mChildCount) {
free (mChildCount);
}
-
+
if (mPosition) {
free (mPosition);
}
-
+
if (mParent) {
free (mParent);
}
-
+
if (mPrev) {
free (mPrev);
}
-
+
if (mNext) {
free (mNext);
}
-
+
if (mBuf) {
free (mBuf);
- }
+ }
return;
}
-STATIC
-VOID
+STATIC
+VOID
InitSlide ()
/*++
Routine Description:
Initialize String Info Log data structures
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -511,23 +511,23 @@ Returns: (VOID)
}
for (i = WNDSIZ; i < WNDSIZ * 2; i++) {
mParent[i] = NIL;
- }
+ }
mAvail = 1;
for (i = 1; i < WNDSIZ - 1; i++) {
mNext[i] = (NODE)(i + 1);
}
-
+
mNext[WNDSIZ - 1] = NIL;
for (i = WNDSIZ * 2; i <= MAX_HASH_VAL; i++) {
mNext[i] = NIL;
- }
+ }
}
-STATIC
-NODE
+STATIC
+NODE
Child (
- IN NODE q,
+ IN NODE q,
IN UINT8 c
)
/*++
@@ -535,34 +535,34 @@ Child (
Routine Description:
Find child node given the parent node and the edge character
-
+
Arguments:
q - the parent node
c - the edge character
-
+
Returns:
- The child node (NIL if not found)
-
+ The child node (NIL if not found)
+
--*/
{
NODE r;
-
+
r = mNext[HASH(q, c)];
mParent[NIL] = q; /* sentinel */
while (mParent[r] != q) {
r = mNext[r];
}
-
+
return r;
}
-STATIC
-VOID
+STATIC
+VOID
MakeChild (
- IN NODE q,
- IN UINT8 c,
+ IN NODE q,
+ IN UINT8 c,
IN NODE r
)
/*++
@@ -570,19 +570,19 @@ MakeChild (
Routine Description:
Create a new child for a given parent node.
-
+
Arguments:
q - the parent node
c - the edge character
r - the child node
-
+
Returns: (VOID)
--*/
{
NODE h, t;
-
+
h = (NODE)HASH(q, c);
t = mNext[h];
mNext[h] = r;
@@ -593,8 +593,8 @@ Returns: (VOID)
mChildCount[q]++;
}
-STATIC
-VOID
+STATIC
+VOID
Split (
NODE Old
)
@@ -603,11 +603,11 @@ Split (
Routine Description:
Split a node.
-
+
Arguments:
Old - the node to split
-
+
Returns: (VOID)
--*/
@@ -630,15 +630,15 @@ Returns: (VOID)
MakeChild(New, mText[mPos + mMatchLen], mPos);
}
-STATIC
-VOID
+STATIC
+VOID
InsertNode ()
/*++
Routine Description:
Insert string info for current position into the String Info Log
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -649,7 +649,7 @@ Returns: (VOID)
UINT8 c, *t1, *t2;
if (mMatchLen >= 4) {
-
+
//
// We have just got a long match, the target tree
// can be located by MatchPos + 1. Travese the tree
@@ -657,7 +657,7 @@ Returns: (VOID)
// The usage of PERC_FLAG ensures proper node deletion
// in DeleteNode() later.
//
-
+
mMatchLen--;
r = (INT16)((mMatchPos + 1) | WNDSIZ);
while ((q = mParent[r]) == NIL) {
@@ -673,13 +673,13 @@ Returns: (VOID)
}
if (t < WNDSIZ) {
mPosition[t] = (NODE)(mPos | PERC_FLAG);
- }
+ }
} else {
-
+
//
// Locate the target tree
//
-
+
q = (INT16)(mText[mPos] + WNDSIZ);
c = mText[mPos + 1];
if ((r = Child(q, c)) == NIL) {
@@ -689,13 +689,13 @@ Returns: (VOID)
}
mMatchLen = 2;
}
-
+
//
// Traverse down the tree to find a match.
// Update Position value along the route.
// Node split or creation is involved.
//
-
+
for ( ; ; ) {
if (r >= WNDSIZ) {
j = MAXMATCH;
@@ -706,7 +706,7 @@ Returns: (VOID)
}
if (mMatchPos >= mPos) {
mMatchPos -= WNDSIZ;
- }
+ }
t1 = &mText[mPos + mMatchLen];
t2 = &mText[mMatchPos + mMatchLen];
while (mMatchLen < j) {
@@ -737,16 +737,16 @@ Returns: (VOID)
mPrev[t] = mPos;
mParent[mPos] = q;
mParent[r] = NIL;
-
+
//
// Special usage of 'next'
//
mNext[r] = mPos;
-
+
}
-STATIC
-VOID
+STATIC
+VOID
DeleteNode ()
/*++
@@ -754,7 +754,7 @@ Routine Description:
Delete outdated string info. (The Usage of PERC_FLAG
ensures a clean deletion)
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -766,7 +766,7 @@ Returns: (VOID)
if (mParent[mPos] == NIL) {
return;
}
-
+
r = mPrev[mPos];
s = mNext[mPos];
mNext[r] = s;
@@ -819,8 +819,8 @@ Returns: (VOID)
mAvail = r;
}
-STATIC
-VOID
+STATIC
+VOID
GetNextMatch ()
/*++
@@ -860,7 +860,7 @@ Routine Description:
Arguments: (VOID)
Returns:
-
+
EFI_SUCCESS - The compression is successful
EFI_OUT_0F_RESOURCES - Not enough memory for compression process
@@ -877,11 +877,11 @@ Returns:
}
InitSlide();
-
+
HufEncodeStart();
mRemainder = FreadCrc(&mText[WNDSIZ], WNDSIZ + MAXMATCH);
-
+
mMatchLen = 0;
mPos = WNDSIZ;
InsertNode();
@@ -895,21 +895,21 @@ Returns:
if (mMatchLen > mRemainder) {
mMatchLen = mRemainder;
}
-
+
if (mMatchLen > LastMatchLen || LastMatchLen < THRESHOLD) {
-
+
//
// Not enough benefits are gained by outputting a pointer,
// so just output the original character
//
-
+
Output(mText[mPos - 1], 0);
} else {
-
+
//
// Outputting a pointer is beneficial enough, do it.
//
-
+
Output(LastMatchLen + (UINT8_MAX + 1 - THRESHOLD),
(mPos - LastMatchPos - 2) & (WNDSIZ - 1));
while (--LastMatchLen > 0) {
@@ -920,21 +920,21 @@ Returns:
}
}
}
-
+
HufEncodeEnd();
FreeMemory();
return EFI_SUCCESS;
}
-STATIC
-VOID
+STATIC
+VOID
CountTFreq ()
/*++
Routine Description:
Count the frequencies for the Extra Set
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -975,11 +975,11 @@ Returns: (VOID)
}
}
-STATIC
-VOID
+STATIC
+VOID
WritePTLen (
- IN INT32 n,
- IN INT32 nbit,
+ IN INT32 n,
+ IN INT32 nbit,
IN INT32 Special
)
/*++
@@ -987,13 +987,13 @@ WritePTLen (
Routine Description:
Outputs the code length array for the Extra Set or the Position Set.
-
+
Arguments:
n - the number of symbols
nbit - the number of bits needed to represent 'n'
Special - the special symbol that needs to be take care of
-
+
Returns: (VOID)
--*/
@@ -1021,15 +1021,15 @@ Returns: (VOID)
}
}
-STATIC
-VOID
+STATIC
+VOID
WriteCLen ()
/*++
Routine Description:
Outputs the code length array for Char&Length Set
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -1073,8 +1073,8 @@ Returns: (VOID)
}
}
-STATIC
-VOID
+STATIC
+VOID
EncodeC (
IN INT32 c
)
@@ -1082,8 +1082,8 @@ EncodeC (
PutBits(mCLen[c], mCCode[c]);
}
-STATIC
-VOID
+STATIC
+VOID
EncodeP (
IN UINT32 p
)
@@ -1102,15 +1102,15 @@ EncodeP (
}
}
-STATIC
-VOID
+STATIC
+VOID
SendBlock ()
/*++
Routine Description:
Huffman code the block and output it.
-
+
Argument: (VOID)
Returns: (VOID)
@@ -1171,10 +1171,10 @@ Returns: (VOID)
}
-STATIC
-VOID
+STATIC
+VOID
Output (
- IN UINT32 c,
+ IN UINT32 c,
IN UINT32 p
)
/*++
@@ -1200,7 +1200,7 @@ Returns: (VOID)
SendBlock();
mOutputPos = 0;
}
- CPos = mOutputPos++;
+ CPos = mOutputPos++;
mBuf[CPos] = 0;
}
mBuf[mOutputPos++] = (UINT8) c;
@@ -1235,23 +1235,23 @@ HufEncodeStart ()
return;
}
-STATIC
-VOID
+STATIC
+VOID
HufEncodeEnd ()
{
SendBlock();
-
+
//
// Flush remaining bits
//
PutBits(UINT8_BIT - 1, 0);
-
+
return;
}
-STATIC
-VOID
+STATIC
+VOID
MakeCrcTable ()
{
UINT32 i, j, r;
@@ -1265,14 +1265,14 @@ MakeCrcTable ()
r >>= 1;
}
}
- mCrcTable[i] = (UINT16)r;
+ mCrcTable[i] = (UINT16)r;
}
}
-STATIC
-VOID
+STATIC
+VOID
PutBits (
- IN INT32 n,
+ IN INT32 n,
IN UINT32 x
)
/*++
@@ -1284,18 +1284,18 @@ Routine Description:
Argments:
n - the rightmost n bits of the data is used
- x - the data
+ x - the data
Returns: (VOID)
--*/
{
- UINT8 Temp;
-
+ UINT8 Temp;
+
if (n < mBitCount) {
mSubBitBuf |= x << (mBitCount -= n);
} else {
-
+
Temp = (UINT8)(mSubBitBuf | (x >> (n -= mBitCount)));
if (mDst < mDstUpperLimit) {
*mDst++ = Temp;
@@ -1305,22 +1305,22 @@ Returns: (VOID)
if (n < UINT8_BIT) {
mSubBitBuf = x << (mBitCount = UINT8_BIT - n);
} else {
-
+
Temp = (UINT8)(x >> (n - UINT8_BIT));
if (mDst < mDstUpperLimit) {
*mDst++ = Temp;
}
mCompSize++;
-
+
mSubBitBuf = x << (mBitCount = 2 * UINT8_BIT - n);
}
}
}
-STATIC
-INT32
+STATIC
+INT32
FreadCrc (
- OUT UINT8 *p,
+ OUT UINT8 *p,
IN INT32 n
)
/*++
@@ -1328,7 +1328,7 @@ FreadCrc (
Routine Description:
Read in source data
-
+
Arguments:
p - the buffer to hold the data
@@ -1337,7 +1337,7 @@ Arguments:
Returns:
number of bytes actually read
-
+
--*/
{
INT32 i;
@@ -1356,16 +1356,16 @@ Returns:
}
-STATIC
-VOID
+STATIC
+VOID
InitPutBits ()
{
- mBitCount = UINT8_BIT;
+ mBitCount = UINT8_BIT;
mSubBitBuf = 0;
}
-STATIC
-VOID
+STATIC
+VOID
CountLen (
IN INT32 i
)
@@ -1374,11 +1374,11 @@ CountLen (
Routine Description:
Count the number of each code length for a Huffman tree.
-
+
Arguments:
i - the top node
-
+
Returns: (VOID)
--*/
@@ -1395,8 +1395,8 @@ Returns: (VOID)
}
}
-STATIC
-VOID
+STATIC
+VOID
MakeLen (
IN INT32 Root
)
@@ -1405,7 +1405,7 @@ MakeLen (
Routine Description:
Create code length array for a Huffman tree
-
+
Arguments:
Root - the root of the tree
@@ -1419,12 +1419,12 @@ Arguments:
mLenCnt[i] = 0;
}
CountLen(Root);
-
+
//
// Adjust the length count array so that
// no code will be generated longer than its designated length
//
-
+
Cum = 0;
for (i = 16; i > 0; i--) {
Cum += mLenCnt[i] << (16 - i);
@@ -1448,8 +1448,8 @@ Arguments:
}
}
-STATIC
-VOID
+STATIC
+VOID
DownHeap (
IN INT32 i
)
@@ -1459,7 +1459,7 @@ DownHeap (
//
// priority queue: send i-th entry down heap
//
-
+
k = mHeap[i];
while ((j = 2 * i) <= mHeapSize) {
if (j < mHeapSize && mFreq[mHeap[j]] > mFreq[mHeap[j + 1]]) {
@@ -1474,11 +1474,11 @@ DownHeap (
mHeap[i] = (INT16)k;
}
-STATIC
-VOID
+STATIC
+VOID
MakeCode (
- IN INT32 n,
- IN UINT8 Len[],
+ IN INT32 n,
+ IN UINT8 Len[],
OUT UINT16 Code[]
)
/*++
@@ -1486,7 +1486,7 @@ MakeCode (
Routine Description:
Assign code to each symbol based on the code length array
-
+
Arguments:
n - number of symbols
@@ -1509,12 +1509,12 @@ Returns: (VOID)
}
}
-STATIC
-INT32
+STATIC
+INT32
MakeTree (
- IN INT32 NParm,
- IN UINT16 FreqParm[],
- OUT UINT8 LenParm[],
+ IN INT32 NParm,
+ IN UINT16 FreqParm[],
+ OUT UINT8 LenParm[],
OUT UINT16 CodeParm[]
)
/*++
@@ -1522,22 +1522,22 @@ MakeTree (
Routine Description:
Generates Huffman codes given a frequency distribution of symbols
-
+
Arguments:
NParm - number of symbols
FreqParm - frequency of each symbol
LenParm - code length for each symbol
CodeParm - code for each symbol
-
+
Returns:
Root of the Huffman tree.
-
+
--*/
{
INT32 i, j, k, Avail;
-
+
//
// make tree, calculate len[], return root
//
@@ -1552,16 +1552,16 @@ Returns:
mLen[i] = 0;
if (mFreq[i]) {
mHeap[++mHeapSize] = (INT16)i;
- }
+ }
}
if (mHeapSize < 2) {
CodeParm[mHeap[1]] = 0;
return mHeap[1];
}
for (i = mHeapSize / 2; i >= 1; i--) {
-
+
//
- // make priority queue
+ // make priority queue
//
DownHeap(i);
}
@@ -1584,11 +1584,11 @@ Returns:
mLeft[k] = (UINT16)i;
mRight[k] = (UINT16)j;
} while (mHeapSize > 1);
-
+
mSortPtr = CodeParm;
MakeLen(k);
MakeCode(NParm, LenParm, CodeParm);
-
+
//
// return root
//
diff --git a/BaseTools/Source/C/Common/EfiUtilityMsgs.h b/BaseTools/Source/C/Common/EfiUtilityMsgs.h
index 40b5e10..eb330a6 100644
--- a/BaseTools/Source/C/Common/EfiUtilityMsgs.h
+++ b/BaseTools/Source/C/Common/EfiUtilityMsgs.h
@@ -1,14 +1,14 @@
/** @file
Defines and prototypes for common EFI utility error and debug messages.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -32,7 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define STATUS_SUCCESS 0
#define STATUS_WARNING 1
#define STATUS_ERROR 2
-#define VOID void
+#define VOID void
typedef int STATUS;
diff --git a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
index d4a6353..c68d2ee 100644
--- a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
+++ b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
@@ -1,7 +1,7 @@
/** @file
EFI Firmware Volume routines which work on a Fv image in buffers.
-Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1654,7 +1654,7 @@ FvBufCalculateSum16 (
IN UINTN Size
)
/*++
-
+
Routine Description:
This function calculates the UINT16 sum for the requested region.
@@ -1693,7 +1693,7 @@ FvBufCalculateChecksum16 (
IN UINTN Size
)
/*++
-
+
Routine Description::
This function calculates the value needed for a valid UINT16 checksum
diff --git a/BaseTools/Source/C/Common/FvLib.c b/BaseTools/Source/C/Common/FvLib.c
index f97a7f2..b5ae45d 100644
--- a/BaseTools/Source/C/Common/FvLib.c
+++ b/BaseTools/Source/C/Common/FvLib.c
@@ -1,14 +1,14 @@
/** @file
These functions assist in parsing and manipulating a Firmware Volume.
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -44,9 +44,9 @@ Arguments:
Fv Buffer containing the FV.
FvLength Length of the FV
-
+
Returns:
-
+
EFI_SUCCESS Function Completed successfully.
EFI_INVALID_PARAMETER A required parameter was NULL.
@@ -80,9 +80,9 @@ Arguments:
FvHeader Pointer to the FV buffer.
FvLength Length of the FV
-
+
Returns:
-
+
EFI_SUCCESS Function Completed successfully.
EFI_INVALID_PARAMETER A required parameter was NULL.
EFI_ABORTED The library needs to be initialized.
@@ -117,16 +117,16 @@ GetNextFile (
Routine Description:
This function returns the next file. If the current file is NULL, it returns
- the first file in the FV. If the function returns EFI_SUCCESS and the file
+ the first file in the FV. If the function returns EFI_SUCCESS and the file
pointer is NULL, then there are no more files in the FV.
Arguments:
CurrentFile Pointer to the current file, must be within the current FV.
NextFile Pointer to the next file in the FV.
-
+
Returns:
-
+
EFI_SUCCESS Function completed successfully.
EFI_INVALID_PARAMETER A required parameter was NULL or is out of range.
EFI_ABORTED The library needs to be initialized.
@@ -496,7 +496,7 @@ GetSectionByType (
Routine Description:
- Find a section in a file by type and instance. An instance of 1 is the first
+ Find a section in a file by type and instance. An instance of 1 is the first
instance. The function will return NULL if a matching section cannot be found.
GUID-defined sections, if special processing is not needed, are handled in a
depth-first manner.
@@ -543,7 +543,7 @@ Returns:
// Get the first section
//
CurrentSection.CommonHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) File + GetFfsHeaderLength(File));
-
+
//
// Depth-first manner to find section file.
//
@@ -858,7 +858,7 @@ Returns:
EFI_SUCCESS The function completed successfully.
EFI_INVALID_PARAMETER One of the input parameters was invalid.
EFI_ABORTED Operation aborted.
-
+
--*/
{
EFI_STATUS Status;
@@ -905,7 +905,7 @@ Routine Description:
It in no way validate the FFS file.
Arguments:
-
+
ErasePolarity The erase polarity for the file state bits.
FfsHeader Pointer to a FFS file.
diff --git a/BaseTools/Source/C/Common/FvLib.h b/BaseTools/Source/C/Common/FvLib.h
index 751bb38..e79866e 100644
--- a/BaseTools/Source/C/Common/FvLib.h
+++ b/BaseTools/Source/C/Common/FvLib.h
@@ -1,14 +1,14 @@
/** @file
These functions assist in parsing and manipulating a Firmware Volume.
-
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -183,7 +183,7 @@ Routine Description:
It in no way validate the FFS file.
Arguments:
-
+
ErasePolarity The erase polarity for the file state bits.
FfsHeader Pointer to a FFS file.
diff --git a/BaseTools/Source/C/Common/MemoryFile.c b/BaseTools/Source/C/Common/MemoryFile.c
index ec27619..dbd47e5 100644
--- a/BaseTools/Source/C/Common/MemoryFile.c
+++ b/BaseTools/Source/C/Common/MemoryFile.c
@@ -1,14 +1,14 @@
/** @file
This contains some useful functions for accessing files.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/MemoryFile.h b/BaseTools/Source/C/Common/MemoryFile.h
index 552417a..2d267d5 100644
--- a/BaseTools/Source/C/Common/MemoryFile.h
+++ b/BaseTools/Source/C/Common/MemoryFile.h
@@ -1,14 +1,14 @@
/** @file
Header file for helper functions useful for accessing files.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/MyAlloc.c b/BaseTools/Source/C/Common/MyAlloc.c
index be7c515..4b656ed 100644
--- a/BaseTools/Source/C/Common/MyAlloc.c
+++ b/BaseTools/Source/C/Common/MyAlloc.c
@@ -1,14 +1,14 @@
/** @file
File for memory allocation tracking functions.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/MyAlloc.h b/BaseTools/Source/C/Common/MyAlloc.h
index e220e63..fa9146e 100644
--- a/BaseTools/Source/C/Common/MyAlloc.h
+++ b/BaseTools/Source/C/Common/MyAlloc.h
@@ -1,14 +1,14 @@
/** @file
Header file for memory allocation tracking functions.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/OsPath.c b/BaseTools/Source/C/Common/OsPath.c
index 7c90dfe..b46516d 100644
--- a/BaseTools/Source/C/Common/OsPath.c
+++ b/BaseTools/Source/C/Common/OsPath.c
@@ -1,14 +1,14 @@
/** @file
Functions useful to operate file directories by parsing file path.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -87,7 +87,7 @@ Returns:
}
//
- //
+ //
//
for (Offset = Length; Offset > 0; Offset--) {
if ((Return[Offset] == '/') || (Return[Offset] == '\\')) {
@@ -195,7 +195,7 @@ Returns:
}
//
- //
+ //
//
for (Offset = Length; Offset > 0; Offset--) {
if ((Return[Offset] == '/') || (Return[Offset] == '\\')) {
diff --git a/BaseTools/Source/C/Common/OsPath.h b/BaseTools/Source/C/Common/OsPath.h
index 0deaa9e..d3d75ea 100644
--- a/BaseTools/Source/C/Common/OsPath.h
+++ b/BaseTools/Source/C/Common/OsPath.h
@@ -1,15 +1,15 @@
/** @file
-Header file for helper functions useful to operate file directories by parsing
+Header file for helper functions useful to operate file directories by parsing
file path.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/ParseGuidedSectionTools.c b/BaseTools/Source/C/Common/ParseGuidedSectionTools.c
index 115cfa4..5afe963 100644
--- a/BaseTools/Source/C/Common/ParseGuidedSectionTools.c
+++ b/BaseTools/Source/C/Common/ParseGuidedSectionTools.c
@@ -1,14 +1,14 @@
/** @file
Helper functions for parsing GuidedSectionTools.txt
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -76,7 +76,7 @@ Returns:
ParsedGuidedSectionTools = ParseGuidedSectionToolsMemoryFile (MemoryFile);
FreeMemoryFile (MemoryFile);
-
+
return ParsedGuidedSectionTools;
}
@@ -122,7 +122,7 @@ Returns:
if (NextLine == NULL) {
break;
}
-
+
Status = StripInfDscStringInPlace (NextLine);
if (EFI_ERROR (Status)) {
free (NextLine);
diff --git a/BaseTools/Source/C/Common/ParseGuidedSectionTools.h b/BaseTools/Source/C/Common/ParseGuidedSectionTools.h
index d9c1f8c..e41b092 100644
--- a/BaseTools/Source/C/Common/ParseGuidedSectionTools.h
+++ b/BaseTools/Source/C/Common/ParseGuidedSectionTools.h
@@ -1,14 +1,14 @@
/** @file
Header file for helper functions for parsing GuidedSectionTools.txt
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/ParseInf.c b/BaseTools/Source/C/Common/ParseInf.c
index d784536..4d10ff8 100644
--- a/BaseTools/Source/C/Common/ParseInf.c
+++ b/BaseTools/Source/C/Common/ParseInf.c
@@ -1,14 +1,14 @@
/** @file
This contains some useful functions for parsing INF files.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -31,11 +31,11 @@ ReadLine (
Routine Description:
This function reads a line, stripping any comments.
- The function reads a string from the input stream argument and stores it in
- the input string. ReadLine reads characters from the current file position
- to and including the first newline character, to the end of the stream, or
- until the number of characters read is equal to MaxLength - 1, whichever
- comes first. The newline character, if read, is replaced with a \0.
+ The function reads a string from the input stream argument and stores it in
+ the input string. ReadLine reads characters from the current file position
+ to and including the first newline character, to the end of the stream, or
+ until the number of characters read is equal to MaxLength - 1, whichever
+ comes first. The newline character, if read, is replaced with a \0.
Arguments:
@@ -372,17 +372,17 @@ StringToGuid (
)
/*++
-Routine Description:
+Routine Description:
- Converts a string to an EFI_GUID. The string must be in the
+ Converts a string to an EFI_GUID. The string must be in the
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.
-Arguments:
+Arguments:
AsciiGuidBuffer - pointer to ascii string
GuidBuffer - pointer to destination Guid
-Returns:
+Returns:
EFI_ABORTED Could not convert the string
EFI_SUCCESS The string was successfully converted
@@ -408,7 +408,7 @@ Returns:
break;
}
} else {
- if (((AsciiGuidBuffer[Index] >= '0') && (AsciiGuidBuffer[Index] <= '9')) ||
+ if (((AsciiGuidBuffer[Index] >= '0') && (AsciiGuidBuffer[Index] <= '9')) ||
((AsciiGuidBuffer[Index] >= 'a') && (AsciiGuidBuffer[Index] <= 'f')) ||
((AsciiGuidBuffer[Index] >= 'A') && (AsciiGuidBuffer[Index] <= 'F'))) {
continue;
@@ -417,12 +417,12 @@ Returns:
}
}
}
-
+
if (Index < 36 || AsciiGuidBuffer[36] != '\0') {
Error (NULL, 0, 1003, "Invalid option value", "Incorrect GUID \"%s\"\n Correct Format \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"", AsciiGuidBuffer);
return EFI_ABORTED;
}
-
+
//
// Scan the guid string into the buffer
//
@@ -477,9 +477,9 @@ AsciiStringToUint64 (
Routine Description:
- Converts a null terminated ascii string that represents a number into a
- UINT64 value. A hex number may be preceeded by a 0x, but may not be
- succeeded by an h. A number without 0x or 0X is considered to be base 10
+ Converts a null terminated ascii string that represents a number into a
+ UINT64 value. A hex number may be preceeded by a 0x, but may not be
+ succeeded by an h. A number without 0x or 0X is considered to be base 10
unless the IsHex input is true.
Arguments:
@@ -498,13 +498,13 @@ Returns:
UINT8 Index;
UINT64 Value;
CHAR8 CurrentChar;
-
+
//
// Initialize the result
//
Value = 0;
Index = 0;
-
+
//
// Check input parameter
//
@@ -514,11 +514,11 @@ Returns:
while (AsciiString[Index] == ' ') {
Index ++;
}
-
+
//
// Add each character to the result
//
-
+
//
// Skip first two chars only if the string starts with '0x' or '0X'
//
diff --git a/BaseTools/Source/C/Common/ParseInf.h b/BaseTools/Source/C/Common/ParseInf.h
index 80ee388..903ce71 100644
--- a/BaseTools/Source/C/Common/ParseInf.h
+++ b/BaseTools/Source/C/Common/ParseInf.h
@@ -1,14 +1,14 @@
/** @file
Header file for helper functions useful for parsing INF files.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -39,11 +39,11 @@ ReadLine (
Routine Description:
This function reads a line, stripping any comments.
- The function reads a string from the input stream argument and stores it in
- the input string. ReadLine reads characters from the current file position
- to and including the first newline character, to the end of the stream, or
- until the number of characters read is equal to MaxLength - 1, whichever
- comes first. The newline character, if read, is replaced with a \0.
+ The function reads a string from the input stream argument and stores it in
+ the input string. ReadLine reads characters from the current file position
+ to and including the first newline character, to the end of the stream, or
+ until the number of characters read is equal to MaxLength - 1, whichever
+ comes first. The newline character, if read, is replaced with a \0.
Arguments:
@@ -124,17 +124,17 @@ StringToGuid (
/*++
-Routine Description:
+Routine Description:
- Converts a string to an EFI_GUID. The string must be in the
+ Converts a string to an EFI_GUID. The string must be in the
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.
-Arguments:
+Arguments:
GuidBuffer - pointer to destination Guid
AsciiGuidBuffer - pointer to ascii string
-Returns:
+Returns:
EFI_ABORTED Could not convert the string
EFI_SUCCESS The string was successfully converted
@@ -152,9 +152,9 @@ AsciiStringToUint64 (
Routine Description:
- Converts a null terminated ascii string that represents a number into a
- UINT64 value. A hex number may be preceeded by a 0x, but may not be
- succeeded by an h. A number without 0x or 0X is considered to be base 10
+ Converts a null terminated ascii string that represents a number into a
+ UINT64 value. A hex number may be preceeded by a 0x, but may not be
+ succeeded by an h. A number without 0x or 0X is considered to be base 10
unless the IsHex input is true.
Arguments:
diff --git a/BaseTools/Source/C/Common/PeCoffLib.h b/BaseTools/Source/C/Common/PeCoffLib.h
index b56dd75..80c8c33 100644
--- a/BaseTools/Source/C/Common/PeCoffLib.h
+++ b/BaseTools/Source/C/Common/PeCoffLib.h
@@ -1,14 +1,14 @@
/** @file
- Function prototypes and defines on Memory Only PE COFF loader
+ Function prototypes and defines on Memory Only PE COFF loader
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -20,7 +20,7 @@
// BUGBUG: Find where used and see if can be replaced by RETURN_STATUS codes
//
#define IMAGE_ERROR_SUCCESS 0
-#define IMAGE_ERROR_IMAGE_READ 1
+#define IMAGE_ERROR_IMAGE_READ 1
#define IMAGE_ERROR_INVALID_PE_HEADER_SIGNATURE 2
#define IMAGE_ERROR_INVALID_MACHINE_TYPE 3
#define IMAGE_ERROR_INVALID_SUBSYSTEM 4
@@ -73,15 +73,15 @@ typedef struct {
/**
- Retrieves information on a PE/COFF image
+ Retrieves information on a PE/COFF image
- @param ImageContext The context of the image being loaded
+ @param ImageContext The context of the image being loaded
- @retval EFI_SUCCESS The information on the PE/COFF image was collected.
- @retval EFI_INVALID_PARAMETER ImageContext is NULL.
- @retval EFI_UNSUPPORTED The PE/COFF image is not supported.
- @retval Otherwise The error status from reading the PE/COFF image using the
- ImageContext->ImageRead() function
+ @retval EFI_SUCCESS The information on the PE/COFF image was collected.
+ @retval EFI_INVALID_PARAMETER ImageContext is NULL.
+ @retval EFI_UNSUPPORTED The PE/COFF image is not supported.
+ @retval Otherwise The error status from reading the PE/COFF image using the
+ ImageContext->ImageRead() function
**/
RETURN_STATUS
@@ -92,13 +92,13 @@ PeCoffLoaderGetImageInfo (
;
/**
- Relocates a PE/COFF image in memory
+ Relocates a PE/COFF image in memory
- @param ImageContext Contains information on the loaded image to relocate
+ @param ImageContext Contains information on the loaded image to relocate
- @retval EFI_SUCCESS if the PE/COFF image was relocated
- @retval EFI_LOAD_ERROR if the image is not a valid PE/COFF image
- @retval EFI_UNSUPPORTED not support
+ @retval EFI_SUCCESS if the PE/COFF image was relocated
+ @retval EFI_LOAD_ERROR if the image is not a valid PE/COFF image
+ @retval EFI_UNSUPPORTED not support
**/
RETURN_STATUS
@@ -109,14 +109,14 @@ PeCoffLoaderRelocateImage (
;
/**
- Loads a PE/COFF image into memory
+ Loads a PE/COFF image into memory
- @param ImageContext Contains information on image to load into memory
+ @param ImageContext Contains information on image to load into memory
- @retval EFI_SUCCESS if the PE/COFF image was loaded
- @retval EFI_BUFFER_TOO_SMALL if the caller did not provide a large enough buffer
- @retval EFI_LOAD_ERROR if the image is a runtime driver with no relocations
- @retval EFI_INVALID_PARAMETER if the image address is invalid
+ @retval EFI_SUCCESS if the PE/COFF image was loaded
+ @retval EFI_BUFFER_TOO_SMALL if the caller did not provide a large enough buffer
+ @retval EFI_LOAD_ERROR if the image is a runtime driver with no relocations
+ @retval EFI_INVALID_PARAMETER if the image address is invalid
**/
RETURN_STATUS
@@ -148,7 +148,7 @@ PeCoffLoaderGetEntryPoint (
//
/**
- Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
return the immediate data encoded in the instruction
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@@ -178,7 +178,7 @@ ThumbMovtImmediatePatch (
/**
- Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
+ Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
return the immediate data encoded in the two` instruction
@param Instructions Pointer to ARM MOVW/MOVT insturction pair
diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
index d04fa7d..2d9a2a8 100644
--- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
+++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
@@ -1,15 +1,15 @@
/** @file
IA32, X64 and IPF Specific relocation fixups
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
--*/
@@ -27,45 +27,45 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*(UINT32*)Address = (*(UINT32*)Address & ~(((1 << Size) - 1) << InstPos)) | \
((UINT32)((((UINT64)Value >> ValPos) & (((UINT64)1 << Size) - 1))) << InstPos)
-#define IMM64_IMM7B_INST_WORD_X 3
-#define IMM64_IMM7B_SIZE_X 7
-#define IMM64_IMM7B_INST_WORD_POS_X 4
-#define IMM64_IMM7B_VAL_POS_X 0
-
-#define IMM64_IMM9D_INST_WORD_X 3
-#define IMM64_IMM9D_SIZE_X 9
-#define IMM64_IMM9D_INST_WORD_POS_X 18
-#define IMM64_IMM9D_VAL_POS_X 7
-
-#define IMM64_IMM5C_INST_WORD_X 3
-#define IMM64_IMM5C_SIZE_X 5
-#define IMM64_IMM5C_INST_WORD_POS_X 13
-#define IMM64_IMM5C_VAL_POS_X 16
-
-#define IMM64_IC_INST_WORD_X 3
-#define IMM64_IC_SIZE_X 1
-#define IMM64_IC_INST_WORD_POS_X 12
-#define IMM64_IC_VAL_POS_X 21
-
-#define IMM64_IMM41a_INST_WORD_X 1
-#define IMM64_IMM41a_SIZE_X 10
-#define IMM64_IMM41a_INST_WORD_POS_X 14
-#define IMM64_IMM41a_VAL_POS_X 22
-
-#define IMM64_IMM41b_INST_WORD_X 1
-#define IMM64_IMM41b_SIZE_X 8
-#define IMM64_IMM41b_INST_WORD_POS_X 24
-#define IMM64_IMM41b_VAL_POS_X 32
-
-#define IMM64_IMM41c_INST_WORD_X 2
-#define IMM64_IMM41c_SIZE_X 23
-#define IMM64_IMM41c_INST_WORD_POS_X 0
-#define IMM64_IMM41c_VAL_POS_X 40
-
-#define IMM64_SIGN_INST_WORD_X 3
-#define IMM64_SIGN_SIZE_X 1
-#define IMM64_SIGN_INST_WORD_POS_X 27
-#define IMM64_SIGN_VAL_POS_X 63
+#define IMM64_IMM7B_INST_WORD_X 3
+#define IMM64_IMM7B_SIZE_X 7
+#define IMM64_IMM7B_INST_WORD_POS_X 4
+#define IMM64_IMM7B_VAL_POS_X 0
+
+#define IMM64_IMM9D_INST_WORD_X 3
+#define IMM64_IMM9D_SIZE_X 9
+#define IMM64_IMM9D_INST_WORD_POS_X 18
+#define IMM64_IMM9D_VAL_POS_X 7
+
+#define IMM64_IMM5C_INST_WORD_X 3
+#define IMM64_IMM5C_SIZE_X 5
+#define IMM64_IMM5C_INST_WORD_POS_X 13
+#define IMM64_IMM5C_VAL_POS_X 16
+
+#define IMM64_IC_INST_WORD_X 3
+#define IMM64_IC_SIZE_X 1
+#define IMM64_IC_INST_WORD_POS_X 12
+#define IMM64_IC_VAL_POS_X 21
+
+#define IMM64_IMM41a_INST_WORD_X 1
+#define IMM64_IMM41a_SIZE_X 10
+#define IMM64_IMM41a_INST_WORD_POS_X 14
+#define IMM64_IMM41a_VAL_POS_X 22
+
+#define IMM64_IMM41b_INST_WORD_X 1
+#define IMM64_IMM41b_SIZE_X 8
+#define IMM64_IMM41b_INST_WORD_POS_X 24
+#define IMM64_IMM41b_VAL_POS_X 32
+
+#define IMM64_IMM41c_INST_WORD_X 2
+#define IMM64_IMM41c_SIZE_X 23
+#define IMM64_IMM41c_INST_WORD_POS_X 0
+#define IMM64_IMM41c_VAL_POS_X 40
+
+#define IMM64_SIGN_INST_WORD_X 3
+#define IMM64_SIGN_SIZE_X 1
+#define IMM64_SIGN_INST_WORD_POS_X 27
+#define IMM64_SIGN_VAL_POS_X 63
RETURN_STATUS
PeCoffLoaderRelocateIa32Image (
@@ -102,7 +102,7 @@ Returns:
RETURN_STATUS
PeCoffLoaderRelocateIpfImage (
IN UINT16 *Reloc,
- IN OUT CHAR8 *Fixup,
+ IN OUT CHAR8 *Fixup,
IN OUT CHAR8 **FixupData,
IN UINT64 Adjust
)
@@ -142,8 +142,8 @@ Returns:
Fixup = (CHAR8 *)((UINTN) Fixup & (UINTN) ~(15));
FixupVal = (UINT64)0;
-
- //
+
+ //
// Extract the lower 32 bits of IMM64 from bundle
//
EXT_IMM64(FixupVal,
@@ -180,13 +180,13 @@ Returns:
IMM64_IMM41a_INST_WORD_POS_X,
IMM64_IMM41a_VAL_POS_X
);
-
- //
+
+ //
// Update 64-bit address
//
FixupVal += Adjust;
- //
+ //
// Insert IMM64 into bundle
//
INS_IMM64(FixupVal,
@@ -261,7 +261,7 @@ Returns:
}
/**
- Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
return the immediate data encoded in the instruction
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@@ -279,7 +279,7 @@ ThumbMovtImmediateAddress (
// Thumb2 is two 16-bit instructions working together. Not a single 32-bit instruction
// Example MOVT R0, #0 is 0x0000f2c0 or 0xf2c0 0x0000
- Movt = (*Instruction << 16) | (*(Instruction + 1));
+ Movt = (*Instruction << 16) | (*(Instruction + 1));
// imm16 = imm4:i:imm3:imm8
// imm4 -> Bit19:Bit16
@@ -308,7 +308,7 @@ ThumbMovtImmediatePatch (
UINT16 Patch;
// First 16-bit chunk of instruciton
- Patch = ((Address >> 12) & 0x000f); // imm4
+ Patch = ((Address >> 12) & 0x000f); // imm4
Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i
*Instruction = (*Instruction & ~0x040f) | Patch;
@@ -320,7 +320,7 @@ ThumbMovtImmediatePatch (
}
/**
- Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
+ Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
return the immediate data encoded in the two` instruction
@param Instructions Pointer to ARM MOVW/MOVT insturction pair
@@ -336,10 +336,10 @@ ThumbMovwMovtImmediateAddress (
{
UINT16 *Word;
UINT16 *Top;
-
+
Word = Instructions; // MOVW
Top = Word + 2; // MOVT
-
+
return (ThumbMovtImmediateAddress (Top) << 16) + ThumbMovtImmediateAddress (Word);
}
@@ -359,7 +359,7 @@ ThumbMovwMovtImmediatePatch (
{
UINT16 *Word;
UINT16 *Top;
-
+
Word = (UINT16 *)Instructions; // MOVW
Top = Word + 2; // MOVT
@@ -394,19 +394,19 @@ PeCoffLoaderRelocateArmImage (
Fixup16 = (UINT16 *) Fixup;
switch ((**Reloc) >> 12) {
-
+
case EFI_IMAGE_REL_BASED_ARM_MOV32T:
FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;
ThumbMovwMovtImmediatePatch (Fixup16, FixupVal);
-
-
+
+
if (*FixupData != NULL) {
*FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
CopyMem (*FixupData, Fixup16, sizeof (UINT64));
*FixupData = *FixupData + sizeof(UINT64);
}
break;
-
+
case EFI_IMAGE_REL_BASED_ARM_MOV32A:
// break omitted - ARM instruction encoding not implemented
default:
diff --git a/BaseTools/Source/C/Common/SimpleFileParsing.c b/BaseTools/Source/C/Common/SimpleFileParsing.c
index 209a095..e7da044 100644
--- a/BaseTools/Source/C/Common/SimpleFileParsing.c
+++ b/BaseTools/Source/C/Common/SimpleFileParsing.c
@@ -1,14 +1,14 @@
/** @file
Generic but simple file parsing routines.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
--*/
@@ -238,7 +238,7 @@ Arguments:
FileName - name of the file to parse
Returns:
-
+
--*/
{
@@ -345,7 +345,7 @@ SFPGetNextToken (
/*++
Routine Description:
- Get the next token from the input stream.
+ Get the next token from the input stream.
Arguments:
Str - pointer to a copy of the next token
@@ -356,7 +356,7 @@ Returns:
FALSE - otherwise
Notes:
- Preceeding white space is ignored.
+ Preceeding white space is ignored.
The parser's buffer pointer is advanced past the end of the
token.
@@ -580,7 +580,7 @@ Arguments:
None.
Returns:
- STATUS_SUCCESS - the file was closed
+ STATUS_SUCCESS - the file was closed
STATUS_ERROR - no file is currently open
--*/
@@ -605,7 +605,7 @@ ProcessIncludeFile (
Routine Description:
Given a source file, open the file and parse it
-
+
Arguments:
SourceFile - name of file to parse
@@ -614,7 +614,7 @@ Arguments:
Returns:
Standard status.
-
+
--*/
{
STATIC UINTN NestDepth = 0;
@@ -674,7 +674,7 @@ Routine Description:
Given a source file that's been opened, read the contents into an internal
buffer and pre-process it to remove comments.
-
+
Arguments:
SourceFile - structure containing info on the file to process
@@ -682,7 +682,7 @@ Arguments:
Returns:
Standard status.
-
+
--*/
{
//
@@ -722,13 +722,13 @@ PreprocessFile (
Routine Description:
Preprocess a file to replace all carriage returns with NULLs so
we can print lines (as part of error messages) from the file to the screen.
-
+
Arguments:
SourceFile - structure that we use to keep track of an input file.
Returns:
Nothing.
-
+
--*/
{
BOOLEAN InComment;
@@ -826,8 +826,8 @@ SFPGetQuotedString (
/*++
Routine Description:
- Retrieve a quoted-string from the input file.
-
+ Retrieve a quoted-string from the input file.
+
Arguments:
Str - pointer to a copy of the quoted string parsed
Length - size of buffer pointed to by Str
@@ -836,7 +836,7 @@ Returns:
TRUE - next token in input stream was a quoted string, and
the string value was returned in Str
FALSE - otherwise
-
+
--*/
{
SkipWhiteSpace (&mGlobals.SourceFile);
@@ -881,14 +881,14 @@ SFPIsEOF (
Routine Description:
Return TRUE of FALSE to indicate whether or not we've reached the end of the
file we're parsing.
-
+
Arguments:
NA
Returns:
TRUE - EOF reached
FALSE - otherwise
-
+
--*/
{
SkipWhiteSpace (&mGlobals.SourceFile);
diff --git a/BaseTools/Source/C/Common/SimpleFileParsing.h b/BaseTools/Source/C/Common/SimpleFileParsing.h
index 7265232..72cc9d5 100644
--- a/BaseTools/Source/C/Common/SimpleFileParsing.h
+++ b/BaseTools/Source/C/Common/SimpleFileParsing.h
@@ -1,14 +1,14 @@
/** @file
Function prototypes and defines for the simple file parsing routines.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/StringFuncs.c b/BaseTools/Source/C/Common/StringFuncs.c
index a2bb87f..65d1414 100644
--- a/BaseTools/Source/C/Common/StringFuncs.c
+++ b/BaseTools/Source/C/Common/StringFuncs.c
@@ -1,14 +1,14 @@
/** @file
Function prototypes and defines for string routines.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -383,7 +383,7 @@ Returns:
strcat (NewString, "\"");
}
strcat (NewString, "]");
-
+
return NewString;
}
diff --git a/BaseTools/Source/C/Common/StringFuncs.h b/BaseTools/Source/C/Common/StringFuncs.h
index 4acbf10..0675cb9 100644
--- a/BaseTools/Source/C/Common/StringFuncs.h
+++ b/BaseTools/Source/C/Common/StringFuncs.h
@@ -1,14 +1,14 @@
/** @file
String routines implementation
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/BaseTools/Source/C/Common/TianoCompress.c b/BaseTools/Source/C/Common/TianoCompress.c
index 252b829..8b1ea7f 100644
--- a/BaseTools/Source/C/Common/TianoCompress.c
+++ b/BaseTools/Source/C/Common/TianoCompress.c
@@ -1,17 +1,17 @@
/** @file
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman
-coding. LZ77 transforms the source data into a sequence of Original Characters
-and Pointers to repeated strings. This sequence is further divided into Blocks
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman
+coding. LZ77 transforms the source data into a sequence of Original Characters
+and Pointers to repeated strings. This sequence is further divided into Blocks
and Huffman codings are applied to each Block.
-
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -367,13 +367,13 @@ PutDword (
Routine Description:
Put a dword to output stream
-
+
Arguments:
Data - the dword to put
-
+
Returns: (VOID)
-
+
--*/
{
if (mDst < mDstUpperLimit) {
@@ -403,8 +403,8 @@ AllocateMemory (
Routine Description:
Allocate memory spaces for data structures used in compression process
-
-Argements:
+
+Argements:
VOID
Returns:
@@ -460,7 +460,7 @@ FreeMemory (
Routine Description:
Called when compression is completed to free memory previously allocated.
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -512,7 +512,7 @@ InitSlide (
Routine Description:
Initialize String Info Log data structures
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -552,16 +552,16 @@ Child (
Routine Description:
Find child node given the parent node and the edge character
-
+
Arguments:
NodeQ - the parent node
CharC - the edge character
-
+
Returns:
- The child node (NIL if not found)
-
+ The child node (NIL if not found)
+
--*/
{
NODE NodeR;
@@ -590,13 +590,13 @@ MakeChild (
Routine Description:
Create a new child for a given parent node.
-
+
Arguments:
Parent - the parent node
CharC - the edge character
Child - the child node
-
+
Returns: (VOID)
--*/
@@ -624,11 +624,11 @@ Split (
Routine Description:
Split a node.
-
+
Arguments:
Old - the node to split
-
+
Returns: (VOID)
--*/
@@ -662,7 +662,7 @@ InsertNode (
Routine Description:
Insert string info for current position into the String Info Log
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -795,7 +795,7 @@ Routine Description:
Delete outdated string info. (The Usage of PERC_FLAG
ensures a clean deletion)
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -926,7 +926,7 @@ Routine Description:
Arguments: (VOID)
Returns:
-
+
EFI_SUCCESS - The compression is successful
EFI_OUT_0F_RESOURCES - Not enough memory for compression process
@@ -1012,7 +1012,7 @@ CountTFreq (
Routine Description:
Count the frequencies for the Extra Set
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -1071,13 +1071,13 @@ WritePTLen (
Routine Description:
Outputs the code length array for the Extra Set or the Position Set.
-
+
Arguments:
Number - the number of symbols
nbit - the number of bits needed to represent 'n'
Special - the special symbol that needs to be take care of
-
+
Returns: (VOID)
--*/
@@ -1119,7 +1119,7 @@ WriteCLen (
Routine Description:
Outputs the code length array for Char&Length Set
-
+
Arguments: (VOID)
Returns: (VOID)
@@ -1209,11 +1209,11 @@ SendBlock (
Routine Description:
Huffman code the block and output it.
-
-Arguments:
+
+Arguments:
(VOID)
-Returns:
+Returns:
(VOID)
--*/
@@ -1420,7 +1420,7 @@ Routine Description:
Arguments:
Number - the rightmost n bits of the data is used
- x - the data
+ x - the data
Returns: (VOID)
@@ -1456,7 +1456,7 @@ FreadCrc (
Routine Description:
Read in source data
-
+
Arguments:
Pointer - the buffer to hold the data
@@ -1465,7 +1465,7 @@ Arguments:
Returns:
number of bytes actually read
-
+
--*/
{
INT32 Index;
@@ -1507,11 +1507,11 @@ CountLen (
Routine Description:
Count the number of each code length for a Huffman tree.
-
+
Arguments:
Index - the top node
-
+
Returns: (VOID)
--*/
@@ -1538,11 +1538,11 @@ MakeLen (
Routine Description:
Create code length array for a Huffman tree
-
+
Arguments:
Root - the root of the tree
-
+
Returns:
VOID
@@ -1634,7 +1634,7 @@ MakeCode (
Routine Description:
Assign code to each symbol based on the code length array
-
+
Arguments:
Number - number of symbols
@@ -1671,18 +1671,18 @@ MakeTree (
Routine Description:
Generates Huffman codes given a frequency distribution of symbols
-
+
Arguments:
NParm - number of symbols
FreqParm - frequency of each symbol
LenParm - code length for each symbol
CodeParm - code for each symbol
-
+
Returns:
Root of the Huffman tree.
-
+
--*/
{
INT32 Index;