blob: 9dbe045894c5987c7ac4cd948b10d0c974371342 [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>
15
16int spmc_setup(void);
17void *spmc_get_config_addr(void);
18
19void spmc_set_config_addr(uintptr_t soc_fw_config);
20
21uint64_t spmc_smc_handler(uint32_t smc_fid,
22 bool secure_origin,
23 uint64_t x1,
24 uint64_t x2,
25 uint64_t x3,
26 uint64_t x4,
27 void *cookie,
28 void *handle,
29 uint64_t flags);
30
31static inline bool is_spmc_at_el3(void)
32{
33 return SPMC_AT_EL3 == 1;
34}
35
36#endif /* __ASSEMBLER__ */
37
38#endif /* SPMC_SVC_H */