diff mbox

[v2] efi/arm64: store Runtime Services revision

Message ID 1408108964-28650-1-git-send-email-semen.protsenko@linaro.org
State Accepted
Commit 6a7519e81321343165f89abb8b616df186d3e57a
Headers show

Commit Message

Sam Protsenko Aug. 15, 2014, 1:22 p.m. UTC
"efi" global data structure contains "runtime_version" field which must
be assigned in order to use it later in Runtime Services virtual calls
(virt_efi_* functions).

Before this patch "runtime_version" was unassigned (0), so each
Runtime Service virtual call that checks revision would fail.

Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>
---
 arch/arm64/kernel/efi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ard Biesheuvel Aug. 15, 2014, 1:38 p.m. UTC | #1
On 15 August 2014 15:22, Semen Protsenko <semen.protsenko@linaro.org> wrote:
> "efi" global data structure contains "runtime_version" field which must
> be assigned in order to use it later in Runtime Services virtual calls
> (virt_efi_* functions).
>
> Before this patch "runtime_version" was unassigned (0), so each
> Runtime Service virtual call that checks revision would fail.
>
> Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

@Matt, could you take this?
Matt Fleming Aug. 15, 2014, 1:43 p.m. UTC | #2
On Fri, 15 Aug, at 03:38:48PM, Ard Biesheuvel wrote:
> On 15 August 2014 15:22, Semen Protsenko <semen.protsenko@linaro.org> wrote:
> > "efi" global data structure contains "runtime_version" field which must
> > be assigned in order to use it later in Runtime Services virtual calls
> > (virt_efi_* functions).
> >
> > Before this patch "runtime_version" was unassigned (0), so each
> > Runtime Service virtual call that checks revision would fail.
> >
> > Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>
> 
> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> 
> @Matt, could you take this?

Certainly. Looks like this should go into the 'urgent' queue and be
tagged for stable?
Ard Biesheuvel Aug. 15, 2014, 1:55 p.m. UTC | #3
On 15 August 2014 15:43, Matt Fleming <matt@console-pimps.org> wrote:
> On Fri, 15 Aug, at 03:38:48PM, Ard Biesheuvel wrote:
>> On 15 August 2014 15:22, Semen Protsenko <semen.protsenko@linaro.org> wrote:
>> > "efi" global data structure contains "runtime_version" field which must
>> > be assigned in order to use it later in Runtime Services virtual calls
>> > (virt_efi_* functions).
>> >
>> > Before this patch "runtime_version" was unassigned (0), so each
>> > Runtime Service virtual call that checks revision would fail.
>> >
>> > Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>
>>
>> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>
>> @Matt, could you take this?
>
> Certainly. Looks like this should go into the 'urgent' queue and be
> tagged for stable?
>

Yes, please (for 3.16)
diff mbox

Patch

diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index e72f310..5dbb7bd 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -463,6 +463,8 @@  static int __init arm64_enter_virtual_mode(void)
 	efi_native_runtime_setup();
 	set_bit(EFI_RUNTIME_SERVICES, &efi.flags);
 
+	efi.runtime_version = efi.systab->hdr.revision;
+
 	return 0;
 
 err_unmap: