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