1 From d6cf86d8f23253225fe2a763d627ecf7dfee9dae Mon Sep 17 00:00:00 2001
2 From: Seiji Aguchi <seiji.aguchi@hds.com>
3 Date: Tue, 24 Jul 2012 13:27:23 +0000
4 Subject: efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable
6 From: Seiji Aguchi <seiji.aguchi@hds.com>
8 commit d6cf86d8f23253225fe2a763d627ecf7dfee9dae upstream.
10 A value of efi.runtime_version is checked before calling
11 update_capsule()/query_variable_info() as follows.
12 But it isn't initialized anywhere.
15 static efi_status_t virt_efi_query_variable_info(u32 attr,
18 u64 *max_variable_size)
20 if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION)
21 return EFI_UNSUPPORTED;
24 This patch initializes a value of efi.runtime_version at boot time.
26 Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
27 Acked-by: Matthew Garrett <mjg@redhat.com>
28 Signed-off-by: Matt Fleming <matt.fleming@intel.com>
29 Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 arch/x86/platform/efi/efi.c | 1 +
34 1 file changed, 1 insertion(+)
36 --- a/arch/x86/platform/efi/efi.c
37 +++ b/arch/x86/platform/efi/efi.c
38 @@ -890,6 +890,7 @@ void __init efi_enter_virtual_mode(void)
40 * Call EFI services through wrapper functions.
42 + efi.runtime_version = efi_systab.fw_revision;
43 efi.get_time = virt_efi_get_time;
44 efi.set_time = virt_efi_set_time;
45 efi.get_wakeup_time = virt_efi_get_wakeup_time;