1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2015, Linaro Limited
5 #include <linux/linkage.h>
6 #include <linux/arm-smccc.h>
7 #include <generated/asm-offsets.h>
9 #ifdef CONFIG_EFI_LOADER
10 .section .text.efi_runtime
17 stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
18 stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
20 cbz x4, 1f /* no quirk structure */
21 ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
22 cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
24 str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
30 * void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
31 * unsigned long a3, unsigned long a4, unsigned long a5,
32 * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
33 * struct arm_smccc_quirk *quirk)
35 ENTRY(__arm_smccc_smc)
37 ENDPROC(__arm_smccc_smc)
40 * void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
41 * unsigned long a3, unsigned long a4, unsigned long a5,
42 * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
43 * struct arm_smccc_quirk *quirk)
45 ENTRY(__arm_smccc_hvc)
47 ENDPROC(__arm_smccc_hvc)