| .. | .. |
|---|
| 8 | 8 | */ |
|---|
| 9 | 9 | |
|---|
| 10 | 10 | #include <linux/linkage.h> |
|---|
| 11 | | -#include <asm/segment.h> |
|---|
| 12 | | -#include <asm/msr.h> |
|---|
| 13 | | -#include <asm/processor-flags.h> |
|---|
| 14 | | -#include <asm/page_types.h> |
|---|
| 11 | +#include <asm/nospec-branch.h> |
|---|
| 15 | 12 | |
|---|
| 16 | | -#define SAVE_XMM \ |
|---|
| 17 | | - mov %rsp, %rax; \ |
|---|
| 18 | | - subq $0x70, %rsp; \ |
|---|
| 19 | | - and $~0xf, %rsp; \ |
|---|
| 20 | | - mov %rax, (%rsp); \ |
|---|
| 21 | | - mov %cr0, %rax; \ |
|---|
| 22 | | - clts; \ |
|---|
| 23 | | - mov %rax, 0x8(%rsp); \ |
|---|
| 24 | | - movaps %xmm0, 0x60(%rsp); \ |
|---|
| 25 | | - movaps %xmm1, 0x50(%rsp); \ |
|---|
| 26 | | - movaps %xmm2, 0x40(%rsp); \ |
|---|
| 27 | | - movaps %xmm3, 0x30(%rsp); \ |
|---|
| 28 | | - movaps %xmm4, 0x20(%rsp); \ |
|---|
| 29 | | - movaps %xmm5, 0x10(%rsp) |
|---|
| 30 | | - |
|---|
| 31 | | -#define RESTORE_XMM \ |
|---|
| 32 | | - movaps 0x60(%rsp), %xmm0; \ |
|---|
| 33 | | - movaps 0x50(%rsp), %xmm1; \ |
|---|
| 34 | | - movaps 0x40(%rsp), %xmm2; \ |
|---|
| 35 | | - movaps 0x30(%rsp), %xmm3; \ |
|---|
| 36 | | - movaps 0x20(%rsp), %xmm4; \ |
|---|
| 37 | | - movaps 0x10(%rsp), %xmm5; \ |
|---|
| 38 | | - mov 0x8(%rsp), %rsi; \ |
|---|
| 39 | | - mov %rsi, %cr0; \ |
|---|
| 40 | | - mov (%rsp), %rsp |
|---|
| 41 | | - |
|---|
| 42 | | -ENTRY(efi_call) |
|---|
| 13 | +SYM_FUNC_START(__efi_call) |
|---|
| 43 | 14 | pushq %rbp |
|---|
| 44 | 15 | movq %rsp, %rbp |
|---|
| 45 | | - SAVE_XMM |
|---|
| 16 | + and $~0xf, %rsp |
|---|
| 46 | 17 | mov 16(%rbp), %rax |
|---|
| 47 | 18 | subq $48, %rsp |
|---|
| 48 | 19 | mov %r9, 32(%rsp) |
|---|
| .. | .. |
|---|
| 50 | 21 | mov %r8, %r9 |
|---|
| 51 | 22 | mov %rcx, %r8 |
|---|
| 52 | 23 | mov %rsi, %rcx |
|---|
| 53 | | - call *%rdi |
|---|
| 54 | | - addq $48, %rsp |
|---|
| 55 | | - RESTORE_XMM |
|---|
| 56 | | - popq %rbp |
|---|
| 57 | | - ret |
|---|
| 58 | | -ENDPROC(efi_call) |
|---|
| 24 | + CALL_NOSPEC rdi |
|---|
| 25 | + leave |
|---|
| 26 | + RET |
|---|
| 27 | +SYM_FUNC_END(__efi_call) |
|---|