rt-thread-official/libcpu/aarch64/common/smccc.S

33 lines
578 B
ArmAsm
Raw Normal View History

2022-01-07 13:49:06 +08:00
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
2022-01-07 13:49:06 +08:00
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
/**
* SMCCC v0.2
* ARM DEN0028E chapter 2.6
2022-01-07 13:49:06 +08:00
*/
.macro SMCCC instr
stp x29, x30, [sp, #-16]!
mov x29, sp
\instr #0
// store in arm_smccc_res
ldr x4, [sp, #16]
stp x0, x1, [x4, #0]
stp x2, x3, [x4, #16]
1:
ldp x29, x30, [sp], #16
2022-01-07 13:49:06 +08:00
ret
.endm
2022-01-07 13:49:06 +08:00
.global arm_smccc_smc
arm_smccc_smc:
SMCCC smc
2022-01-07 13:49:06 +08:00
.global arm_smccc_hvc
arm_smccc_hvc:
SMCCC hvc