2 Fmp Capsule Dependency support functions for Firmware Management Protocol based
5 Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef __DEPENDENCY_H__
12 #define __DEPENDENCY_H__
14 #include <Library/UefiLib.h>
15 #include <Protocol/FirmwareManagement.h>
17 #define DEPENDENCIES_SATISFIED 0
18 #define DEPENDENCIES_UNSATISFIED 1
19 #define DEPENDENCIES_INVALID 2
21 extern UINT8 mDependenciesCheckStatus
;
24 Validate the dependency expression and output its size.
26 @param[in] ImageDepex Pointer to the EFI_FIRMWARE_IMAGE_DEP.
27 @param[in] MaxDepexSize Max size of the dependency.
28 @param[out] DepexSize Size of dependency.
30 @retval TRUE The capsule is valid.
31 @retval FALSE The capsule is invalid.
36 IN EFI_FIRMWARE_IMAGE_DEP
*ImageDepex
,
37 IN CONST UINTN MaxDepexSize
,
42 Check dependency for firmware update.
44 @param[in] ImageTypeId Image Type Id.
45 @param[in] Version New version.
46 @param[in] Dependencies The dependencies.
47 @param[in] DepexSize Size of the dependencies
48 @param[out] IsSatisfied Indicate the dependencies is satisfied or not.
50 @retval EFI_SUCCESS Dependency Evaluation is successful.
51 @retval Others Dependency Evaluation fails with unexpected error.
55 EvaluateImageDependencies (
56 IN CONST EFI_GUID ImageTypeId
,
57 IN CONST UINT32 Version
,
58 IN CONST EFI_FIRMWARE_IMAGE_DEP
*Dependencies
,
59 IN CONST UINT32 DepexSize
,
60 OUT BOOLEAN
*IsSatisfied