teesmc_opteed_macros.h 632 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2014-2023, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef TEESMC_OPTEED_MACROS_H
  7. #define TEESMC_OPTEED_MACROS_H
  8. #include <common/runtime_svc.h>
  9. #define TEESMC_OPTEED_RV(func_num) \
  10. ((SMC_TYPE_FAST << FUNCID_TYPE_SHIFT) | \
  11. ((SMC_32) << FUNCID_CC_SHIFT) | \
  12. (62 << FUNCID_OEN_SHIFT) | \
  13. ((func_num) & FUNCID_NUM_MASK))
  14. #define NSSMC_OPTEED_CALL(func_num) \
  15. ((SMC_TYPE_FAST << FUNCID_TYPE_SHIFT) | \
  16. ((SMC_32) << FUNCID_CC_SHIFT) | \
  17. (63 << FUNCID_OEN_SHIFT) | \
  18. ((func_num) & FUNCID_NUM_MASK))
  19. #endif /* TEESMC_OPTEED_MACROS_H */