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
This commit is contained in:
committed by
oliviermartin
parent
62d441fb17
commit
3402aac7d9
@@ -2,7 +2,7 @@
|
||||
Generic Capsule services
|
||||
|
||||
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
|
||||
@@ -19,7 +19,7 @@
|
||||
//
|
||||
//Max size capsule services support are platform policy,to populate capsules we just need
|
||||
//memory to maintain them across reset,it is not a problem. And to special capsules ,for
|
||||
//example,update flash,it is mostly decided by the platform. Here is a sample size for
|
||||
//example,update flash,it is mostly decided by the platform. Here is a sample size for
|
||||
//different type capsules.
|
||||
//
|
||||
#define MAX_SIZE_POPULATE (0)
|
||||
@@ -34,8 +34,8 @@ SupportUpdateCapsuleRest (
|
||||
)
|
||||
{
|
||||
//
|
||||
//If the platform has a way to guarantee the memory integrity across a system reset, return
|
||||
//TRUE, else FALSE.
|
||||
//If the platform has a way to guarantee the memory integrity across a system reset, return
|
||||
//TRUE, else FALSE.
|
||||
//
|
||||
return FALSE;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ SupportCapsuleSize (
|
||||
//
|
||||
*MaxSizePopulate = MAX_SIZE_POPULATE;
|
||||
*MaxSizeNonPopulate = MAX_SIZE_NON_POPULATE;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Arguments:
|
||||
CapsuleHeaderArray A array of pointers to capsule headers passed in
|
||||
CapsuleCount The number of capsule
|
||||
ScatterGatherList Physical address of datablock list points to capsule
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
EFI STATUS
|
||||
@@ -85,8 +85,8 @@ Returns:
|
||||
not set, the capsule has been successfully processed by the firmware.
|
||||
If it set, the ScattlerGatherList is successfully to be set.
|
||||
EFI_INVALID_PARAMETER CapsuleCount is less than 1,CapsuleGuid is not supported.
|
||||
EFI_DEVICE_ERROR Failed to SetVariable or AllocatePool or ProcessFirmwareVolume.
|
||||
|
||||
EFI_DEVICE_ERROR Failed to SetVariable or AllocatePool or ProcessFirmwareVolume.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN CapsuleSize;
|
||||
@@ -110,17 +110,17 @@ Returns:
|
||||
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
|
||||
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
|
||||
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//Assume that capsules have the same flags on reseting or not.
|
||||
//Assume that capsules have the same flags on reseting or not.
|
||||
//
|
||||
CapsuleHeader = CapsuleHeaderArray[0];
|
||||
|
||||
@@ -131,28 +131,28 @@ Returns:
|
||||
if (!SupportUpdateCapsuleRest()) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
if (ScatterGatherList == 0) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = EfiSetVariable (
|
||||
EFI_CAPSULE_VARIABLE_NAME,
|
||||
&gEfiCapsuleVendorGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||
sizeof (UINTN),
|
||||
(VOID *) &ScatterGatherList
|
||||
EFI_CAPSULE_VARIABLE_NAME,
|
||||
&gEfiCapsuleVendorGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||
sizeof (UINTN),
|
||||
(VOID *) &ScatterGatherList
|
||||
);
|
||||
if (Status != EFI_SUCCESS) {
|
||||
if (Status != EFI_SUCCESS) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//The rest occurs in the condition of non-reset mode
|
||||
//
|
||||
if (EfiAtRuntime ()) {
|
||||
if (EfiAtRuntime ()) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ Returns:
|
||||
gBS->CopyMem (BufferPtr, (UINT8*)CapsuleHeader+ CapsuleHeader->HeaderSize, CapsuleSize);
|
||||
|
||||
//
|
||||
//Call DXE service ProcessFirmwareVolume to process immediatelly
|
||||
//Call DXE service ProcessFirmwareVolume to process immediatelly
|
||||
//
|
||||
Status = gDS->ProcessFirmwareVolume (BufferPtr, CapsuleSize, &FvHandle);
|
||||
if (Status != EFI_SUCCESS) {
|
||||
@@ -184,7 +184,7 @@ Returns:
|
||||
Done:
|
||||
if (BufferPtr != NULL) {
|
||||
gBS->FreePool (BufferPtr);
|
||||
}
|
||||
}
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@@ -231,10 +231,10 @@ Returns:
|
||||
|
||||
if ((MaxiumCapsuleSize == NULL) ||(ResetType == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
CapsuleHeader = NULL;
|
||||
|
||||
|
||||
//
|
||||
//Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET
|
||||
//and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.
|
||||
@@ -242,20 +242,20 @@ Returns:
|
||||
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
|
||||
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
|
||||
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SupportCapsuleSize(&MaxSizePopulate,&MaxSizeNonPopulate);
|
||||
//
|
||||
//Assume that capsules have the same flags on reseting or not.
|
||||
//Assume that capsules have the same flags on reseting or not.
|
||||
//
|
||||
CapsuleHeader = CapsuleHeaderArray[0];
|
||||
CapsuleHeader = CapsuleHeaderArray[0];
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) != 0) {
|
||||
//
|
||||
//Check if the platform supports update capsule across a system reset
|
||||
@@ -264,11 +264,11 @@ Returns:
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
*ResetType = EfiResetWarm;
|
||||
*MaxiumCapsuleSize = MaxSizePopulate;
|
||||
*MaxiumCapsuleSize = MaxSizePopulate;
|
||||
} else {
|
||||
*ResetType = EfiResetCold;
|
||||
*MaxiumCapsuleSize = MaxSizeNonPopulate;
|
||||
}
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,7 @@ Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS The event has been handled properly
|
||||
EFI_SUCCESS The event has been handled properly
|
||||
EFI_NOT_FOUND An error occurred updating the variable.
|
||||
|
||||
--*/
|
||||
@@ -106,7 +106,7 @@ LibMtcGetNextHighMonotonicCount (
|
||||
|
||||
*HighCount = (UINT32) RShiftU64 (mEfiMtc, 32) + 1;
|
||||
mEfiMtc = LShiftU64 (*HighCount, 32);
|
||||
|
||||
|
||||
if (!EfiAtRuntime ()) {
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Report status code lib on top of either SerialLib and/or EFI Serial Protocol.
|
||||
Based on PcdStatusCodeUseEfiSerial & PcdStatusCodeUseHardSerial settings
|
||||
|
||||
There is just a single runtime memory buffer that contans all the data.
|
||||
There is just a single runtime memory buffer that contans all the data.
|
||||
|
||||
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
@@ -77,12 +77,12 @@ LibReportStatusCode (
|
||||
// Print DEBUG() information into output buffer.
|
||||
//
|
||||
CharCount = AsciiVSPrint (
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
Format,
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
Format,
|
||||
Marker
|
||||
);
|
||||
} else if (Data != NULL &&
|
||||
} else if (Data != NULL &&
|
||||
CompareGuid (&Data->Type, &gEfiStatusCodeSpecificDataGuid) &&
|
||||
(CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||
//
|
||||
@@ -98,19 +98,19 @@ LibReportStatusCode (
|
||||
// Print ERROR information into output buffer.
|
||||
//
|
||||
CharCount = AsciiSPrint (
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"ERROR: C%x:V%x I%x",
|
||||
CodeType,
|
||||
Value,
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"ERROR: C%x:V%x I%x",
|
||||
CodeType,
|
||||
Value,
|
||||
Instance
|
||||
);
|
||||
|
||||
//
|
||||
// Make sure we don't try to print values that weren't
|
||||
// Make sure we don't try to print values that weren't
|
||||
// intended to be printed, especially NULL GUID pointers.
|
||||
//
|
||||
|
||||
|
||||
if (CallerId != NULL) {
|
||||
CharCount += AsciiSPrint (
|
||||
&Buffer[CharCount - 1],
|
||||
@@ -136,19 +136,19 @@ LibReportStatusCode (
|
||||
);
|
||||
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||
CharCount = AsciiSPrint (
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"PROGRESS CODE: V%x I%x\n\r",
|
||||
Value,
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"PROGRESS CODE: V%x I%x\n\r",
|
||||
Value,
|
||||
Instance
|
||||
);
|
||||
} else {
|
||||
CharCount = AsciiSPrint (
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"Undefined: C%x:V%x I%x\n\r",
|
||||
CodeType,
|
||||
Value,
|
||||
Buffer,
|
||||
EFI_STATUS_CODE_DATA_MAX_SIZE,
|
||||
"Undefined: C%x:V%x I%x\n\r",
|
||||
CodeType,
|
||||
Value,
|
||||
Instance
|
||||
);
|
||||
}
|
||||
@@ -165,7 +165,7 @@ LibReportStatusCode (
|
||||
gBS->LocateProtocol (&gEfiSerialIoProtocolGuid, NULL, (VOID **) &mSerialIoProtocol);
|
||||
}
|
||||
|
||||
if (mSerialIoProtocol == NULL) {
|
||||
if (mSerialIoProtocol == NULL) {
|
||||
mSerialIoProtocol->Write (
|
||||
mSerialIoProtocol,
|
||||
&CharCount,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Portions 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
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
VOID
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -255,8 +255,8 @@ RtcTimeFieldsValid (
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
Returns:
|
||||
--*/
|
||||
// TODO: Time - add argument and description to function comment
|
||||
// TODO: EFI_INVALID_PARAMETER - add return value to function comment
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/** @file
|
||||
Variable services implemented from system memory
|
||||
|
||||
There is just a single runtime memory buffer that contans all the data.
|
||||
There is just a single runtime memory buffer that contans all the data.
|
||||
|
||||
Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Portions 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
|
||||
@@ -50,7 +50,7 @@ AddEntry (
|
||||
EFI_TPL CurrentTpl;
|
||||
|
||||
|
||||
SizeOfString = StrSize (VariableName);
|
||||
SizeOfString = StrSize (VariableName);
|
||||
Size = SizeOfString + sizeof (VARIABLE_ARRAY_ENTRY) + DataSize;
|
||||
if ((VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArrayNextFree) + Size) > mVariableArrayEnd) {
|
||||
// ran out of space
|
||||
@@ -70,7 +70,7 @@ AddEntry (
|
||||
mVariableArrayNextFree = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArrayNextFree) + SizeOfString);
|
||||
CopyMem (mVariableArrayNextFree, Data, DataSize);
|
||||
mVariableArrayNextFree = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArrayNextFree) + DataSize);
|
||||
|
||||
|
||||
if (!EfiAtRuntime ()) {
|
||||
// Exit Critical section
|
||||
gBS->RestoreTPL (CurrentTpl);
|
||||
@@ -78,7 +78,7 @@ AddEntry (
|
||||
|
||||
return Entry;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
DeleteEntry (
|
||||
IN VARIABLE_ARRAY_ENTRY *Entry
|
||||
@@ -199,22 +199,22 @@ LibGetNextVariableName (
|
||||
if (Entry == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
// If we are at runtime skip variables that do not have the Runitme attribute set.
|
||||
Done = (EfiAtRuntime () && ((Entry->Attribute & EFI_VARIABLE_RUNTIME_ACCESS) == 0)) ? FALSE : TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
StringSize = StrSize ((CHAR16 *)(Entry + 1));
|
||||
Entry = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)Entry) + (StringSize + sizeof (VARIABLE_ARRAY_ENTRY) + Entry->DataSize));
|
||||
if (Entry >= mVariableArrayEnd) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
if (*VariableNameSize < StringSize) {
|
||||
*VariableNameSize = StringSize;
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
|
||||
*VariableNameSize = StringSize;
|
||||
CopyMem (VariableName, (CHAR16 *)(Entry + 1), StringSize);
|
||||
CopyMem (VendorGuid, &Entry->VendorGuid, sizeof (EFI_GUID));
|
||||
@@ -298,9 +298,9 @@ LibVariableInitialize (VOID)
|
||||
ASSERT (mVariableArray != NULL);
|
||||
|
||||
mVariableArrayEnd = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)mVariableArray) + Size);
|
||||
|
||||
|
||||
mMaximumVariableStorageSize = Size - sizeof (VARIABLE_ARRAY_ENTRY);
|
||||
mRemainingVariableStorageSize = mMaximumVariableStorageSize;
|
||||
mMaximumVariableSize = mMaximumVariableStorageSize;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user