]> git.proxmox.com Git - mirror_edk2.git/blob - FmpDevicePkg/Include/Library/FmpDependencyCheckLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / FmpDevicePkg / Include / Library / FmpDependencyCheckLib.h
1 /** @file
2 Fmp Capsule Dependency check functions for Firmware Management Protocol based
3 firmware updates.
4
5 Copyright (c) Microsoft Corporation.<BR>
6 Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 **/
11
12 #ifndef __FMP_DEPENDENCY_CHECK_LIB__
13 #define __FMP_DEPENDENCY_CHECK_LIB__
14
15 #include <PiDxe.h>
16 #include <Protocol/FirmwareManagement.h>
17
18 /**
19 Check dependency for firmware update.
20
21 @param[in] ImageTypeId Image Type Id.
22 @param[in] Version New version.
23 @param[in] Dependencies Fmp dependency.
24 @param[in] DependenciesSize Size, in bytes, of the Fmp dependency.
25 @param[out] LastAttemptStatus An optional pointer to a UINT32 that holds the
26 last attempt status to report back to the caller.
27 This function will set the value to LAST_ATTEMPT_STATUS_SUCCESS
28 if an error code is not set.
29
30 @retval TRUE Dependencies are satisfied.
31 @retval FALSE Dependencies are unsatisfied or dependency check fails.
32
33 **/
34 BOOLEAN
35 EFIAPI
36 CheckFmpDependency (
37 IN EFI_GUID ImageTypeId,
38 IN UINT32 Version,
39 IN EFI_FIRMWARE_IMAGE_DEP *Dependencies OPTIONAL,
40 IN UINT32 DependenciesSize,
41 OUT UINT32 *LastAttemptStatus OPTIONAL
42 );
43
44 #endif