TianoCore EDK2 master
|
#include "CapsuleService.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | UpdateCapsule (IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL) |
EFI_STATUS EFIAPI | QueryCapsuleCapabilities (IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, OUT UINT64 *MaxiumCapsuleSize, OUT EFI_RESET_TYPE *ResetType) |
EFI_STATUS EFIAPI | CapsuleServiceInitialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EFI_HANDLE | mNewHandle = NULL |
UINTN | mTimes = 0 |
UINT32 | mMaxSizePopulateCapsule = 0 |
UINT32 | mMaxSizeNonPopulateCapsule = 0 |
Capsule Runtime Driver produces two UEFI capsule runtime services. (UpdateCapsule, QueryCapsuleCapabilities) It installs the Capsule Architectural Protocol defined in PI1.0a to signify the capsule runtime services are ready.
Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CapsuleService.c.
EFI_STATUS EFIAPI CapsuleServiceInitialize | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
This code installs UEFI capsule runtime service.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | UEFI Capsule Runtime Services are installed successfully. |
Definition at line 378 of file CapsuleService.c.
EFI_STATUS EFIAPI QueryCapsuleCapabilities | ( | IN EFI_CAPSULE_HEADER ** | CapsuleHeaderArray, |
IN UINTN | CapsuleCount, | ||
OUT UINT64 * | MaxiumCapsuleSize, | ||
OUT EFI_RESET_TYPE * | ResetType | ||
) |
Returns if the capsule can be supported via UpdateCapsule(). Notice: When PcdCapsuleInRamSupport is unsupported, even this routine returns a valid answer, the capsule still is unsupported via UpdateCapsule().
CapsuleHeaderArray | Virtual pointer to an array of virtual pointers to the capsules being passed into update capsule. |
CapsuleCount | Number of pointers to EFI_CAPSULE_HEADER in CaspuleHeaderArray. |
MaxiumCapsuleSize | On output the maximum size that UpdateCapsule() can support as an argument to UpdateCapsule() via CapsuleHeaderArray and ScatterGatherList. |
ResetType | Returns the type of reset required for the capsule update. |
EFI_SUCCESS | Valid answer returned. |
EFI_UNSUPPORTED | The capsule image is not supported on this platform, and MaximumCapsuleSize and ResetType are undefined. |
EFI_INVALID_PARAMETER | MaximumCapsuleSize is NULL, or ResetTyep is NULL, Or CapsuleCount is Zero, or CapsuleImage is not valid. |
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(). |
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. |
EFI_UNSUPPORTED | This call is not supported by this platform at the time the call is made. The platform should describe this runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE configuration table. |
Definition at line 267 of file CapsuleService.c.
EFI_STATUS EFIAPI UpdateCapsule | ( | IN EFI_CAPSULE_HEADER ** | CapsuleHeaderArray, |
IN UINTN | CapsuleCount, | ||
IN EFI_PHYSICAL_ADDRESS ScatterGatherList | OPTIONAL | ||
) |
Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended consumption, the firmware may process the capsule immediately. If the payload should persist across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must be passed into ResetSystem() and will cause the capsule to be processed by the firmware as part of the reset process.
CapsuleHeaderArray | Virtual pointer to an array of virtual pointers to the capsules being passed into update capsule. |
CapsuleCount | Number of pointers to EFI_CAPSULE_HEADER in CaspuleHeaderArray. |
ScatterGatherList | Physical pointer to a set of EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the location in physical memory of a set of capsules. |
EFI_SUCCESS | Valid capsule was passed. If CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the capsule has been successfully processed by the firmware. |
EFI_DEVICE_ERROR | The capsule update was started, but failed due to a device error. |
EFI_INVALID_PARAMETER | CapsuleSize is NULL, or an incompatible set of flags were set in the capsule header. |
EFI_INVALID_PARAMETER | CapsuleCount is Zero. |
EFI_INVALID_PARAMETER | For across reset capsule image, ScatterGatherList is NULL. |
EFI_UNSUPPORTED | CapsuleImage is not recognized by the firmware. |
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(). |
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. |
EFI_UNSUPPORTED | This call is not supported by this platform at the time the call is made. The platform should describe this runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE configuration table. |
Definition at line 63 of file CapsuleService.c.
UINT32 mMaxSizeNonPopulateCapsule = 0 |
Definition at line 25 of file CapsuleService.c.
UINT32 mMaxSizePopulateCapsule = 0 |
Definition at line 24 of file CapsuleService.c.
EFI_HANDLE mNewHandle = NULL |
Definition at line 17 of file CapsuleService.c.
UINTN mTimes = 0 |
Definition at line 22 of file CapsuleService.c.