SignedCapsulePkg[all]  0.1
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
EdkiiSystemCapsuleLib.h File Reference

Functions

BOOLEAN EFIAPI ExtractSystemFirmwareImageFmpInfo (IN VOID *SystemFirmwareImage, IN UINTN SystemFirmwareImageSize, OUT EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR **ImageFmpInfo, OUT UINTN *ImageFmpInfoSize)
 
BOOLEAN EFIAPI ExtractDriverFvImage (IN VOID *AuthenticatedImage, IN UINTN AuthenticatedImageSize, OUT VOID **DriverFvImage, OUT UINTN *DriverFvImageSize)
 
BOOLEAN EFIAPI ExtractConfigImage (IN VOID *AuthenticatedImage, IN UINTN AuthenticatedImageSize, OUT VOID **ConfigImage, OUT UINTN *ConfigImageSize)
 
BOOLEAN EFIAPI ExtractSystemFirmwareImage (IN VOID *AuthenticatedImage, IN UINTN AuthenticatedImageSize, OUT VOID **SystemFirmwareImage, OUT UINTN *SystemFirmwareImageSize)
 
BOOLEAN EFIAPI ExtractAuthenticatedImage (IN VOID *Image, IN UINTN ImageSize, OUT UINT32 *LastAttemptStatus, OUT VOID **AuthenticatedImage, OUT UINTN *AuthenticatedImageSize)
 
EFI_STATUS EFIAPI CapsuleAuthenticateSystemFirmware (IN VOID *Image, IN UINTN ImageSize, IN BOOLEAN ForceVersionMatch, OUT UINT32 *LastAttemptVersion, OUT UINT32 *LastAttemptStatus, OUT VOID **AuthenticatedImage, OUT UINTN *AuthenticatedImageSize)
 

Detailed Description

EDKII System Capsule library.

Copyright (c) 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Function Documentation

EFI_STATUS EFIAPI CapsuleAuthenticateSystemFirmware ( IN VOID *  Image,
IN UINTN  ImageSize,
IN BOOLEAN  ForceVersionMatch,
OUT UINT32 *  LastAttemptVersion,
OUT UINT32 *  LastAttemptStatus,
OUT VOID **  AuthenticatedImage,
OUT UINTN *  AuthenticatedImageSize 
)

Authenticated system firmware FMP capsule image.

Caution: This function may receive untrusted input.

Parameters
[in]ImageThe FMP capsule image, including EFI_FIRMWARE_IMAGE_AUTHENTICATION.
[in]ImageSizeThe size of FMP capsule image in bytes.
[in]ForceVersionMatchTRUE: The version of capsule must be as same as the version of current image. FALSE: The version of capsule must be as same as greater than the lowest supported version of current image.
[out]LastAttemptVersionThe last attempt version, which will be recorded in ESRT and FMP EFI_FIRMWARE_IMAGE_DESCRIPTOR.
[out]LastAttemptStatusThe last attempt status, which will be recorded in ESRT and FMP EFI_FIRMWARE_IMAGE_DESCRIPTOR.
[out]AuthenticatedImageThe authenticated capsule image, excluding EFI_FIRMWARE_IMAGE_AUTHENTICATION.
[out]AuthenticatedImageSizeThe size of the authenticated capsule image in bytes.
Return values
TRUEAuthentication passes and the authenticated image is extracted.
FALSEAuthentication fails and the authenticated image is not extracted.
BOOLEAN EFIAPI ExtractAuthenticatedImage ( IN VOID *  Image,
IN UINTN  ImageSize,
OUT UINT32 *  LastAttemptStatus,
OUT VOID **  AuthenticatedImage,
OUT UINTN *  AuthenticatedImageSize 
)

Extract the authenticated image from an FMP capsule image.

Parameters
[in]ImageThe FMP capsule image, including EFI_FIRMWARE_IMAGE_AUTHENTICATION.
[in]ImageSizeThe size of FMP capsule image in bytes.
[out]LastAttemptStatusThe last attempt status, which will be recorded in ESRT and FMP EFI_FIRMWARE_IMAGE_DESCRIPTOR.
[out]AuthenticatedImageThe authenticated capsule image, excluding EFI_FIRMWARE_IMAGE_AUTHENTICATION.
[out]AuthenticatedImageSizeThe size of the authenticated capsule image in bytes.
Return values
TRUEThe authenticated image is extracted.
FALSEThe authenticated image is not extracted.
BOOLEAN EFIAPI ExtractConfigImage ( IN VOID *  AuthenticatedImage,
IN UINTN  AuthenticatedImageSize,
OUT VOID **  ConfigImage,
OUT UINTN *  ConfigImageSize 
)

Extract the config image from an authenticated image.

Parameters
[in]AuthenticatedImageThe authenticated capsule image.
[in]AuthenticatedImageSizeThe size of the authenticated capsule image in bytes.
[out]ConfigImageThe config image.
[out]ConfigImageSizeThe size of the config image in bytes.
Return values
TRUEThe config image is extracted.
FALSEThe config image is not extracted.
BOOLEAN EFIAPI ExtractDriverFvImage ( IN VOID *  AuthenticatedImage,
IN UINTN  AuthenticatedImageSize,
OUT VOID **  DriverFvImage,
OUT UINTN *  DriverFvImageSize 
)

Extract the driver FV from an authenticated image.

Parameters
[in]AuthenticatedImageThe authenticated capsule image.
[in]AuthenticatedImageSizeThe size of the authenticated capsule image in bytes.
[out]DriverFvImageThe driver FV image.
[out]DriverFvImageSizeThe size of the driver FV image in bytes.
Return values
TRUEThe driver Fv is extracted.
FALSEThe driver Fv is not extracted.
BOOLEAN EFIAPI ExtractSystemFirmwareImage ( IN VOID *  AuthenticatedImage,
IN UINTN  AuthenticatedImageSize,
OUT VOID **  SystemFirmwareImage,
OUT UINTN *  SystemFirmwareImageSize 
)

Extract the System Firmware image from an authenticated image.

Parameters
[in]AuthenticatedImageThe authenticated capsule image.
[in]AuthenticatedImageSizeThe size of the authenticated capsule image in bytes.
[out]SystemFirmwareImageThe System Firmware image.
[out]SystemFirmwareImageSizeThe size of the System Firmware image in bytes.
Return values
TRUEThe System Firmware image is extracted.
FALSEThe System Firmware image is not extracted.
BOOLEAN EFIAPI ExtractSystemFirmwareImageFmpInfo ( IN VOID *  SystemFirmwareImage,
IN UINTN  SystemFirmwareImageSize,
OUT EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR **  ImageFmpInfo,
OUT UINTN *  ImageFmpInfoSize 
)

Extract ImageFmpInfo from system firmware.

Parameters
[in]SystemFirmwareImageThe System Firmware image.
[in]SystemFirmwareImageSizeThe size of the System Firmware image in bytes.
[out]ImageFmpInfoThe ImageFmpInfo.
[out]ImageFmpInfoSizeThe size of the ImageFmpInfo in bytes.
Return values
TRUEThe ImageFmpInfo is extracted.
FALSEThe ImageFmpInfo is not extracted.