smccc.S 667 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-09-09 GuEe-GUI The first version
  9. */
  10. /*
  11. * smc calling convention call
  12. */
  13. .macro SMCCC_CALL INS
  14. stp x8, x29, [sp,#-16]! /* push the frame pointer (x29) for the purposes of AAPCS64 compatibility */
  15. \INS #0
  16. ldp x8, x29, [sp], #16
  17. stp x0, x1, [x8]
  18. stp x2, x3, [x8, #16]
  19. str x6, [x8, #32]
  20. ret
  21. .endm
  22. /*
  23. * smc call
  24. */
  25. .globl arm_smc_call
  26. arm_smc_call:
  27. SMCCC_CALL smc
  28. /*
  29. * hvc call
  30. */
  31. .globl arm_hvc_call
  32. arm_hvc_call:
  33. SMCCC_CALL hvc