]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/Include/Library/FmpDependencyLib.h
FmpDevicePkg: Add Last Attempt Status support to dependency libs
[mirror_edk2.git] / FmpDevicePkg / Include / Library / FmpDependencyLib.h
index c732903425b4c57d9a21ab61797416c6c4090160..f460f0f07882a6dba0093c22900c4ca8f14a8a1e 100644 (file)
@@ -26,9 +26,13 @@ typedef struct {
 /**\r
   Validate the dependency expression and output its size.\r
 \r
-  @param[in]   Dependencies   Pointer to the EFI_FIRMWARE_IMAGE_DEP.\r
-  @param[in]   MaxDepexSize   Max size of the dependency.\r
-  @param[out]  DepexSize      Size of dependency.\r
+  @param[in]   Dependencies       Pointer to the EFI_FIRMWARE_IMAGE_DEP.\r
+  @param[in]   MaxDepexSize       Max size of the dependency.\r
+  @param[out]  DepexSize          Size of dependency.\r
+  @param[out]  LastAttemptStatus  An optional pointer to a UINT32 that holds the\r
+                                  last attempt status to report back to the caller.\r
+                                  If a last attempt status error code is not returned,\r
+                                  this function will not modify the LastAttemptStatus value.\r
 \r
   @retval TRUE    The dependency expression is valid.\r
   @retval FALSE   The dependency expression is invalid.\r
@@ -39,16 +43,20 @@ EFIAPI
 ValidateDependency (\r
   IN  EFI_FIRMWARE_IMAGE_DEP  *Dependencies,\r
   IN  UINTN                   MaxDepexSize,\r
-  OUT UINT32                  *DepexSize\r
+  OUT UINT32                  *DepexSize,\r
+  OUT UINT32                  *LastAttemptStatus OPTIONAL\r
   );\r
 \r
 /**\r
   Get dependency from firmware image.\r
 \r
-  @param[in]  Image       Points to the firmware image.\r
-  @param[in]  ImageSize   Size, in bytes, of the firmware image.\r
-  @param[out] DepexSize   Size, in bytes, of the dependency.\r
-\r
+  @param[in]  Image               Points to the firmware image.\r
+  @param[in]  ImageSize           Size, in bytes, of the firmware image.\r
+  @param[out] DepexSize           Size, in bytes, of the dependency.\r
+  @param[out] LastAttemptStatus   An optional pointer to a UINT32 that holds the\r
+                                  last attempt status to report back to the caller.\r
+                                  If a last attempt status error code is not returned,\r
+                                  this function will not modify the LastAttemptStatus value.\r
   @retval  The pointer to dependency.\r
   @retval  Null\r
 \r
@@ -56,9 +64,10 @@ ValidateDependency (
 EFI_FIRMWARE_IMAGE_DEP*\r
 EFIAPI\r
 GetImageDependency (\r
-  IN  EFI_FIRMWARE_IMAGE_AUTHENTICATION  *Image,\r
-  IN  UINTN                              ImageSize,\r
-  OUT UINT32                             *DepexSize\r
+  IN  EFI_FIRMWARE_IMAGE_AUTHENTICATION *Image,\r
+  IN  UINTN                             ImageSize,\r
+  OUT UINT32                            *DepexSize,\r
+  OUT UINT32                            *LastAttemptStatus  OPTIONAL\r
   );\r
 \r
 /**\r
@@ -73,6 +82,10 @@ GetImageDependency (
                                   parameter is optional and can be set to NULL.\r
   @param[in]   FmpVersionsCount   Element count of the array. When FmpVersions\r
                                   is NULL, FmpVersionsCount must be 0.\r
+  @param[out]  LastAttemptStatus  An optional pointer to a UINT32 that holds the\r
+                                  last attempt status to report back to the caller.\r
+                                  This function will set the value to LAST_ATTEMPT_STATUS_SUCCESS\r
+                                  if an error code is not set.\r
 \r
   @retval TRUE    Dependency expressions evaluate to TRUE.\r
   @retval FALSE   Dependency expressions evaluate to FALSE.\r
@@ -81,10 +94,11 @@ GetImageDependency (
 BOOLEAN\r
 EFIAPI\r
 EvaluateDependency (\r
-  IN EFI_FIRMWARE_IMAGE_DEP        *Dependencies,\r
-  IN UINTN                         DependenciesSize,\r
-  IN FMP_DEPEX_CHECK_VERSION_DATA  *FmpVersions      OPTIONAL,\r
-  IN UINTN                         FmpVersionsCount\r
+  IN  EFI_FIRMWARE_IMAGE_DEP        *Dependencies,\r
+  IN  UINTN                         DependenciesSize,\r
+  IN  FMP_DEPEX_CHECK_VERSION_DATA  *FmpVersions,      OPTIONAL\r
+  IN  UINTN                         FmpVersionsCount,\r
+  OUT UINT32                        *LastAttemptStatus OPTIONAL\r
   );\r
 \r
 #endif\r