blob: 77d2879814ac08cb6eaa1a7fa7053eefed96cfd2 [file] [log] [blame]
Miklos Balint386b8b52017-11-29 13:12:32 +00001/*
2 * Copyright (c) 2017, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8/* The file is meant to be included twice */
9#ifndef __SPM_DECLARE_USER_SERVICES__
10#define __SPM_DECLARE_USER_SERVICES__
11
12#include "platform_retarget.h"
13#include "target_cfg.h"
14#include "service_defs.h"
15
16SERVICE_DECLARE(TFM_SEC_FUNC_STORAGE)
17#ifdef CORE_TEST_SERVICES
18SERVICE_DECLARE(TFM_SEC_FUNC_CORE_TEST)
19SERVICE_DECLARE(TFM_SEC_FUNC_CORE_TEST_2)
20#endif /* CORE_TEST_SERVICES */
21
22#elif !defined(__SPM_ADD_USER_SERVICES__) /*__SPM_DECLARE_USER_SERVICES__*/
23#define __SPM_ADD_USER_SERVICES__
24
25/* Order must be same as id!!! */
26SERVICE_ADD(TFM_SEC_FUNC_STORAGE)
27#ifdef CORE_TEST_SERVICES
28SERVICE_ADD(TFM_SEC_FUNC_CORE_TEST)
29SERVICE_ADD(TFM_SEC_FUNC_CORE_TEST_2)
30#endif /* CORE_TEST_SERVICES */
31
32SERVICE_ADD_INIT_FUNC(TFM_SEC_FUNC_STORAGE, sst_am_prepare)
33
34#ifdef CORE_TEST_SERVICES
35SERVICE_ADD_INIT_FUNC(TFM_SEC_FUNC_CORE_TEST, core_test_init)
36SERVICE_ADD_PERIPHERAL(TFM_SEC_FUNC_CORE_TEST,
37 MPS2_IO_FPGAIO_BASE_S, MPS2_IO_FPGAIO_BASE_S + 0xFFF,
38 PPC_SP_APB_PPC_EXP2, CMSDK_FPGA_IO_PPC_POS)
39SERVICE_ADD_INIT_FUNC(TFM_SEC_FUNC_CORE_TEST_2, core_test_2_init)
40#endif /* CORE_TEST_SERVICES */
41
42#else /* __SPM_ADD_USER_SERVICES__ */
43#error "unexpected inclusion of the file"
44#endif /* __SPM_ADD_USER_SERVICES__ */