]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
1. Invoke InstallConfigurationTable () in OnReadyToBoot() to avoid the new registered...
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / Variable.c
index 8bf585a72a7156a70d211aabaf24aa9e73057dac..9da00f127579d5cd1d16fdd710874e08a30f1713 100644 (file)
@@ -2259,9 +2259,6 @@ VariableWriteServiceInitialize (
   VARIABLE_STORE_HEADER           *VariableStoreHeader;\r
   UINTN                           Index;\r
   UINT8                           Data;\r
-  EFI_GCD_MEMORY_SPACE_DESCRIPTOR GcdDescriptor;\r
-  EFI_PHYSICAL_ADDRESS            BaseAddress;\r
-  UINT64                          Length;\r
   EFI_PHYSICAL_ADDRESS            VariableStoreBase;\r
   UINT64                          VariableStoreLength;\r
 \r
@@ -2291,26 +2288,6 @@ VariableWriteServiceInitialize (
     }\r
   }\r
 \r
-  //\r
-  // Mark the variable storage region of the FLASH as RUNTIME.\r
-  //\r
-  BaseAddress = VariableStoreBase & (~EFI_PAGE_MASK);\r
-  Length      = VariableStoreLength + (VariableStoreBase - BaseAddress);\r
-  Length      = (Length + EFI_PAGE_SIZE - 1) & (~EFI_PAGE_MASK);\r
-\r
-  Status      = gDS->GetMemorySpaceDescriptor (BaseAddress, &GcdDescriptor);\r
-  if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_WARN, "Variable driver failed to add EFI_MEMORY_RUNTIME attribute to Flash.\n"));\r
-  } else {\r
-    Status = gDS->SetMemorySpaceAttributes (\r
-                    BaseAddress,\r
-                    Length,\r
-                    GcdDescriptor.Attributes | EFI_MEMORY_RUNTIME\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_WARN, "Variable driver failed to add EFI_MEMORY_RUNTIME attribute to Flash.\n"));\r
-    }\r
-  }\r
   return EFI_SUCCESS;\r
 }\r
 \r