]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
1. Update the logic of UpdateVariable() for updating variable from:
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / RuntimeDxe / Variable.h
index 427245abcecfdb291cfd8ecc9574c04eebef7266..8e292f36b21968ef24aad63ad255c281d6502e78 100644 (file)
@@ -65,6 +65,13 @@ typedef enum {
 \r
 typedef struct {\r
   VARIABLE_HEADER *CurrPtr;\r
+  //\r
+  // If both ADDED and IN_DELETED_TRANSITION variable are present,\r
+  // InDeletedTransitionPtr will point to the IN_DELETED_TRANSITION one.\r
+  // Otherwise, CurrPtr will point to the ADDED or IN_DELETED_TRANSITION one,\r
+  // and InDeletedTransitionPtr will be NULL at the same time.\r
+  //\r
+  VARIABLE_HEADER *InDeletedTransitionPtr;\r
   VARIABLE_HEADER *EndPtr;\r
   VARIABLE_HEADER *StartPtr;\r
   BOOLEAN         Volatile;\r
@@ -209,7 +216,7 @@ DataSizeOfVariable (
   @param[in] Attributes         Attributes of the variable.\r
   @param[in] KeyIndex           Index of associated public key.\r
   @param[in] MonotonicCount     Value of associated monotonic count.\r
-  @param[in] Variable           The variable information that is used to keep track of variable usage.\r
+  @param[in, out] Variable      The variable information that is used to keep track of variable usage.\r
 \r
   @param[in] TimeStamp          Value of associated TimeStamp.\r
 \r
@@ -226,7 +233,7 @@ UpdateVariable (
   IN      UINT32          Attributes OPTIONAL,\r
   IN      UINT32          KeyIndex  OPTIONAL,\r
   IN      UINT64          MonotonicCount  OPTIONAL,\r
-  IN      VARIABLE_POINTER_TRACK *Variable,\r
+  IN OUT  VARIABLE_POINTER_TRACK *Variable,\r
   IN      EFI_TIME        *TimeStamp  OPTIONAL  \r
   );\r
 \r
@@ -378,7 +385,7 @@ VariableCommonInitialize (
   @param[out]  LastVariableOffset      Offset of last variable.\r
   @param[in]   IsVolatile              The variable store is volatile or not;\r
                                        if it is non-volatile, need FTW.\r
-  @param[in]   UpdatingVariable        Pointer to updating variable.\r
+  @param[in, out] UpdatingPtrTrack     Pointer to updating variable pointer track structure.\r
   @param[in]   ReclaimPubKeyStore      Reclaim for public key database or not.\r
   @param[in]   ReclaimAnyway           If TRUE, do reclaim anyway.\r
   \r
@@ -392,7 +399,7 @@ Reclaim (
   IN  EFI_PHYSICAL_ADDRESS  VariableBase,\r
   OUT UINTN                 *LastVariableOffset,\r
   IN  BOOLEAN               IsVolatile,\r
-  IN  VARIABLE_HEADER       *UpdatingVariable,\r
+  IN OUT VARIABLE_POINTER_TRACK *UpdatingPtrTrack,\r
   IN  BOOLEAN               ReclaimPubKeyStore,\r
   IN  BOOLEAN               ReclaimAnyway\r
   );\r