summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Library/PrePiLib
diff options
context:
space:
mode:
authorRonald Cron <ronald.cron@arm.com>2014-08-19 13:29:52 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-19 13:29:52 +0000
commit3402aac7d985bf8a9f9d3c639f3fe93609380513 (patch)
tree67b11334dc45181581aaaac236243fe72c7f614c /EmbeddedPkg/Library/PrePiLib
parent62d441fb17d59958bf00c4a1f3b52bf6a0b40b24 (diff)
downloadedk2-platforms-3402aac7d985bf8a9f9d3c639f3fe93609380513.tar.xz
ARM Packages: Removed trailing spaces
Trailing spaces create issue/warning when generating/applying patches. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15833 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Library/PrePiLib')
-rw-r--r--EmbeddedPkg/Library/PrePiLib/FwVol.c136
-rw-r--r--EmbeddedPkg/Library/PrePiLib/PrePi.h2
-rw-r--r--EmbeddedPkg/Library/PrePiLib/PrePiLib.c32
-rw-r--r--EmbeddedPkg/Library/PrePiLib/PrePiLib.inf8
-rw-r--r--EmbeddedPkg/Library/PrePiLib/ReportStatusCode.c8
5 files changed, 93 insertions, 93 deletions
diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c
index 0dec29efe9..34ae0f59ac 100644
--- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
+++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
@@ -1,10 +1,10 @@
/** @file
Implementation of the 6 PEI Ffs (FV) APIs in library form.
-
+
This code only knows about a FV if it has a EFI_HOB_TYPE_FV entry in the HOB list
Copyright (c) 2008 - 2009, Apple Inc. 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
@@ -25,11 +25,11 @@
/**
Returns the highest bit set of the State field
-
+
@param ErasePolarity Erase Polarity as defined by EFI_FVB2_ERASE_POLARITY
in the Attributes field.
@param FfsHeader Pointer to FFS File Header
-
+
@retval the highest bit in the State field
@@ -56,15 +56,15 @@ GetFileState(
}
return HighestBit;
-}
+}
/**
Calculates the checksum of the header of a file.
The header is a zero byte checksum, so zero means header is good
-
+
@param FfsHeader Pointer to FFS File Header
-
+
@retval Checksum of the header
**/
@@ -77,7 +77,7 @@ CalculateHeaderChecksum (
UINT8 *Ptr;
UINTN Index;
UINT8 Sum;
-
+
Sum = 0;
Ptr = (UINT8 *)FileHeader;
@@ -91,9 +91,9 @@ CalculateHeaderChecksum (
for (; Index < sizeof(EFI_FFS_FILE_HEADER); Index++) {
Sum = (UINT8)(Sum + Ptr[Index]);
}
-
+
//
- // State field (since this indicates the different state of file).
+ // State field (since this indicates the different state of file).
//
Sum = (UINT8)(Sum - FileHeader->State);
//
@@ -107,10 +107,10 @@ CalculateHeaderChecksum (
/**
Given a FileHandle return the VolumeHandle
-
+
@param FileHandle File handle to look up
@param VolumeHandle Match for FileHandle
-
+
@retval TRUE VolumeHandle is valid
**/
@@ -129,7 +129,7 @@ FileHandleToVolume (
if (Hob.Raw == NULL) {
return FALSE;
}
-
+
do {
Hob.Raw = GetNextHob (EFI_HOB_TYPE_FV, Hob.Raw);
if (Hob.Raw != NULL) {
@@ -143,7 +143,7 @@ FileHandleToVolume (
Hob.Raw = GetNextHob (EFI_HOB_TYPE_FV, GET_NEXT_HOB (Hob));
}
} while (Hob.Raw != NULL);
-
+
return FALSE;
}
@@ -153,10 +153,10 @@ FileHandleToVolume (
Given the input file pointer, search for the next matching file in the
FFS volume as defined by SearchType. The search starts from FileHeader inside
the Firmware Volume defined by FwVolHeader.
-
+
@param FileHandle File handle to look up
@param VolumeHandle Match for FileHandle
-
+
**/
EFI_STATUS
@@ -208,13 +208,13 @@ FindFileEx (
FileOccupiedSize = GET_OCCUPIED_SIZE (FileLength, 8);
FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize);
}
-
+
FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);
ASSERT (FileOffset <= 0xFFFFFFFF);
while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {
//
- // Get FileState which is the highest bit of the State
+ // Get FileState which is the highest bit of the State
//
FileState = GetFileState (ErasePolarity, FfsFileHeader);
@@ -224,7 +224,7 @@ FindFileEx (
FileOffset += sizeof(EFI_FFS_FILE_HEADER);
FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)FfsFileHeader + sizeof(EFI_FFS_FILE_HEADER));
break;
-
+
case EFI_FILE_DATA_VALID:
case EFI_FILE_MARKED_FOR_UPDATE:
if (CalculateHeaderChecksum (FfsFileHeader) != 0) {
@@ -241,16 +241,16 @@ FindFileEx (
*FileHeader = FfsFileHeader;
return EFI_SUCCESS;
}
- } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) &&
- (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) {
+ } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) &&
+ (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) {
*FileHeader = FfsFileHeader;
return EFI_SUCCESS;
}
- FileOffset += FileOccupiedSize;
+ FileOffset += FileOccupiedSize;
FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)FfsFileHeader + FileOccupiedSize);
break;
-
+
case EFI_FILE_DELETED:
FileLength = *(UINT32 *)(FfsFileHeader->Size) & 0x00FFFFFF;
FileOccupiedSize = GET_OCCUPIED_SIZE(FileLength, 8);
@@ -261,24 +261,24 @@ FindFileEx (
default:
*FileHeader = NULL;
return EFI_NOT_FOUND;
- }
+ }
}
-
+
*FileHeader = NULL;
- return EFI_NOT_FOUND;
+ return EFI_NOT_FOUND;
}
/**
Go through the file to search SectionType section,
- when meeting an encapsuled section.
-
+ when meeting an encapsuled section.
+
@param SectionType - Filter to find only section of this type.
@param Section - From where to search.
@param SectionSize - The file size to search.
@param OutputBuffer - Pointer to the section to search.
-
+
@retval EFI_SUCCESS
**/
EFI_STATUS
@@ -310,11 +310,11 @@ FfsProcessSection (
return EFI_SUCCESS;
} else if ((Section->Type == EFI_SECTION_COMPRESSION) || (Section->Type == EFI_SECTION_GUID_DEFINED)) {
-
+
if (Section->Type == EFI_SECTION_COMPRESSION) {
CompressionSection = (EFI_COMPRESSION_SECTION *) Section;
SectionLength = *(UINT32 *)Section->Size & 0x00FFFFFF;
-
+
if (CompressionSection->CompressionType != EFI_STANDARD_COMPRESSION) {
return EFI_UNSUPPORTED;
}
@@ -333,7 +333,7 @@ FfsProcessSection (
&SectionAttribute
);
}
-
+
if (EFI_ERROR (Status)) {
//
// GetInfo failed
@@ -349,7 +349,7 @@ FfsProcessSection (
return EFI_OUT_OF_RESOURCES;
}
//
- // Allocate destination buffer, extra one page for adjustment
+ // Allocate destination buffer, extra one page for adjustment
//
DstBuffer = (VOID *)(UINTN)AllocatePages (EFI_SIZE_TO_PAGES (DstBufferSize) + 1);
if (DstBuffer == NULL) {
@@ -377,7 +377,7 @@ FfsProcessSection (
&AuthenticationStatus
);
}
-
+
if (EFI_ERROR (Status)) {
//
// Decompress failed
@@ -386,16 +386,16 @@ FfsProcessSection (
return EFI_NOT_FOUND;
} else {
return FfsProcessSection (
- SectionType,
- DstBuffer,
- DstBufferSize,
- OutputBuffer
+ SectionType,
+ DstBuffer,
+ DstBufferSize,
+ OutputBuffer
);
- }
+ }
}
//
- // Size is 24 bits wide so mask upper 8 bits.
+ // Size is 24 bits wide so mask upper 8 bits.
// SectionLength is adjusted it is 4 byte aligned.
// Go to the next section
//
@@ -405,7 +405,7 @@ FfsProcessSection (
ParsedLength += SectionLength;
Section = (EFI_COMMON_SECTION_HEADER *)((UINT8 *)Section + SectionLength);
}
-
+
return EFI_NOT_FOUND;
}
@@ -438,7 +438,7 @@ FfsFindSectionData (
FfsFileHeader = (EFI_FFS_FILE_HEADER *)(FileHandle);
//
- // Size is 24 bits wide so mask upper 8 bits.
+ // Size is 24 bits wide so mask upper 8 bits.
// Does not include FfsFileHeader header size
// FileSize is adjusted to FileOccupiedSize as it is 8 byte aligned.
//
@@ -447,9 +447,9 @@ FfsFindSectionData (
FileSize -= sizeof (EFI_FFS_FILE_HEADER);
return FfsProcessSection (
- SectionType,
- Section,
- FileSize,
+ SectionType,
+ Section,
+ FileSize,
SectionData
);
}
@@ -503,13 +503,13 @@ FfsFindNextVolume (
)
{
EFI_PEI_HOB_POINTERS Hob;
-
+
Hob.Raw = GetHobList ();
if (Hob.Raw == NULL) {
return EFI_NOT_FOUND;
}
-
+
do {
Hob.Raw = GetNextHob (EFI_HOB_TYPE_FV, Hob.Raw);
if (Hob.Raw != NULL) {
@@ -521,7 +521,7 @@ FfsFindNextVolume (
Hob.Raw = GetNextHob (EFI_HOB_TYPE_FV, GET_NEXT_HOB (Hob));
}
} while (Hob.Raw != NULL);
-
+
return EFI_NOT_FOUND;
}
@@ -529,7 +529,7 @@ FfsFindNextVolume (
/**
Find a file in the volume by name
-
+
@param FileName A pointer to the name of the file to
find within the firmware volume.
@@ -546,7 +546,7 @@ FfsFindNextVolume (
**/
EFI_STATUS
-EFIAPI
+EFIAPI
FfsFindFileByName (
IN CONST EFI_GUID *FileName,
IN EFI_PEI_FV_HANDLE VolumeHandle,
@@ -576,15 +576,15 @@ FfsFindFileByName (
information.
@retval EFI_SUCCESS File information returned.
-
+
@retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file.
-
+
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
-
+
**/
EFI_STATUS
-EFIAPI
+EFIAPI
FfsGetFileInfo (
IN EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
@@ -614,14 +614,14 @@ FfsGetFileInfo (
}
//
- // Get FileState which is the highest bit of the State
+ // Get FileState which is the highest bit of the State
//
FileState = GetFileState (ErasePolarity, (EFI_FFS_FILE_HEADER*)FileHandle);
switch (FileState) {
case EFI_FILE_DATA_VALID:
case EFI_FILE_MARKED_FOR_UPDATE:
- break;
+ break;
default:
return EFI_INVALID_PARAMETER;
}
@@ -645,15 +645,15 @@ FfsGetFileInfo (
information.
@retval EFI_SUCCESS File information returned.
-
+
@retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file.
-
+
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
**/
EFI_STATUS
-EFIAPI
+EFIAPI
FfsGetVolumeInfo (
IN EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_FV_INFO *VolumeInfo
@@ -665,10 +665,10 @@ FfsGetVolumeInfo (
if (VolumeInfo == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
- // VolumeHandle may not align at 8 byte,
- // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte.
+ // VolumeHandle may not align at 8 byte,
+ // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte.
// So, Copy FvHeader into the local FvHeader structure.
//
CopyMem (&FwVolHeader, VolumeHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
@@ -698,7 +698,7 @@ FfsGetVolumeInfo (
@param FileType File handle of a Fv type file.
@param Volumehandle On succes Volume Handle of the match
@param FileHandle On success File Handle of the match
-
+
@retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_SUCCESS Successfully found FileType
@@ -734,7 +734,7 @@ FfsAnyFvFindFirstFile (
break;
}
}
-
+
return Status;
}
@@ -788,14 +788,14 @@ FfsProcessFvFile (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// Collect FvImage Info.
//
ZeroMem (&FvImageInfo, sizeof (FvImageInfo));
Status = FfsGetVolumeInfo (FvImageHandle, &FvImageInfo);
ASSERT_EFI_ERROR (Status);
-
+
//
// FvAlignment must be more than 8 bytes required by FvHeader structure.
//
@@ -803,7 +803,7 @@ FfsProcessFvFile (
if (FvAlignment < 8) {
FvAlignment = 8;
}
-
+
//
// Check FvImage
//
@@ -824,7 +824,7 @@ FfsProcessFvFile (
// Inform HOB consumer phase, i.e. DXE core, the existance of this FV
//
BuildFvHob ((EFI_PHYSICAL_ADDRESS) (UINTN) FvImageInfo.FvStart, FvImageInfo.FvSize);
-
+
//
// Makes the encapsulated volume show up in DXE phase to skip processing of
// encapsulated file again.
diff --git a/EmbeddedPkg/Library/PrePiLib/PrePi.h b/EmbeddedPkg/Library/PrePiLib/PrePi.h
index d637277d2a..607561cd24 100644
--- a/EmbeddedPkg/Library/PrePiLib/PrePi.h
+++ b/EmbeddedPkg/Library/PrePiLib/PrePi.h
@@ -38,7 +38,7 @@
#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)
//
-// Get the data and data size field of GUID
+// Get the data and data size field of GUID
//
#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.c b/EmbeddedPkg/Library/PrePiLib/PrePiLib.c
index 4cc974f1a9..9a1ef344df 100644
--- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.c
+++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.c
@@ -1,7 +1,7 @@
/** @file
Copyright (c) 2008 - 2009, Apple Inc. 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
@@ -43,13 +43,13 @@ LoadPeCoffImage (
VOID *Buffer;
ZeroMem (&ImageContext, sizeof (ImageContext));
-
+
ImageContext.Handle = PeCoffImage;
ImageContext.ImageRead = PeCoffLoaderImageReadFromMemory;
Status = PeCoffLoaderGetImageInfo (&ImageContext);
ASSERT_EFI_ERROR (Status);
-
+
//
// Allocate Memory for the image
@@ -88,7 +88,7 @@ LoadPeCoffImage (
-typedef
+typedef
VOID
(EFIAPI *DXE_CORE_ENTRY_POINT) (
IN VOID *HobStart
@@ -116,7 +116,7 @@ LoadDxeCoreFromFfsFile (
return Status;
}
-
+
Status = LoadPeCoffImage (PeCoffImage, &ImageAddress, &ImageSize, &EntryPoint);
// For NT32 Debug Status = SecWinNtPeiLoadFile (PeCoffImage, &ImageAddress, &ImageSize, &EntryPoint);
ASSERT_EFI_ERROR (Status);
@@ -128,22 +128,22 @@ LoadDxeCoreFromFfsFile (
ASSERT_EFI_ERROR (Status);
BuildModuleHob (&FvFileInfo.FileName, (EFI_PHYSICAL_ADDRESS)(UINTN)ImageAddress, EFI_SIZE_TO_PAGES ((UINT32) ImageSize) * EFI_PAGE_SIZE, EntryPoint);
-
+
DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading DxeCore at 0x%10p EntryPoint=0x%10p\n", (VOID *)(UINTN)ImageAddress, (VOID *)(UINTN)EntryPoint));
Hob = GetHobList ();
if (StackSize == 0) {
// User the current stack
-
+
((DXE_CORE_ENTRY_POINT)(UINTN)EntryPoint) (Hob);
} else {
-
+
//
// Allocate 128KB for the Stack
//
BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (StackSize));
ASSERT (BaseOfStack != NULL);
-
+
//
// Compute the top of the stack we were allocated. Pre-allocate a UINTN
// for safety.
@@ -153,7 +153,7 @@ LoadDxeCoreFromFfsFile (
//
// Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.
- //
+ //
UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, StackSize);
SwitchStack (
@@ -164,11 +164,11 @@ LoadDxeCoreFromFfsFile (
);
}
-
+
// Should never get here as DXE Core does not return
DEBUG ((EFI_D_ERROR, "DxeCore returned\n"));
ASSERT (FALSE);
-
+
return EFI_DEVICE_ERROR;
}
@@ -199,9 +199,9 @@ LoadDxeCoreFromFv (
if (!EFI_ERROR (Status)) {
return LoadDxeCoreFromFfsFile (FileHandle, StackSize);
- }
-
- return Status;
+ }
+
+ return Status;
}
@@ -219,7 +219,7 @@ DecompressFirstFv (
if (!EFI_ERROR (Status)) {
Status = FfsProcessFvFile (FileHandle);
}
-
+
return Status;
}
diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
index 449e57d1af..b27b0441d5 100644
--- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
+++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
@@ -1,9 +1,9 @@
#/** @file
# Component description file for Apple Pre PI Library
#
-# LIbrary helps you build a platform that skips PEI and loads DXE Core
+# LIbrary helps you build a platform that skips PEI and loads DXE Core
# directly. Helps building HOBs, reading data from the FV, and doing
-# decompression.
+# decompression.
#
# Copyright (c) 2008, Apple Inc. All rights reserved.<BR>
#
@@ -23,7 +23,7 @@
FILE_GUID = 1F3A3278-82EB-4C0D-86F1-5BCDA5846CB2
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = PrePiLib
+ LIBRARY_CLASS = PrePiLib
#
@@ -65,7 +65,7 @@
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid
gPeCoffLoaderProtocolGuid
-
+
[FixedPcd.common]
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
diff --git a/EmbeddedPkg/Library/PrePiLib/ReportStatusCode.c b/EmbeddedPkg/Library/PrePiLib/ReportStatusCode.c
index 747acac766..7a0b90a1e6 100644
--- a/EmbeddedPkg/Library/PrePiLib/ReportStatusCode.c
+++ b/EmbeddedPkg/Library/PrePiLib/ReportStatusCode.c
@@ -2,7 +2,7 @@
Library that helps implement monolithic PEI
Copyright (c) 2008 - 2009, Apple Inc. 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
@@ -34,8 +34,8 @@ SerialReportStatusCode (
);
-EFI_STATUS_CODE_PROTOCOL gStatusCode = {
- (EFI_REPORT_STATUS_CODE)SerialReportStatusCode
+EFI_STATUS_CODE_PROTOCOL gStatusCode = {
+ (EFI_REPORT_STATUS_CODE)SerialReportStatusCode
};
/**
@@ -221,7 +221,7 @@ SerialReportStatusCode (
} else if (Data != NULL &&
ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
-
+
//
// Print DEBUG() information into output buffer.
//