]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
MdeModulePkg Variable: Add emulated variable NV mode support
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / Variable.h
index 938eb5de61fa48234d32a090a952fb076c562493..7a3a5f34deab49838121ba2d0d159c763c75325c 100644 (file)
@@ -2,7 +2,7 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by Variable modules.\r
 \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -46,6 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "PrivilegePolymorphic.h"\r
 \r
+#define NV_STORAGE_VARIABLE_BASE (EFI_PHYSICAL_ADDRESS) \\r
+                                   (PcdGet64 (PcdFlashNvStorageVariableBase64) != 0 ? \\r
+                                    PcdGet64 (PcdFlashNvStorageVariableBase64) : \\r
+                                    PcdGet32 (PcdFlashNvStorageVariableBase))\r
+\r
 #define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE | \\r
                                       EFI_VARIABLE_BOOTSERVICE_ACCESS | \\r
                                       EFI_VARIABLE_RUNTIME_ACCESS | \\r
@@ -87,6 +92,7 @@ typedef struct {
   UINT32                ReentrantState;\r
   BOOLEAN               AuthFormat;\r
   BOOLEAN               AuthSupport;\r
+  BOOLEAN               EmuNvMode;\r
 } VARIABLE_GLOBAL;\r
 \r
 typedef struct {\r
@@ -473,7 +479,7 @@ GetMaxVariableSize (
   );\r
 \r
 /**\r
-  Initializes variable write service after FVB was ready.\r
+  Initializes variable write service.\r
 \r
   @retval EFI_SUCCESS          Function successfully executed.\r
   @retval Others               Fail to initialize the variable service.\r
@@ -792,9 +798,14 @@ InitializeVariableQuota (
   VOID\r
   );\r
 \r
-extern VARIABLE_MODULE_GLOBAL  *mVariableModuleGlobal;\r
+extern VARIABLE_MODULE_GLOBAL       *mVariableModuleGlobal;\r
+extern EFI_FIRMWARE_VOLUME_HEADER   *mNvFvHeaderCache;\r
+extern VARIABLE_STORE_HEADER        *mNvVariableCache;\r
+extern VARIABLE_INFO_ENTRY          *gVariableInfo;\r
+extern BOOLEAN                      mEndOfDxe;\r
+extern VAR_CHECK_REQUEST_SOURCE     mRequestSource;\r
 \r
-extern AUTH_VAR_LIB_CONTEXT_OUT mAuthContextOut;\r
+extern AUTH_VAR_LIB_CONTEXT_OUT     mAuthContextOut;\r
 \r
 /**\r
   Finds variable in storage blocks of volatile and non-volatile storage areas.\r