2 * Copyright (C) 2018 Linaro Ltd <ard.biesheuvel@linaro.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #include <linux/linkage.h>
11 ENTRY(__efi_rt_asm_wrapper)
12 stp x29, x30, [sp, #-32]!
16 * Register x18 is designated as the 'platform' register by the AAPCS,
17 * which means firmware running at the same exception level as the OS
18 * (such as UEFI) should never touch it.
20 stp x1, x18, [sp, #16]
23 * We are lucky enough that no EFI runtime services take more than
24 * 5 arguments, so all are passed in registers rather than via the
37 ldp x29, x30, [sp], #32
40 0: b efi_handle_corrupted_x18 // tail call
41 ENDPROC(__efi_rt_asm_wrapper)