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 <bibo.mao@intel.com>
7 *	Huang Ying <ying.huang@intel.com>
8 */
9
10#include <linux/linkage.h>
11#include <asm/nospec-branch.h>
12
13SYM_FUNC_START(__efi_call)
14	pushq %rbp
15	movq %rsp, %rbp
16	and $~0xf, %rsp
17	mov 16(%rbp), %rax
18	subq $48, %rsp
19	mov %r9, 32(%rsp)
20	mov %rax, 40(%rsp)
21	mov %r8, %r9
22	mov %rcx, %r8
23	mov %rsi, %rcx
24	CALL_NOSPEC %rdi
25	leave
26	ret
27SYM_FUNC_END(__efi_call)
28