TianoCore EDK2 master
|
#include <PiDxe.h>
#include <Protocol/FirmwareManagement.h>
#include <Guid/CapsuleReport.h>
#include <Guid/FmpCapsule.h>
#include <Guid/CapsuleVendor.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/PcdLib.h>
#include <Library/HobLib.h>
#include <Library/PrintLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/DevicePathLib.h>
#include <Library/CapsuleLib.h>
#include <Library/VariablePolicyHelperLib.h>
#include <IndustryStandard/WindowsUxCapsule.h>
Go to the source code of this file.
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.
EFI_STATUS CoDClearCapsuleRelocationInfo | ( | VOID | ) |
This routine is called to clear CapsuleOnDisk Relocation Info variable. Total Capsule On Disk length is recorded in this variable
EFI_SUCCESS | Capsule On Disk flags are cleared |
Definition at line 1398 of file CapsuleOnDisk.c.
INTN GetCurrentCapsuleLastIndex | ( | VOID | ) |
Get current capsule last variable index.
-1 | No current capsule last variable. |
Definition at line 51 of file DxeCapsuleReportLib.c.
INTN GetNewCapsuleResultIndex | ( | VOID | ) |
Get a new capsule status variable index.
0 | No new capsule status variable index. Rolling over. |
Definition at line 83 of file DxeCapsuleReportLib.c.
VOID InitCapsuleLastVariable | ( | EDKII_VARIABLE_POLICY_PROTOCOL * | VariablePolicy | ) |
Initialize CapsuleLast variables.
[in] | VariablePolicy | The pointer of variable lock policy |
Definition at line 355 of file DxeCapsuleReportLib.c.
VOID InitCapsuleMaxVariable | ( | EDKII_VARIABLE_POLICY_PROTOCOL * | VariablePolicy | ) |
Initialize CapsuleMax variables.
[in] | VariablePolicy | The pointer of variable lock policy |
Definition at line 320 of file DxeCapsuleReportLib.c.
VOID InitCapsuleRelocationInfo | ( | EDKII_VARIABLE_POLICY_PROTOCOL * | VariablePolicy | ) |
Initialize capsule relocation info variable.
[in] | VariablePolicy | The pointer of variable lock policy |
Definition at line 477 of file DxeCapsuleReportLib.c.
VOID InitCapsuleUpdateVariable | ( | VOID | ) |
Initialize capsule update variables.
Definition at line 425 of file DxeCapsuleReportLib.c.
VOID InitCapsuleVariable | ( | VOID | ) |
Initialize capsule related variables.
Definition at line 495 of file DxeCapsuleReportLib.c.
VOID LockVariable | ( | IN CONST EFI_GUID | VariableGuid, |
IN CHAR16 * | VariableName, | ||
IN EDKII_VARIABLE_POLICY_PROTOCOL * | VariablePolicy | ||
) |
Lock Variable by variable policy.
[in] | VariableGuid | The Guid of the variable to be locked |
[in] | VariableName | The name of the variable to be locked |
[in] | VariablePolicy | The pointer of variable lock policy |
Definition at line 106 of file DxeCapsuleReportLib.c.
EFI_STATUS RecordCapsuleStatusVariable | ( | IN EFI_CAPSULE_HEADER * | CapsuleHeader, |
IN EFI_STATUS | CapsuleStatus | ||
) |
Record capsule status variable and to local cache.
[in] | CapsuleHeader | The capsule image header |
[in] | CapsuleStatus | The capsule process stauts |
EFI_SUCCESS | The capsule status variable is recorded. |
EFI_OUT_OF_RESOURCES | No resource to record the capsule status variable. |
Definition at line 199 of file DxeCapsuleReportLib.c.
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.
[in] | CapsuleHeader | The capsule image header |
[in] | CapsuleStatus | The capsule process stauts |
[in] | PayloadIndex | FMP payload index |
[in] | ImageHeader | FMP image header |
[in] | FmpDevicePath | DevicePath associated with the FMP producer |
[in] | CapFileName | Capsule file name |
EFI_SUCCESS | The capsule status variable is recorded. |
EFI_OUT_OF_RESOURCES | No resource to record the capsule status variable. |
Definition at line 236 of file DxeCapsuleReportLib.c.
EFI_STATUS WriteNewCapsuleResultVariable | ( | IN VOID * | CapsuleResult, |
IN UINTN | CapsuleResultSize | ||
) |
Write a new capsule status variable.
[in] | CapsuleResult | The capsule status variable |
[in] | CapsuleResultSize | The size of the capsule stauts variable in bytes |
EFI_SUCCESS | The capsule status variable is recorded. |
EFI_OUT_OF_RESOURCES | No resource to record the capsule status variable. |
Definition at line 147 of file DxeCapsuleReportLib.c.