xref: /openbmc/linux/arch/x86/platform/efi/efi_stub_64.S (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1b2441318SGreg Kroah-Hartman/* SPDX-License-Identifier: GPL-2.0 */
2b17ed480SThomas Gleixner/*
3b17ed480SThomas Gleixner * Function calling ABI conversion from Linux to EFI for x86_64
4b17ed480SThomas Gleixner *
5b17ed480SThomas Gleixner * Copyright (C) 2007 Intel Corp
6b17ed480SThomas Gleixner *	Bibo Mao <bibo.mao@intel.com>
7b17ed480SThomas Gleixner *	Huang Ying <ying.huang@intel.com>
8b17ed480SThomas Gleixner */
9b17ed480SThomas Gleixner
10b17ed480SThomas Gleixner#include <linux/linkage.h>
11e5f930feSArd Biesheuvel#include <asm/nospec-branch.h>
12b17ed480SThomas Gleixner
1314b864f4SArvind SankarSYM_FUNC_START(__efi_call)
14683ad809SLinus Torvalds	pushq %rbp
15683ad809SLinus Torvalds	movq %rsp, %rbp
16e5f930feSArd Biesheuvel	and $~0xf, %rsp
17683ad809SLinus Torvalds	mov 16(%rbp), %rax
18b17ed480SThomas Gleixner	subq $48, %rsp
19b17ed480SThomas Gleixner	mov %r9, 32(%rsp)
20b17ed480SThomas Gleixner	mov %rax, 40(%rsp)
21b17ed480SThomas Gleixner	mov %r8, %r9
22b17ed480SThomas Gleixner	mov %rcx, %r8
23b17ed480SThomas Gleixner	mov %rsi, %rcx
2434fdce69SPeter Zijlstra	CALL_NOSPEC rdi
25e5f930feSArd Biesheuvel	leave
26*f94909ceSPeter Zijlstra	RET
2714b864f4SArvind SankarSYM_FUNC_END(__efi_call)
28