TianoCore EDK2 master
Loading...
Searching...
No Matches
EdkiiSystemCapsuleLib.h File Reference

Go to the source code of this file.

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

Definition in file EdkiiSystemCapsuleLib.h.

Function Documentation

◆ CapsuleAuthenticateSystemFirmware()

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.

Definition at line 593 of file EdkiiSystemCapsuleLib.c.

◆ ExtractAuthenticatedImage()

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.

Extract the authenticated image from an 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.
[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.

Definition at line 358 of file EdkiiSystemCapsuleLib.c.

◆ ExtractConfigImage()

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.

Definition at line 312 of file EdkiiSystemCapsuleLib.c.

◆ ExtractDriverFvImage()

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.

Definition at line 269 of file EdkiiSystemCapsuleLib.c.

◆ ExtractSystemFirmwareImage()

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.

Definition at line 539 of file EdkiiSystemCapsuleLib.c.

◆ ExtractSystemFirmwareImageFmpInfo()

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.

Definition at line 481 of file EdkiiSystemCapsuleLib.c.