Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/x86/platform/efi/efi_stub_64.S
52395 views
1
/* SPDX-License-Identifier: GPL-2.0 */
2
/*
3
* Function calling ABI conversion from Linux to EFI for x86_64
4
*
5
* Copyright (C) 2007 Intel Corp
6
* Bibo Mao <[email protected]>
7
* Huang Ying <[email protected]>
8
*/
9
10
#include <linux/linkage.h>
11
#include <asm/nospec-branch.h>
12
13
SYM_FUNC_START(__efi_call)
14
/*
15
* The EFI code doesn't have any CFI, annotate away the CFI violation.
16
*/
17
ANNOTATE_NOCFI_SYM
18
pushq %rbp
19
movq %rsp, %rbp
20
and $~0xf, %rsp
21
mov 16(%rbp), %rax
22
subq $48, %rsp
23
mov %r9, 32(%rsp)
24
mov %rax, 40(%rsp)
25
mov %r8, %r9
26
mov %rcx, %r8
27
mov %rsi, %rcx
28
CALL_NOSPEC rdi
29
leave
30
RET
31
SYM_FUNC_END(__efi_call)
32
33