2012-08-06 18:38:06

by Seiji Aguchi

[permalink] [raw]
Subject: [RESEND][PATCH]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.

Acked-by: Matthew Garrett <[email protected]>
Signed-off-by: Seiji Aguchi <[email protected]>
---
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


2012-08-16 07:53:55

by Matt Fleming

[permalink] [raw]
Subject: Re: [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable

On Mon, 2012-08-06 at 18:37 +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.
>
> Acked-by: Matthew Garrett <[email protected]>
> Signed-off-by: Seiji Aguchi <[email protected]>
> ---
> arch/x86/platform/efi/efi.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

Thanks, I picked this up just so it doesn't get lost. It will probably
go to Linus via Peter Anvin.

2012-08-16 21:44:27

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable

On 08/16/2012 12:53 AM, Matt Fleming wrote:
> On Mon, 2012-08-06 at 18:37 +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.
>>
>> Acked-by: Matthew Garrett <[email protected]>
>> Signed-off-by: Seiji Aguchi <[email protected]>
>> ---
>> arch/x86/platform/efi/efi.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> Thanks, I picked this up just so it doesn't get lost. It will probably
> go to Linus via Peter Anvin.
>

Should I take that as an Acked-by: on your part?

-hpa

2012-08-17 10:31:58

by Matt Fleming

[permalink] [raw]
Subject: Re: [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable

On Thu, 2012-08-16 at 14:43 -0700, H. Peter Anvin wrote:
> On 08/16/2012 12:53 AM, Matt Fleming wrote:
> > On Mon, 2012-08-06 at 18:37 +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.
> >>
> >> Acked-by: Matthew Garrett <[email protected]>
> >> Signed-off-by: Seiji Aguchi <[email protected]>
> >> ---
> >> arch/x86/platform/efi/efi.c | 1 +
> >> 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > Thanks, I picked this up just so it doesn't get lost. It will probably
> > go to Linus via Peter Anvin.
> >
>
> Should I take that as an Acked-by: on your part?

Yep.