smccc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2006-2019, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. #ifndef __SMCCC_H__
  10. #define __SMCCC_H__
  11. /**
  12. * result from SMC/HVC call
  13. * ARM DEN0028E chapter 5,
  14. */
  15. typedef struct arm_smccc_res_t
  16. {
  17. unsigned long a0;
  18. // reserved for ARM SMC and HVC Fast Call services
  19. unsigned long a1;
  20. unsigned long a2;
  21. unsigned long a3;
  22. } arm_smccc_res_t;
  23. /**
  24. * quirk is a structure contains vendor specified information,
  25. * it just a placeholder currently
  26. */
  27. struct arm_smccc_quirk_t
  28. {
  29. };
  30. /* smccc version 0.2 */
  31. void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
  32. unsigned long a3, unsigned long a4, unsigned long a5,
  33. unsigned long a6, unsigned long a7, struct arm_smccc_res_t *res,
  34. struct arm_smccc_quirk_t *quirk);
  35. void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
  36. unsigned long a3, unsigned long a4, unsigned long a5,
  37. unsigned long a6, unsigned long a7, struct arm_smccc_res_t *res,
  38. struct arm_smccc_quirk_t *quirk);
  39. #endif /* __SMCCC_H__ */