TianoCore EDK2 master
|
#include "CapsuleApp.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | CreateBmpFmp (VOID) |
EFI_GUID * | GetCapsuleImageTypeId (IN EFI_CAPSULE_HEADER *CapsuleHeader) |
UINT32 | GetEsrtFwType (IN EFI_GUID *ImageTypeId) |
BOOLEAN | IsValidCapsuleHeader (IN EFI_CAPSULE_HEADER *CapsuleHeader, IN UINT64 CapsuleSize) |
BOOLEAN | IsFmpCapsuleGuid (IN EFI_GUID *CapsuleGuid) |
EFI_STATUS | CreateNestedFmp (VOID) |
EFI_STATUS | ClearCapsuleStatusVariable (VOID) |
EFI_STATUS | BuildGatherList (IN VOID **CapsuleBuffer, IN UINTN *FileSize, IN UINTN CapsuleNum, OUT EFI_CAPSULE_BLOCK_DESCRIPTOR **BlockDescriptors) |
VOID | CleanGatherList (IN EFI_CAPSULE_BLOCK_DESCRIPTOR *BlockDescriptors, IN UINTN CapsuleNum) |
VOID | PrintUsage (VOID) |
EFI_STATUS EFIAPI | UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
UINTN | NumberOfDescriptors = 1 |
UINTN | CapsuleFirstIndex |
UINTN | CapsuleLastIndex |
A shell application that triggers capsule update process.
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CapsuleApp.c.
EFI_STATUS BuildGatherList | ( | IN VOID ** | CapsuleBuffer, |
IN UINTN * | FileSize, | ||
IN UINTN | CapsuleNum, | ||
OUT EFI_CAPSULE_BLOCK_DESCRIPTOR ** | BlockDescriptors | ||
) |
Build Gather list for a list of capsule images.
[in] | CapsuleBuffer | An array of pointer to capsule images |
[in] | FileSize | An array of UINTN to capsule images size |
[in] | CapsuleNum | The count of capsule images |
[out] | BlockDescriptors | The block descriptors for the capsule images |
EFI_SUCCESS | The block descriptors for the capsule images are constructed. |
Definition at line 462 of file CapsuleApp.c.
VOID CleanGatherList | ( | IN EFI_CAPSULE_BLOCK_DESCRIPTOR * | BlockDescriptors, |
IN UINTN | CapsuleNum | ||
) |
Clear the Gather list for a list of capsule images.
[in] | BlockDescriptors | The block descriptors for the capsule images |
[in] | CapsuleNum | The count of capsule images |
Definition at line 639 of file CapsuleApp.c.
EFI_STATUS ClearCapsuleStatusVariable | ( | VOID | ) |
Clear capsule status variable.
EFI_SUCCESS | The capsule status variable is cleared. |
Definition at line 402 of file CapsuleApp.c.
EFI_STATUS CreateBmpFmp | ( | VOID | ) |
Create UX capsule.
EFI_SUCCESS | The capsule header is appended. |
EFI_UNSUPPORTED | Input parameter is not valid. |
EFI_OUT_OF_RESOURCES | No enough resource to create UX capsule. |
Definition at line 26 of file CapsuleApp.c.
EFI_STATUS CreateNestedFmp | ( | VOID | ) |
Append a capsule header on top of current image. This function follows Windows UEFI Firmware Update Platform document.
EFI_SUCCESS | The capsule header is appended. |
EFI_UNSUPPORTED | Input parameter is not valid. |
EFI_OUT_OF_RESOURCES | No enough resource to append capsule header. |
Definition at line 300 of file CapsuleApp.c.
EFI_GUID * GetCapsuleImageTypeId | ( | IN EFI_CAPSULE_HEADER * | CapsuleHeader | ) |
Get ImageTypeId in the FMP capsule header.
[in] | CapsuleHeader | The FMP capsule image header. |
Definition at line 182 of file CapsuleApp.c.
Get ESRT FwType according to ImageTypeId
[in] | ImageTypeId | ImageTypeId of an FMP capsule. |
Definition at line 208 of file CapsuleApp.c.
Return if this CapsuleGuid is a FMP capsule GUID or not.
[in] | CapsuleGuid | A pointer to EFI_GUID |
Definition at line 280 of file CapsuleApp.c.
BOOLEAN IsValidCapsuleHeader | ( | IN EFI_CAPSULE_HEADER * | CapsuleHeader, |
IN UINT64 | CapsuleSize | ||
) |
Validate if it is valid capsule header
This function assumes the caller provided correct CapsuleHeader pointer and CapsuleSize.
This function validates the fields in EFI_CAPSULE_HEADER.
[in] | CapsuleHeader | Points to a capsule header. |
[in] | CapsuleSize | Size of the whole capsule image. |
Definition at line 247 of file CapsuleApp.c.
VOID PrintUsage | ( | VOID | ) |
Print APP usage.
Definition at line 674 of file CapsuleApp.c.
EFI_STATUS EFIAPI UefiMain | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Update Capsule image.
[in] | ImageHandle | The image handle. |
[in] | SystemTable | The system table. |
EFI_SUCCESS | Command completed successfully. |
EFI_UNSUPPORTED | Command usage unsupported. |
EFI_INVALID_PARAMETER | Command usage invalid. |
EFI_NOT_FOUND | The input file can't be found. |
Definition at line 729 of file CapsuleApp.c.
UINTN CapsuleFirstIndex |
Definition at line 15 of file CapsuleApp.c.
UINTN CapsuleLastIndex |
Definition at line 16 of file CapsuleApp.c.
UINTN NumberOfDescriptors = 1 |
Definition at line 14 of file CapsuleApp.c.