Commit de05764e authored by Ricardo Neri's avatar Ricardo Neri Committed by Matt Fleming

x86/efi: Save and restore FPU context around efi_calls (x86_64)

Do a complete FPU context save/restore around the EFI calls. This required
as runtime EFI firmware may potentially use the FPU.

This change covers only the x86_64 configuration.
Signed-off-by: default avatarRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 982e239c
#ifndef _ASM_X86_EFI_H #ifndef _ASM_X86_EFI_H
#define _ASM_X86_EFI_H #define _ASM_X86_EFI_H
#include <asm/i387.h>
/* /*
* We map the EFI regions needed for runtime services non-contiguously, * We map the EFI regions needed for runtime services non-contiguously,
* with preserved alignment on virtual addresses starting from -4G down * with preserved alignment on virtual addresses starting from -4G down
...@@ -54,7 +55,9 @@ extern u64 asmlinkage efi_call(void *fp, ...); ...@@ -54,7 +55,9 @@ extern u64 asmlinkage efi_call(void *fp, ...);
\ \
efi_sync_low_kernel_mappings(); \ efi_sync_low_kernel_mappings(); \
preempt_disable(); \ preempt_disable(); \
__kernel_fpu_begin(); \
__s = efi_call((void *)efi.systab->runtime->f, __VA_ARGS__); \ __s = efi_call((void *)efi.systab->runtime->f, __VA_ARGS__); \
__kernel_fpu_end(); \
preempt_enable(); \ preempt_enable(); \
__s; \ __s; \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment