X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EdkModulePkg%2FUniversal%2FEmuVariable%2FRuntimeDxe%2FInitVariable.c;h=477869cf009b8b405de24e60f8f1963a5517ba03;hb=045f4521f2dffa1f788ea12f2952782f3db627de;hp=0ad86642ea5298e52fa58795cf085fb32c38014e;hpb=1de04b4f83050f9a8f6c3eedce27f841591972f3;p=mirror_edk2.git diff --git a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/InitVariable.c b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/InitVariable.c index 0ad86642ea..477869cf00 100644 --- a/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/InitVariable.c +++ b/EdkModulePkg/Universal/EmuVariable/RuntimeDxe/InitVariable.c @@ -114,6 +114,36 @@ Returns: ); } +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) +EFI_STATUS +EFIAPI +RuntimeServiceQueryVariableInfo ( + IN UINT32 Attributes, + OUT UINT64 *MaximumVariableStorageSize, + OUT UINT64 *RemainingVariableStorageSize, + OUT UINT64 *MaximumVariableSize + ) +/*++ + +Routine Description: + +Arguments: + +Returns: + +--*/ +{ + return QueryVariableInfo ( + Attributes, + MaximumVariableStorageSize, + RemainingVariableStorageSize, + MaximumVariableSize, + &mVariableModuleGlobal->VariableBase[Physical], + mVariableModuleGlobal->FvbInstance + ); +} +#endif + VOID EFIAPI VariableClassAddressChangeEvent ( @@ -166,6 +196,9 @@ Returns: SystemTable->RuntimeServices->GetVariable = RuntimeServiceGetVariable; SystemTable->RuntimeServices->GetNextVariableName = RuntimeServiceGetNextVariableName; SystemTable->RuntimeServices->SetVariable = RuntimeServiceSetVariable; +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + SystemTable->RuntimeServices->QueryVariableInfo = RuntimeServiceQueryVariableInfo; +#endif // // Now install the Variable Runtime Architectural Protocol on a new handle