efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable
authorSeiji Aguchi <seiji.aguchi@hds.com>
Tue, 24 Jul 2012 13:27:23 +0000 (13:27 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Mon, 17 Sep 2012 12:29:22 +0000 (13:29 +0100)
commitd6cf86d8f23253225fe2a763d627ecf7dfee9dae
treef76cc6e08266d41c64b40b4969de4129b110fbc2
parent9dead5bbb825d7c25c0400e61de83075046322d0
efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable

A value of efi.runtime_version is checked before calling
update_capsule()/query_variable_info() as follows.
But it isn't initialized anywhere.

<snip>
static efi_status_t virt_efi_query_variable_info(u32 attr,
                                                 u64 *storage_space,
                                                 u64 *remaining_space,
                                                 u64 *max_variable_size)
{
        if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION)
                return EFI_UNSUPPORTED;
<snip>

This patch initializes a value of efi.runtime_version at boot time.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/platform/efi/efi.c