--- /dev/null
+/** @file\r
+ Fmp Capsule Dependency support functions for Firmware Management Protocol based\r
+ firmware updates.\r
+\r
+ Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef __DEPENDENCY_H__\r
+#define __DEPENDENCY_H__\r
+\r
+#include <Library/UefiLib.h>\r
+#include <Protocol/FirmwareManagement.h>\r
+\r
+#define DEPENDENCIES_SATISFIED 0\r
+#define DEPENDENCIES_UNSATISFIED 1\r
+#define DEPENDENCIES_INVALID 2\r
+\r
+extern UINT8 mDependenciesCheckStatus;\r
+\r
+/**\r
+ Validate the dependency expression and output its size.\r
+\r
+ @param[in] ImageDepex Pointer to the EFI_FIRMWARE_IMAGE_DEP.\r
+ @param[in] MaxDepexSize Max size of the dependency.\r
+ @param[out] DepexSize Size of dependency.\r
+\r
+ @retval TRUE The capsule is valid.\r
+ @retval FALSE The capsule is invalid.\r
+\r
+**/\r
+BOOLEAN\r
+ValidateImageDepex (\r
+ IN EFI_FIRMWARE_IMAGE_DEP *ImageDepex,\r
+ IN CONST UINTN MaxDepexSize,\r
+ OUT UINT32 *DepexSize\r
+ );\r
+\r
+/**\r
+ Check dependency for firmware update.\r
+\r
+ @param[in] ImageTypeId Image Type Id.\r
+ @param[in] Version New version.\r
+ @param[in] Dependencies The dependencies.\r
+ @param[in] DepexSize Size of the dependencies\r
+ @param[out] IsSatisfied Indicate the dependencies is satisfied or not.\r
+\r
+ @retval EFI_SUCCESS Dependency Evaluation is successful.\r
+ @retval Others Dependency Evaluation fails with unexpected error.\r
+\r
+**/\r
+EFI_STATUS\r
+EvaluateImageDependencies (\r
+ IN CONST EFI_GUID ImageTypeId,\r
+ IN CONST UINT32 Version,\r
+ IN CONST EFI_FIRMWARE_IMAGE_DEP *Dependencies,\r
+ IN CONST UINT32 DependenciesSize,\r
+ OUT BOOLEAN *IsSatisfied\r
+ );\r
+\r
+#endif\r