]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
SecurityPkg/SecureBootConfigImpl.c: Secure Boot DBX UI Enhancement
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / SecureBootConfigDxe / SecureBootConfigImpl.h
index 75b18f121c1f3c4818b651d0f86c71100cf0e173..52ad91b002f23fd3c59ee1c647b5d65baed5a3e4 100644 (file)
@@ -112,6 +112,23 @@ typedef struct {
   UINT8                             FileType;\r
 } SECUREBOOT_FILE_CONTEXT;\r
 \r
+#define SECUREBOOT_FREE_NON_NULL(Pointer)   \\r
+  do {                                      \\r
+    if ((Pointer) != NULL) {                \\r
+      FreePool((Pointer));                  \\r
+      (Pointer) = NULL;                     \\r
+    }                                       \\r
+  } while (FALSE)\r
+\r
+#define SECUREBOOT_FREE_NON_OPCODE(Handle)  \\r
+  do{                                       \\r
+    if ((Handle) != NULL) {                 \\r
+      HiiFreeOpCodeHandle((Handle));        \\r
+    }                                       \\r
+  } while (FALSE)\r
+\r
+#define SIGNATURE_DATA_COUNTS(List)         \\r
+  (((List)->SignatureListSize - sizeof(EFI_SIGNATURE_LIST) - (List)->SignatureHeaderSize) / (List)->SignatureSize)\r
 \r
 //\r
 // We define another format of 5th directory entry: security directory\r
@@ -134,6 +151,19 @@ typedef struct {
   EFI_DEVICE_PATH_PROTOCOL          End;\r
 } HII_VENDOR_DEVICE_PATH;\r
 \r
+typedef enum {\r
+  VARIABLE_DB,\r
+  VARIABLE_DBX,\r
+  VARIABLE_DBT,\r
+  VARIABLE_MAX\r
+} CURRENT_VARIABLE_NAME;\r
+\r
+typedef enum {\r
+  DELETE_SIGNATURE_LIST_ALL,\r
+  DELETE_SIGNATURE_LIST_ONE,\r
+  DELETE_SIGNATURE_DATA\r
+}SIGNATURE_DELETE_TYPE;\r
+\r
 typedef struct {\r
   UINTN                             Signature;\r
 \r
@@ -144,6 +174,11 @@ typedef struct {
   SECUREBOOT_FILE_CONTEXT           *FileContext;\r
 \r
   EFI_GUID                          *SignatureGUID;\r
+\r
+  CURRENT_VARIABLE_NAME             VariableName;     // The variable name we are processing.\r
+  UINT32                            ListCount;        // Record current variable has how many signature list.\r
+  UINTN                             ListIndex;        // Record which signature list is processing.\r
+  BOOLEAN                           *CheckArray;      // Record whcih siganture data checked.\r
 } SECUREBOOT_CONFIG_PRIVATE_DATA;\r
 \r
 extern SECUREBOOT_CONFIG_PRIVATE_DATA      mSecureBootConfigPrivateDateTemplate;\r