]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.6.2/efi-initialize-efi.runtime_version-to-make-query_variable_info-update_capsule-workable.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.6.2 / efi-initialize-efi.runtime_version-to-make-query_variable_info-update_capsule-workable.patch
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
5
6 From: Seiji Aguchi <seiji.aguchi@hds.com>
7
8 commit d6cf86d8f23253225fe2a763d627ecf7dfee9dae upstream.
9
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.
13
14 <snip>
15 static efi_status_t virt_efi_query_variable_info(u32 attr,
16 u64 *storage_space,
17 u64 *remaining_space,
18 u64 *max_variable_size)
19 {
20 if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION)
21 return EFI_UNSUPPORTED;
22 <snip>
23
24 This patch initializes a value of efi.runtime_version at boot time.
25
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>
31
32 ---
33 arch/x86/platform/efi/efi.c | 1 +
34 1 file changed, 1 insertion(+)
35
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)
39 *
40 * Call EFI services through wrapper functions.
41 */
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;