Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 1 | /* |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 2 | * Copyright (c) 2017-2019, Arm Limited. All rights reserved. |
Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 3 | * |
| 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 Balint | d306ab1 | 2018-05-18 16:58:18 +0200 | [diff] [blame] | 20 | #define TFM_INTERNAL_PARTITIONS (2) |
| 21 | |
Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 22 | /* 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 Peng | 33d0394 | 2021-06-08 11:28:41 +0800 | [diff] [blame] | 27 | #define TFM_SP_IDLE_ID (1) |
Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 28 | /* 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 Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 33 | #include "psa_manifest/pid.h" |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 34 | #include "psa/service.h" |
Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 35 | |
Miklos Balint | d306ab1 | 2018-05-18 16:58:18 +0200 | [diff] [blame] | 36 | /* 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-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 41 | |
Mingyang Sun | 37f6ced | 2020-07-08 16:30:28 +0800 | [diff] [blame] | 42 | typedef void(*sp_entry_point)(void); |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 43 | typedef psa_flih_result_t (*psa_flih_func)(void); |
Mingyang Sun | 37f6ced | 2020-07-08 16:30:28 +0800 | [diff] [blame] | 44 | |
Mate Toth-Pal | 52674ab | 2018-02-26 09:47:56 +0100 | [diff] [blame] | 45 | #endif /* __SPM_PARTITION_DEFS_H__ */ |