spmc_svc.h 806 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef SPMC_SVC_H
  7. #define SPMC_SVC_H
  8. #ifndef __ASSEMBLER__
  9. #include <stdint.h>
  10. #include <lib/utils_def.h>
  11. #include <services/ffa_svc.h>
  12. #include <services/spm_core_manifest.h>
  13. int spmc_setup(void);
  14. void spmc_populate_attrs(spmc_manifest_attribute_t *spmc_attrs);
  15. void *spmc_get_config_addr(void);
  16. void spmc_set_config_addr(uintptr_t soc_fw_config);
  17. uint64_t spmc_smc_handler(uint32_t smc_fid,
  18. bool secure_origin,
  19. uint64_t x1,
  20. uint64_t x2,
  21. uint64_t x3,
  22. uint64_t x4,
  23. void *cookie,
  24. void *handle,
  25. uint64_t flags);
  26. static inline bool is_spmc_at_el3(void)
  27. {
  28. return SPMC_AT_EL3 == 1;
  29. }
  30. #endif /* __ASSEMBLER__ */
  31. #endif /* SPMC_SVC_H */