MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Capsule.h File Reference

Data Structures

struct  _EFI_PEI_CAPSULE_PPI
 

Macros

#define EFI_PEI_CAPSULE_PPI_GUID
 

Typedefs

typedef struct _EFI_PEI_CAPSULE_PPI EFI_PEI_CAPSULE_PPI
 
typedef struct _EFI_PEI_CAPSULE_PPI PEI_CAPSULE_PPI
 
typedef EFI_STATUS(EFIAPIEFI_PEI_CAPSULE_COALESCE )(IN EFI_PEI_SERVICES **PeiServices, IN OUT VOID **MemoryBase, IN OUT UINTN *MemSize)
 
typedef EFI_STATUS(EFIAPIEFI_PEI_CAPSULE_CHECK_CAPSULE_UPDATE )(IN EFI_PEI_SERVICES **PeiServices)
 
typedef EFI_STATUS(EFIAPIEFI_PEI_CAPSULE_CREATE_STATE )(IN EFI_PEI_SERVICES **PeiServices, IN VOID *CapsuleBase, IN UINTN CapsuleSize)
 

Variables

EFI_GUID gPeiCapsulePpiGuid
 
EFI_GUID gEfiPeiCapsulePpiGuid
 

Detailed Description

Defines the APIs that enable PEI services to work with the underlying capsule capabilities of the platform.

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

Revision Reference:
This PPI is introduced in PI Version 1.4.

Macro Definition Documentation

#define EFI_PEI_CAPSULE_PPI_GUID
Value:
{ \
0x3acf33ee, 0xd892, 0x40f4, {0xa2, 0xfc, 0x38, 0x54, 0xd2, 0xe1, 0x32, 0x3d } \
}

Global ID for the EFI_PEI_CAPSULE_PPI.

Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_PEI_CAPSULE_CHECK_CAPSULE_UPDATE)(IN EFI_PEI_SERVICES **PeiServices)

Determine if a capsule needs to be processed. The means by which the presence of a capsule is determined is platform specific. For example, an implementation could be driven by the presence of a Capsule EFI Variable containing a list of EFI_CAPSULE_BLOCK_DESCRIPTOR entries. If present, return EFI_SUCCESS, otherwise return EFI_NOT_FOUND.

Parameters
[in]PeiServicesPointer to the PEI Services Table.
Return values
EFI_SUCCESSIf a capsule is available.
EFI_NOT_FOUNDNo capsule detected.
typedef EFI_STATUS(EFIAPI * EFI_PEI_CAPSULE_COALESCE)(IN EFI_PEI_SERVICES **PeiServices, IN OUT VOID **MemoryBase, IN OUT UINTN *MemSize)

Upon determining that there is a capsule to operate on, this service will use a series of EFI_CAPSULE_BLOCK_DESCRIPTOR entries to determine the current location of the various capsule fragments and coalesce them into a contiguous region of system memory.

Parameters
[in]PeiServicesPointer to the PEI Services Table.
[out]MemoryBasePointer to the base of a block of memory into which the buffers will be coalesced. On output, this variable will hold the base address of a coalesced capsule.
[out]MemorySizeSize of the memory region pointed to by MemoryBase. On output, this variable will contain the size of the coalesced capsule.
Return values
EFI_NOT_FOUNDIf: boot mode could not be determined, or the boot mode is not flash-update, or the capsule descriptors were not found.
EFI_BUFFER_TOO_SMALLThe capsule could not be coalesced in the provided memory region.
EFI_SUCCESSThere was no capsule, or the capsule was processed successfully.
typedef EFI_STATUS(EFIAPI * EFI_PEI_CAPSULE_CREATE_STATE)(IN EFI_PEI_SERVICES **PeiServices, IN VOID *CapsuleBase, IN UINTN CapsuleSize)

The Capsule PPI service that gets called after memory is available. The capsule coalesce function, which must be called first, returns a base address and size. Once the memory init PEIM has discovered memory, it should call this function and pass in the base address and size returned by the Coalesce() function. Then this function can create a capsule HOB and return.

Notes:
This function assumes it will not be called until the actual capsule update.
Parameters
[in]PeiServicesPointer to the PEI Services Table.
[in]CapsuleBaseAddress returned by the capsule coalesce function.
[in]CapsuleSizeValue returned by the capsule coalesce function.
Return values
EFI_VOLUME_CORRUPTEDCapsuleBase does not appear to point to a coalesced capsule.
EFI_SUCCESSCapsule HOB was created successfully.

Forward declaration for the EFI_PEI_CAPSULE_PPI.

Keep name backwards compatible before PI Version 1.4

Variable Documentation

EFI_GUID gEfiPeiCapsulePpiGuid
EFI_GUID gPeiCapsulePpiGuid

Keep name backwards compatible before PI Version 1.4