TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeCapsuleReportLib.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS CoDClearCapsuleRelocationInfo (VOID)
 
INTN GetCurrentCapsuleLastIndex (VOID)
 
INTN GetNewCapsuleResultIndex (VOID)
 
VOID LockVariable (IN CONST EFI_GUID VariableGuid, IN CHAR16 *VariableName, IN EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy)
 
EFI_STATUS WriteNewCapsuleResultVariable (IN VOID *CapsuleResult, IN UINTN CapsuleResultSize)
 
EFI_STATUS RecordCapsuleStatusVariable (IN EFI_CAPSULE_HEADER *CapsuleHeader, IN EFI_STATUS CapsuleStatus)
 
EFI_STATUS RecordFmpCapsuleStatusVariable (IN EFI_CAPSULE_HEADER *CapsuleHeader, IN EFI_STATUS CapsuleStatus, IN UINTN PayloadIndex, IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader, IN EFI_DEVICE_PATH_PROTOCOL *FmpDevicePath OPTIONAL, IN CHAR16 *CapFileName OPTIONAL)
 
VOID InitCapsuleMaxVariable (EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy)
 
VOID InitCapsuleLastVariable (EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy)
 
VOID InitCapsuleUpdateVariable (VOID)
 
VOID InitCapsuleRelocationInfo (EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy)
 
VOID InitCapsuleVariable (VOID)
 

Detailed Description

DXE capsule report related function.

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

Definition in file DxeCapsuleReportLib.c.

Function Documentation

◆ CoDClearCapsuleRelocationInfo()

EFI_STATUS CoDClearCapsuleRelocationInfo ( VOID  )

This routine is called to clear CapsuleOnDisk Relocation Info variable. Total Capsule On Disk length is recorded in this variable

Return values
EFI_SUCCESSCapsule On Disk flags are cleared

Definition at line 1398 of file CapsuleOnDisk.c.

◆ GetCurrentCapsuleLastIndex()

INTN GetCurrentCapsuleLastIndex ( VOID  )

Get current capsule last variable index.

Returns
Current capsule last variable index.
Return values
-1No current capsule last variable.

Definition at line 51 of file DxeCapsuleReportLib.c.

◆ GetNewCapsuleResultIndex()

INTN GetNewCapsuleResultIndex ( VOID  )

Get a new capsule status variable index.

Returns
A new capsule status variable index.
Return values
0No new capsule status variable index. Rolling over.

Definition at line 83 of file DxeCapsuleReportLib.c.

◆ InitCapsuleLastVariable()

VOID InitCapsuleLastVariable ( EDKII_VARIABLE_POLICY_PROTOCOL VariablePolicy)

Initialize CapsuleLast variables.

Parameters
[in]VariablePolicyThe pointer of variable lock policy

Definition at line 355 of file DxeCapsuleReportLib.c.

◆ InitCapsuleMaxVariable()

VOID InitCapsuleMaxVariable ( EDKII_VARIABLE_POLICY_PROTOCOL VariablePolicy)

Initialize CapsuleMax variables.

Parameters
[in]VariablePolicyThe pointer of variable lock policy

Definition at line 320 of file DxeCapsuleReportLib.c.

◆ InitCapsuleRelocationInfo()

VOID InitCapsuleRelocationInfo ( EDKII_VARIABLE_POLICY_PROTOCOL VariablePolicy)

Initialize capsule relocation info variable.

Parameters
[in]VariablePolicyThe pointer of variable lock policy

Definition at line 477 of file DxeCapsuleReportLib.c.

◆ InitCapsuleUpdateVariable()

VOID InitCapsuleUpdateVariable ( VOID  )

Initialize capsule update variables.

Definition at line 425 of file DxeCapsuleReportLib.c.

◆ InitCapsuleVariable()

VOID InitCapsuleVariable ( VOID  )

Initialize capsule related variables.

Definition at line 495 of file DxeCapsuleReportLib.c.

◆ LockVariable()

VOID LockVariable ( IN CONST EFI_GUID  VariableGuid,
IN CHAR16 *  VariableName,
IN EDKII_VARIABLE_POLICY_PROTOCOL VariablePolicy 
)

Lock Variable by variable policy.

Parameters
[in]VariableGuidThe Guid of the variable to be locked
[in]VariableNameThe name of the variable to be locked
[in]VariablePolicyThe pointer of variable lock policy

Definition at line 106 of file DxeCapsuleReportLib.c.

◆ RecordCapsuleStatusVariable()

EFI_STATUS RecordCapsuleStatusVariable ( IN EFI_CAPSULE_HEADER CapsuleHeader,
IN EFI_STATUS  CapsuleStatus 
)

Record capsule status variable and to local cache.

Parameters
[in]CapsuleHeaderThe capsule image header
[in]CapsuleStatusThe capsule process stauts
Return values
EFI_SUCCESSThe capsule status variable is recorded.
EFI_OUT_OF_RESOURCESNo resource to record the capsule status variable.

Definition at line 199 of file DxeCapsuleReportLib.c.

◆ RecordFmpCapsuleStatusVariable()

EFI_STATUS RecordFmpCapsuleStatusVariable ( IN EFI_CAPSULE_HEADER CapsuleHeader,
IN EFI_STATUS  CapsuleStatus,
IN UINTN  PayloadIndex,
IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER ImageHeader,
IN EFI_DEVICE_PATH_PROTOCOL *FmpDevicePath  OPTIONAL,
IN CHAR16 *CapFileName  OPTIONAL 
)

Record FMP capsule status variable and to local cache.

Parameters
[in]CapsuleHeaderThe capsule image header
[in]CapsuleStatusThe capsule process stauts
[in]PayloadIndexFMP payload index
[in]ImageHeaderFMP image header
[in]FmpDevicePathDevicePath associated with the FMP producer
[in]CapFileNameCapsule file name
Return values
EFI_SUCCESSThe capsule status variable is recorded.
EFI_OUT_OF_RESOURCESNo resource to record the capsule status variable.

Definition at line 236 of file DxeCapsuleReportLib.c.

◆ WriteNewCapsuleResultVariable()

EFI_STATUS WriteNewCapsuleResultVariable ( IN VOID *  CapsuleResult,
IN UINTN  CapsuleResultSize 
)

Write a new capsule status variable.

Parameters
[in]CapsuleResultThe capsule status variable
[in]CapsuleResultSizeThe size of the capsule stauts variable in bytes
Return values
EFI_SUCCESSThe capsule status variable is recorded.
EFI_OUT_OF_RESOURCESNo resource to record the capsule status variable.

Definition at line 147 of file DxeCapsuleReportLib.c.