Skip to content

efi: preserve NEON registers on UEFI services calls

Olivier Martin linux-arm-kernel linux-efi 1 version New

Get series with b4
b4 am '005f01cf9ac1$f9f01460$edd03d20$@[email protected]'

Versions newest first

  1. v2 Latest0 of 2 patches 0 repliesNew

Patches in v2 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchOlivier Martin
SeriesA-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] efi: preserve NEON registers on UEFI services calls

It is correct the UEFI 2.4 spec says 'Floating point and SIMD instructions may be used'. And it is also correct these registers are not preserved in the current UEFI EDK2 implementation. I will keep track in ARM UEFI todo list.

Thanks Ard for your patch,
Olivier

Quoted 61 lines

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel at linaro.org]
Sent: 01 July 2014 14:46
To: Matt Fleming
Cc: Matt Fleming; x86 at kernel.org; Catalin Marinas; linux- efi at vger.kernel.org; linux-arm-kernel at lists.infradead.org; hpa at zytor.com; Leif Lindholm; Roy Franz; msalter at redhat.com; Olivier Martin
Subject: Re: [PATCH v2 0/2] efi: preserve NEON registers on UEFI services calls

Quoted 2 lines · Matt Fleming
Quoted 1 line · Ard Biesheuvel

The current UEFI implementation for arm64 fails to preserve/restore

the contents

Quoted 1 line
Quoted 1 line

of the NEON register file, which may result in data corruption,

especially now

Quoted 3 lines
Quoted 3 lines

that those contents are lazily restored for user processes.

This series proposes to fix this by wrapping all runtime services

calls, and

Quoted 3 lines
Quoted 3 lines

adding kernel_neon_begin()/kernel_neon_end() pairs to the wrappers.

The first patch moves the existing x86 versions of those wrappers to

generic

Quoted 1 line
Quoted 1 line

code, so that the second patch can easily enable them by supplying a

definition

Quoted 5 lines
Quoted 5 lines

for efi_call_virt and adding a call to efi_native_runtime_setup().

Changes since v1:
- rename runtime.c -> runtime-wrappers.c
- make build depend on new Kconfig symbol EFI_RUNTIME_WRAPPERS to

fix ia64

Quoted 2 lines
Quoted 2 lines

breakage
- remove default #defines for efi_call_virt()/__efi_call_virt(),

they are not

Quoted 6 lines
Quoted 6 lines

needed anymore now that it is built conditionally
- add references to applicable UEFI/AAPCS spec sections

Ard Biesheuvel (2):
efi/x86: move UEFI Runtime Services wrappers to generic code efi/arm64: preserve FP/SIMD registers on UEFI runtime services

calls

Quoted 2 lines

Thanks Ard. These patches look OK to me, and I've now pulled them

into

Quoted 3 lines

my 'next' branch.

It'd be nice if we could get some ACKs from other people since this

is

Quoted 1 line

an ABI issue.

Yes, they have been awfully quiet, haven't they?

At least Roy has volunteered to get involved in the USWG to get the spec clarified.

@Leif, Catalin, Olivier: care to chime in?

--
Ard.