mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable
@ 2012-07-24 13:27 Seiji Aguchi
  2012-07-24 16:34 ` Matthew Garrett
  0 siblings, 1 reply; 2+ messages in thread
From: Seiji Aguchi @ 2012-07-24 13:27 UTC (permalink / raw)
  To: linux-kernel, linux-efi, x86,
	Thomas Gleixner (tglx@linutronix.de),
	'mingo@elte.hu' (mingo@elte.hu),
	H. Peter Anvin (hpa@linux.intel.com),
	matt.fleming, olof, Paul Gortmaker (paul.gortmaker@windriver.com),
	Matthew Garrett (mjg@redhat.com)
  Cc: dle-develop, Satoru Moriya

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>

---
 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 92660ed..f55a4ce 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -890,6 +890,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	[flat|nested] 2+ messages in thread

* Re: [PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable
  2012-07-24 13:27 [PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable Seiji Aguchi
@ 2012-07-24 16:34 ` Matthew Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Garrett @ 2012-07-24 16:34 UTC (permalink / raw)
  To: Seiji Aguchi
  Cc: linux-kernel, linux-efi, x86,
	Thomas Gleixner (tglx@linutronix.de),
	'mingo@elte.hu' (mingo@elte.hu),
	H. Peter Anvin (hpa@linux.intel.com),
	matt.fleming, olof, Paul Gortmaker (paul.gortmaker@windriver.com),
	dle-develop, Satoru Moriya

On Tue, Jul 24, 2012 at 01:27:23PM +0000, Seiji Aguchi wrote:
> 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>

I could have sworn that something equivalent had been posted before, 
but:

Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

end of thread, other threads:[~2012-07-24 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 13:27 [PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable Seiji Aguchi
2012-07-24 16:34 ` Matthew Garrett

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

Powered by JetHome