blob: 252f99c05ba56ab92e6510d4e2dd52d7af1a3911 [file] [log] [blame]
Mate Toth-Pal52674ab2018-02-26 09:47:56 +01001/*
Edison Aib2134e62019-10-11 18:24:47 +08002 * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
Mate Toth-Pal52674ab2018-02-26 09:47:56 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __SPM_PARTITION_DEFS_H__
9#define __SPM_PARTITION_DEFS_H__
10
11/* FixMe: allocations to be settled.
12 * 8 bits reserved by TFM for secure partition Id in this prototype
13 */
14#define TFM_SP_BASE 256
15
16/* A reserved partition ID that is used for uninitialised data */
17#define INVALID_PARTITION_ID (~0U)
18
19/* ***** partition ID-s internal to the TFM ***** */
Miklos Balintd306ab12018-05-18 16:58:18 +020020#define TFM_INTERNAL_PARTITIONS (2)
21
Mate Toth-Pal52674ab2018-02-26 09:47:56 +010022/* From the SPM point of view the non secure processing environment is handled
23 * as a special secure partition. This simplifies the context switch
24 * operations.
25 */
26#define TFM_SP_NON_SECURE_ID (0)
Kevin Peng33d03942021-06-08 11:28:41 +080027#define TFM_SP_IDLE_ID (1)
Mate Toth-Pal52674ab2018-02-26 09:47:56 +010028/* A dummy partition for TFM_SP_CORE is created to handle secure partition
29 * calls done directly from the core, before NS execution started.
30 */
31#define TFM_SP_CORE_ID (1)
32
Edison Aib2134e62019-10-11 18:24:47 +080033#include "psa_manifest/pid.h"
Kevin Pengeca45b92021-02-09 14:46:50 +080034#include "psa/service.h"
Mate Toth-Pal52674ab2018-02-26 09:47:56 +010035
Miklos Balintd306ab12018-05-18 16:58:18 +020036/* This limit is only used to define the size of the database reserved for
37 * partitions. There's no requirement that it match the number of partitions
38 * that get registered in a specific build
39 */
40#define SPM_MAX_PARTITIONS (TFM_MAX_USER_PARTITIONS + TFM_INTERNAL_PARTITIONS)
Mate Toth-Pal52674ab2018-02-26 09:47:56 +010041
Mingyang Sun37f6ced2020-07-08 16:30:28 +080042typedef void(*sp_entry_point)(void);
Kevin Pengeca45b92021-02-09 14:46:50 +080043typedef psa_flih_result_t (*psa_flih_func)(void);
Mingyang Sun37f6ced2020-07-08 16:30:28 +080044
Mate Toth-Pal52674ab2018-02-26 09:47:56 +010045#endif /* __SPM_PARTITION_DEFS_H__ */