]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Variable/RuntimeDxe/InitVariable.c
1)Add a new module CapsuleRuntime under EdkModulePkg\Universal\Capsule\RuntimeDxe...
[mirror_edk2.git] / EdkModulePkg / Universal / Variable / RuntimeDxe / InitVariable.c
index 0ad86642ea5298e52fa58795cf085fb32c38014e..477869cf009b8b405de24e60f8f1963a5517ba03 100644 (file)
@@ -114,6 +114,36 @@ Returns:
           );\r
 }\r
 \r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\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->VariableBase[Physical],\r
+          mVariableModuleGlobal->FvbInstance\r
+          );\r
+}\r
+#endif\r
+\r
 VOID\r
 EFIAPI\r
 VariableClassAddressChangeEvent (\r
@@ -166,6 +196,9 @@ Returns:
   SystemTable->RuntimeServices->GetVariable         = RuntimeServiceGetVariable;\r
   SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName;\r
   SystemTable->RuntimeServices->SetVariable         = RuntimeServiceSetVariable;\r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+  SystemTable->RuntimeServices->QueryVariableInfo   = RuntimeServiceQueryVariableInfo;\r
+#endif\r
 \r
   //\r
   // Now install the Variable Runtime Architectural Protocol on a new handle\r