blob: 8ee61e90f3daa080f88fed28ec0af0bd9d15ce79 [file] [log] [blame]
Marc Bonnici8e1a7552021-12-01 17:57:04 +00001/*
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>
Marc Bonnici1c33cc32021-11-29 17:57:03 +000015#include <services/spm_core_manifest.h>
Marc Bonnici8e1a7552021-12-01 17:57:04 +000016
17int spmc_setup(void);
Marc Bonnici1c33cc32021-11-29 17:57:03 +000018void spmc_populate_attrs(spmc_manifest_attribute_t *spmc_attrs);
Marc Bonnici8e1a7552021-12-01 17:57:04 +000019void *spmc_get_config_addr(void);
20
21void spmc_set_config_addr(uintptr_t soc_fw_config);
22
23uint64_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
33static 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 */