diff options
| author | Wayne Lin <[email protected]> | 2022-01-10 12:36:11 +0800 |
|---|---|---|
| committer | Wayne Lin <[email protected]> | 2022-01-10 12:36:11 +0800 |
| commit | 715eecd3eb6cfbbc95aba4fdf932db2e1a7698fb (patch) | |
| tree | 111003eb53eaa4a789729792a622d2abfd602031 /libcpu/aarch64/common/smccc.S | |
| parent | 6d2a7d00db2808f26b96efaebfa3aa18b6fd47b8 (diff) | |
| parent | 5206f6504018d1e1978e1c547f6a5b782d505be5 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton
# Conflicts:
# bsp/nuvoton/nk-980iot/.config
# bsp/nuvoton/nk-n9h30/.config
# bsp/nuvoton/nk-rtu980/.config
# bsp/nuvoton/numaker-iot-m487/.config
# bsp/nuvoton/numaker-m2354/.config
# bsp/nuvoton/numaker-pfm-m487/.config
Diffstat (limited to 'libcpu/aarch64/common/smccc.S')
| -rw-r--r-- | libcpu/aarch64/common/smccc.S | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libcpu/aarch64/common/smccc.S b/libcpu/aarch64/common/smccc.S new file mode 100644 index 0000000000..501d210c16 --- /dev/null +++ b/libcpu/aarch64/common/smccc.S @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-09-09 GuEe-GUI The first version + */ + +/* + * smc calling convention call + */ +.macro SMCCC_CALL INS + stp x8, x29, [sp,#-16]! /* push the frame pointer (x29) for the purposes of AAPCS64 compatibility */ + \INS #0 + ldp x8, x29, [sp], #16 + + stp x0, x1, [x8] + stp x2, x3, [x8, #16] + str x6, [x8, #32] + ret +.endm + +/* + * smc call + */ +.globl arm_smc_call +arm_smc_call: + SMCCC_CALL smc + +/* + * hvc call + */ +.globl arm_hvc_call +arm_hvc_call: + SMCCC_CALL hvc |
