aboutsummaryrefslogtreecommitdiff
path: root/secure_fw
diff options
context:
space:
mode:
authorMingyang Sun <mingyang.sun@arm.com>2021-07-08 15:18:14 +0800
committerKen Liu <ken.liu@arm.com>2021-08-05 03:28:50 +0200
commitae77416a2a8dfff2eba42d84a38f8a405a84eb51 (patch)
tree140078dc38a3df16493e3037e1712c72efc0ce1b /secure_fw
parentd9566f8349b85e612cfd133463ce73d94c795ce0 (diff)
downloadtrusted-firmware-m-ae77416a2a8dfff2eba42d84a38f8a405a84eb51.tar.gz
SPM: Remove IPC model reference of "spm_partition_defs.h"
This header file contains mostly library model related definitions. Move or copy the IPC related definitions to IPC header files, leave it for library use. Change-Id: I3621c43a941481b24a77fc5a240572f25772d86e Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Diffstat (limited to 'secure_fw')
-rw-r--r--secure_fw/partitions/idle_partition/load_info_idle_sp.c1
-rw-r--r--secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c1
-rw-r--r--secure_fw/spm/cmsis_psa/spm_ipc.c1
-rw-r--r--secure_fw/spm/cmsis_psa/spm_ipc.h3
-rw-r--r--secure_fw/spm/ffm/tfm_boot_data.c2
-rw-r--r--secure_fw/spm/include/load/partition_defs.h5
-rw-r--r--secure_fw/spm/include/spm_partition_defs.h6
7 files changed, 10 insertions, 9 deletions
diff --git a/secure_fw/partitions/idle_partition/load_info_idle_sp.c b/secure_fw/partitions/idle_partition/load_info_idle_sp.c
index 0f9dd6f91b..647d45e876 100644
--- a/secure_fw/partitions/idle_partition/load_info_idle_sp.c
+++ b/secure_fw/partitions/idle_partition/load_info_idle_sp.c
@@ -8,7 +8,6 @@
#include <stdint.h>
#include <stddef.h>
#include "spm_ipc.h"
-#include "spm_partition_defs.h"
#include "load/partition_defs.h"
#include "load/service_defs.h"
#include "load/asset_defs.h"
diff --git a/secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c b/secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c
index 85e6387a5a..eabb34a371 100644
--- a/secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c
+++ b/secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c
@@ -12,7 +12,6 @@
#include "region.h"
#include "region_defs.h"
#include "spm_ipc.h"
-#include "spm_partition_defs.h"
#include "load/partition_defs.h"
#include "load/service_defs.h"
#include "load/asset_defs.h"
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 2db3dce6b1..5b6065c57b 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -27,7 +27,6 @@
#include "tfm_core_trustzone.h"
#include "lists.h"
#include "tfm_pools.h"
-#include "spm_partition_defs.h"
#include "psa_manifest/pid.h"
#include "tfm/tfm_spm_services.h"
#include "load/partition_defs.h"
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.h b/secure_fw/spm/cmsis_psa/spm_ipc.h
index 43b836b883..7d86cb9365 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.h
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.h
@@ -9,7 +9,6 @@
#define __SPM_IPC_H__
#include <stdint.h>
-#include "spm_partition_defs.h"
#include "tfm_arch.h"
#include "lists.h"
#include "tfm_wait.h"
@@ -56,6 +55,8 @@
#define TFM_MSG_MAGIC 0x15154343
+typedef psa_flih_result_t (*psa_flih_func)(void);
+
/* Message struct to collect parameter from client */
struct tfm_msg_body_t {
int32_t magic;
diff --git a/secure_fw/spm/ffm/tfm_boot_data.c b/secure_fw/spm/ffm/tfm_boot_data.c
index 39cd00ad4c..03854b822b 100644
--- a/secure_fw/spm/ffm/tfm_boot_data.c
+++ b/secure_fw/spm/ffm/tfm_boot_data.c
@@ -12,7 +12,7 @@
#include "tfm_memory_utils.h"
#include "tfm_api.h"
#include "tfm_core_utils.h"
-#include "spm_partition_defs.h"
+#include "psa_manifest/pid.h"
#ifdef TFM_PSA_API
#include "internal_errors.h"
#include "utilities.h"
diff --git a/secure_fw/spm/include/load/partition_defs.h b/secure_fw/spm/include/load/partition_defs.h
index 9eb3ea978b..449c9db047 100644
--- a/secure_fw/spm/include/load/partition_defs.h
+++ b/secure_fw/spm/include/load/partition_defs.h
@@ -11,6 +11,11 @@
#include <stddef.h>
#include <stdint.h>
+/* TF-M internal partition ID */
+#define TFM_SP_NON_SECURE_ID (0)
+#define TFM_SP_IDLE_ID (1)
+#define INVALID_PARTITION_ID (~0U)
+
/* Encode a magic number into version for validating partition info */
#define PARTITION_INFO_VERSION_MASK (0x0000FFFF)
#define PARTITION_INFO_MAGIC_MASK (0xFFFF0000)
diff --git a/secure_fw/spm/include/spm_partition_defs.h b/secure_fw/spm/include/spm_partition_defs.h
index 252f99c05b..54240f1931 100644
--- a/secure_fw/spm/include/spm_partition_defs.h
+++ b/secure_fw/spm/include/spm_partition_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -24,14 +24,13 @@
* operations.
*/
#define TFM_SP_NON_SECURE_ID (0)
-#define TFM_SP_IDLE_ID (1)
+
/* A dummy partition for TFM_SP_CORE is created to handle secure partition
* calls done directly from the core, before NS execution started.
*/
#define TFM_SP_CORE_ID (1)
#include "psa_manifest/pid.h"
-#include "psa/service.h"
/* This limit is only used to define the size of the database reserved for
* partitions. There's no requirement that it match the number of partitions
@@ -40,6 +39,5 @@
#define SPM_MAX_PARTITIONS (TFM_MAX_USER_PARTITIONS + TFM_INTERNAL_PARTITIONS)
typedef void(*sp_entry_point)(void);
-typedef psa_flih_result_t (*psa_flih_func)(void);
#endif /* __SPM_PARTITION_DEFS_H__ */