]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/EmuVariable/RuntimeDxe/InitVariable.c
1. Removed #ifdef EDK_RELEASE_VERSION from all c files for all modules
[mirror_edk2.git] / EdkModulePkg / Universal / EmuVariable / RuntimeDxe / InitVariable.c
index 0ad86642ea5298e52fa58795cf085fb32c38014e..efff41c25345c686101180e81e4451d0b532bb91 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -51,7 +51,7 @@ Returns:
           Attributes OPTIONAL,\r
           DataSize,\r
           Data,\r
-          &mVariableModuleGlobal->VariableBase[Physical],\r
+          &mVariableModuleGlobal->VariableGlobal[Physical],\r
           mVariableModuleGlobal->FvbInstance\r
           );\r
 }\r
@@ -77,7 +77,7 @@ Returns:
           VariableNameSize,\r
           VariableName,\r
           VendorGuid,\r
-          &mVariableModuleGlobal->VariableBase[Physical],\r
+          &mVariableModuleGlobal->VariableGlobal[Physical],\r
           mVariableModuleGlobal->FvbInstance\r
           );\r
 }\r
@@ -107,13 +107,41 @@ Returns:
           Attributes,\r
           DataSize,\r
           Data,\r
-          &mVariableModuleGlobal->VariableBase[Physical],\r
+          &mVariableModuleGlobal->VariableGlobal[Physical],\r
           &mVariableModuleGlobal->VolatileLastVariableOffset,\r
           &mVariableModuleGlobal->NonVolatileLastVariableOffset,\r
           mVariableModuleGlobal->FvbInstance\r
           );\r
 }\r
 \r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeServiceQueryVariableInfo (\r
+  IN  UINT32                 Attributes,\r
+  OUT UINT64                 *MaximumVariableStorageSize,\r
+  OUT UINT64                 *RemainingVariableStorageSize,\r
+  OUT UINT64                 *MaximumVariableSize\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  return QueryVariableInfo (\r
+          Attributes,\r
+          MaximumVariableStorageSize,\r
+          RemainingVariableStorageSize,\r
+          MaximumVariableSize,\r
+          &mVariableModuleGlobal->VariableGlobal[Physical],\r
+          mVariableModuleGlobal->FvbInstance\r
+          );\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 VariableClassAddressChangeEvent (\r
@@ -132,11 +160,11 @@ Returns:
 {\r
   EfiConvertPointer (\r
     0x0,\r
-    (VOID **) &mVariableModuleGlobal->VariableBase[Physical].NonVolatileVariableBase\r
+    (VOID **) &mVariableModuleGlobal->VariableGlobal[Physical].NonVolatileVariableBase\r
     );\r
   EfiConvertPointer (\r
     0x0,\r
-    (VOID **) &mVariableModuleGlobal->VariableBase[Physical].VolatileVariableBase\r
+    (VOID **) &mVariableModuleGlobal->VariableGlobal[Physical].VolatileVariableBase\r
     );\r
   EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal);\r
 }\r
@@ -166,6 +194,7 @@ Returns:
   SystemTable->RuntimeServices->GetVariable         = RuntimeServiceGetVariable;\r
   SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;\r
   SystemTable->RuntimeServices->SetVariable         = RuntimeServiceSetVariable;\r
+  SystemTable->RuntimeServices->QueryVariableInfo   = RuntimeServiceQueryVariableInfo;\r
 \r
   //\r
   // Now install the Variable Runtime Architectural Protocol on a new handle\r