public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable
@ 2012-08-06 18:37 Seiji Aguchi
  2012-08-16  7:53 ` Matt Fleming
  0 siblings, 1 reply; 4+ messages in thread
From: Seiji Aguchi @ 2012-08-06 18:37 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
	x86@kernel.org, Thomas Gleixner (tglx@linutronix.de),
	'mingo@elte.hu' (mingo@elte.hu),
	H. Peter Anvin (hpa@linux.intel.com), matt.fleming@intel.com,
	olof@lixom.net, Paul Gortmaker (paul.gortmaker@windriver.com)
  Cc: dle-develop@lists.sourceforge.net, Satoru Moriya, Matthew Garrett

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.

Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
---
 arch/x86/platform/efi/efi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 2dc29f5..4c82998 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -868,6 +868,7 @@ void __init efi_enter_virtual_mode(void)
 	 *
 	 * Call EFI services through wrapper functions.
 	 */
+	efi.runtime_version = efi_systab.fw_revision;
 	efi.get_time = virt_efi_get_time;
 	efi.set_time = virt_efi_set_time;
 	efi.get_wakeup_time = virt_efi_get_wakeup_time;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-17 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-06 18:37 [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable Seiji Aguchi
2012-08-16  7:53 ` Matt Fleming
2012-08-16 21:43   ` H. Peter Anvin
2012-08-17 10:31     ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox