MdeModulePkg: 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> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
## @file
|
||||
# Capsule Runtime Driver produces two UEFI capsule runtime services: (UpdateCapsule, QueryCapsuleCapabilities).
|
||||
#
|
||||
# It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
# It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
# the capsule runtime services are ready.
|
||||
#
|
||||
# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
// the capsule runtime services are ready.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// 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.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// CapsuleRuntimeDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 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
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Runtime Firmware Update DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Capsule Runtime Driver produces two UEFI capsule runtime services.
|
||||
(UpdateCapsule, QueryCapsuleCapabilities)
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
the capsule runtime services are ready.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -54,10 +54,10 @@ UINT32 mMaxSizeNonPopulateCapsule = 0;
|
||||
@retval EFI_INVALID_PARAMETER CapsuleCount is Zero.
|
||||
@retval EFI_INVALID_PARAMETER For across reset capsule image, ScatterGatherList is NULL.
|
||||
@retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware.
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
|
||||
is compatible with this platform but is not capable of being submitted or processed
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
|
||||
is compatible with this platform but is not capable of being submitted or processed
|
||||
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
|
||||
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
|
||||
the capsule is compatible with this platform but there are insufficient resources to process.
|
||||
|
||||
**/
|
||||
@@ -75,8 +75,8 @@ UpdateCapsule (
|
||||
BOOLEAN NeedReset;
|
||||
BOOLEAN InitiateReset;
|
||||
CHAR16 CapsuleVarName[30];
|
||||
CHAR16 *TempVarName;
|
||||
|
||||
CHAR16 *TempVarName;
|
||||
|
||||
//
|
||||
// Capsule Count can't be less than one.
|
||||
//
|
||||
@@ -107,7 +107,7 @@ UpdateCapsule (
|
||||
}
|
||||
|
||||
//
|
||||
// Check FMP capsule flag
|
||||
// Check FMP capsule flag
|
||||
//
|
||||
if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid)
|
||||
&& (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) {
|
||||
@@ -115,7 +115,7 @@ UpdateCapsule (
|
||||
}
|
||||
|
||||
//
|
||||
// Check Capsule image without populate flag by firmware support capsule function
|
||||
// Check Capsule image without populate flag by firmware support capsule function
|
||||
//
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
|
||||
Status = SupportCapsuleImage (CapsuleHeader);
|
||||
@@ -136,7 +136,7 @@ UpdateCapsule (
|
||||
// Platform specific update for the non-reset capsule image.
|
||||
//
|
||||
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) == 0) {
|
||||
if (EfiAtRuntime ()) {
|
||||
if (EfiAtRuntime ()) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
Status = ProcessCapsuleImage(CapsuleHeader);
|
||||
@@ -151,7 +151,7 @@ UpdateCapsule (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// After launching all capsules who has no reset flag, if no more capsules claims
|
||||
// for a system reset just return.
|
||||
@@ -162,7 +162,7 @@ UpdateCapsule (
|
||||
|
||||
//
|
||||
// ScatterGatherList is only referenced if the capsules are defined to persist across
|
||||
// system reset.
|
||||
// system reset.
|
||||
//
|
||||
if (ScatterGatherList == (EFI_PHYSICAL_ADDRESS) (UINTN) NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -195,7 +195,7 @@ UpdateCapsule (
|
||||
|
||||
//
|
||||
// ScatterGatherList is only referenced if the capsules are defined to persist across
|
||||
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
|
||||
// system reset. Set its value into NV storage to let pre-boot driver to pick it up
|
||||
// after coming through a system reset.
|
||||
//
|
||||
Status = EfiSetVariable (
|
||||
@@ -213,7 +213,7 @@ UpdateCapsule (
|
||||
if(InitiateReset) {
|
||||
//
|
||||
// Firmware that encounters a capsule which has the CAPSULE_FLAGS_INITIATE_RESET Flag set in its header
|
||||
// will initiate a reset of the platform which is compatible with the passed-in capsule request and will
|
||||
// will initiate a reset of the platform which is compatible with the passed-in capsule request and will
|
||||
// not return back to the caller.
|
||||
//
|
||||
EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
@@ -261,7 +261,7 @@ QueryCapsuleCapabilities (
|
||||
if (CapsuleCount < 1) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Check whether input parameter is valid
|
||||
//
|
||||
@@ -290,7 +290,7 @@ QueryCapsuleCapabilities (
|
||||
}
|
||||
|
||||
//
|
||||
// Check FMP capsule flag
|
||||
// Check FMP capsule flag
|
||||
//
|
||||
if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid)
|
||||
&& (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) {
|
||||
@@ -309,7 +309,7 @@ QueryCapsuleCapabilities (
|
||||
}
|
||||
|
||||
//
|
||||
// Find out whether there is any capsule defined to persist across system reset.
|
||||
// Find out whether there is any capsule defined to persist across system reset.
|
||||
//
|
||||
for (ArrayNumber = 0; ArrayNumber < CapsuleCount ; ArrayNumber++) {
|
||||
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
|
||||
@@ -344,10 +344,10 @@ QueryCapsuleCapabilities (
|
||||
|
||||
This code installs UEFI capsule runtime service.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully.
|
||||
@retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -363,14 +363,14 @@ CapsuleServiceInitialize (
|
||||
mMaxSizeNonPopulateCapsule = PcdGet32(PcdMaxSizeNonPopulateCapsule);
|
||||
|
||||
//
|
||||
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
|
||||
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
|
||||
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.
|
||||
// The page table and stack is used to transfer processor mode from IA32 to long mode.
|
||||
// Create the base address of page table and stack, and save them into variable.
|
||||
// This is not needed when capsule with reset type is not supported.
|
||||
//
|
||||
SaveLongModeContext ();
|
||||
|
||||
|
||||
//
|
||||
// Install capsule runtime services into UEFI runtime service tables.
|
||||
//
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Capsule Runtime Driver produces two UEFI capsule runtime services.
|
||||
(UpdateCapsule, QueryCapsuleCapabilities)
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
the capsule runtime services are ready.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials are licensed and made available
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Create the variable to save the base address of page table and stack
|
||||
for transferring into long mode in IA32 capsule PEI.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 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
|
||||
@@ -42,7 +42,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This function allocates EfiReservedMemoryType below 4G memory address.
|
||||
|
||||
@param Size Size of memory to allocate.
|
||||
|
||||
|
||||
@return Allocated Address for output.
|
||||
|
||||
**/
|
||||
@@ -164,14 +164,14 @@ PrepareContextForCapsulePei (
|
||||
|
||||
LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
|
||||
ASSERT (LongModeBuffer.PageTableAddress != 0);
|
||||
|
||||
|
||||
//
|
||||
// Allocate stack
|
||||
//
|
||||
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);
|
||||
LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));
|
||||
ASSERT (LongModeBuffer.StackBaseAddress != 0);
|
||||
|
||||
ASSERT (LongModeBuffer.StackBaseAddress != 0);
|
||||
|
||||
Status = gRT->SetVariable (
|
||||
EFI_CAPSULE_LONG_MODE_BUFFER_NAME,
|
||||
&gEfiCapsuleVendorGuid,
|
||||
@@ -190,7 +190,7 @@ PrepareContextForCapsulePei (
|
||||
VariableLockCapsuleLongModeBufferVariable,
|
||||
NULL,
|
||||
&Registration
|
||||
);
|
||||
);
|
||||
} else {
|
||||
DEBUG ((EFI_D_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));
|
||||
gBS->FreePages (LongModeBuffer.StackBaseAddress, EFI_SIZE_TO_PAGES (LongModeBuffer.StackSize));
|
||||
|
Reference in New Issue
Block a user