trf.h 640 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2021-2024, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef TRF_H
  7. #define TRF_H
  8. #include <context.h>
  9. #if ENABLE_TRF_FOR_NS
  10. #if __aarch64__
  11. void trf_enable(cpu_context_t *ctx);
  12. void trf_init_el2_unused(void);
  13. #else /* !__aarch64 */
  14. void trf_init_el3(void);
  15. #endif /* __aarch64__ */
  16. #else /* ENABLE_TRF_FOR_NS=0 */
  17. #if __aarch64__
  18. static inline void trf_enable(cpu_context_t *ctx)
  19. {
  20. }
  21. static inline void trf_init_el2_unused(void)
  22. {
  23. }
  24. #else /* !__aarch64 */
  25. static inline void trf_init_el3(void)
  26. {
  27. }
  28. #endif /* __aarch64__*/
  29. #endif /* ENABLE_TRF_FOR_NS */
  30. #endif /* TRF_H */