aboutsummaryrefslogtreecommitdiff
path: root/secure_fw
diff options
context:
space:
mode:
authorMingyang Sun <mingyang.sun@arm.com>2021-06-01 10:46:26 +0800
committerMingyang Sun <mingyang.sun@arm.com>2021-06-08 15:14:53 +0800
commit8d004f7772630c50c691966257ff1dfcaf79f3f3 (patch)
tree775455715669613bd80b0141cf27756f9495a5e8 /secure_fw
parent61f8fbc280ebb103ac48ecda84dd2ef77852dc69 (diff)
downloadtrusted-firmware-m-8d004f7772630c50c691966257ff1dfcaf79f3f3.tar.gz
SPM: Rename 'static_info' to 'load_info'
Change the static data name to 'load_info' since they are used for loading partition and services. Change-Id: I061c55e570086930a852374207864d0a2fb9c06d Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Diffstat (limited to 'secure_fw')
-rw-r--r--secure_fw/partitions/ns_proxy_partition/load_info_ns_proxy.c16
-rw-r--r--secure_fw/partitions/partition_load_info.template16
-rw-r--r--secure_fw/spm/cmsis_psa/spm_ipc.c30
-rw-r--r--secure_fw/spm/cmsis_psa/static_load.c10
-rw-r--r--secure_fw/spm/include/load/spm_load_api.h2
5 files changed, 37 insertions, 37 deletions
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 fed4832dc..b099dc4a8 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
@@ -32,9 +32,9 @@ REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit);
extern void tfm_nspm_thread_entry(void);
struct partition_tfm_sp_ns_proxy_load_info_t {
- /* common length data */
- struct partition_load_info_t cmn_info;
- /* per-partition variable length data */
+ /* common length load data */
+ struct partition_load_info_t load_info;
+ /* per-partition variable length load data */
uintptr_t stack_addr;
uintptr_t heap_addr;
#if TFM_LVL == 3
@@ -42,10 +42,10 @@ struct partition_tfm_sp_ns_proxy_load_info_t {
#endif
} __attribute__((aligned(4)));
-/* Partition static, deps, service static data. Put to a dedicated section. */
+/* Partition load, deps, service load data. Put to a dedicated section. */
const struct partition_tfm_sp_ns_proxy_load_info_t
- tfm_sp_ns_proxy_static __attribute__((used, section(".partition_info"))) = {
- .cmn_info = {
+ tfm_sp_ns_proxy_load __attribute__((used, section(".part_load"))) = {
+ .load_info = {
.psa_ff_ver = 0x0100 | PARTITION_INFO_MAGIC,
.pid = TFM_SP_NON_SECURE_ID,
.flags = PARTITION_PRI_LOWEST | SPM_PART_FLAG_IPC
@@ -62,8 +62,8 @@ const struct partition_tfm_sp_ns_proxy_load_info_t
.nassets = TFM_SP_NS_PROXY_NASSETS,
#endif
},
- .stack_addr = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base),
- .heap_addr = 0,
+ .stack_addr = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base),
+ .heap_addr = 0,
#if TFM_LVL == 3
.assets = {
{
diff --git a/secure_fw/partitions/partition_load_info.template b/secure_fw/partitions/partition_load_info.template
index 90529fb2a..5bbb42b91 100644
--- a/secure_fw/partitions/partition_load_info.template
+++ b/secure_fw/partitions/partition_load_info.template
@@ -52,11 +52,11 @@ extern uint8_t {{manifest.name|lower}}_stack[];
/* Entrypoint function declaration */
extern void {{manifest.entry_point}}(void);
-/* partition static info type definition */
+/* partition load info type definition */
struct partition_{{manifest.name|lower}}_load_info_t {
- /* common length data */
- struct partition_load_info_t cmn_info;
- /* per-partition variable length data */
+ /* common length load data */
+ struct partition_load_info_t load_info;
+ /* per-partition variable length load data */
uintptr_t stack_addr;
uintptr_t heap_addr;
{% if manifest.dependencies %}
@@ -74,10 +74,10 @@ struct partition_{{manifest.name|lower}}_load_info_t {
#endif
} __attribute__((aligned(4)));
-/* Partition static, deps, service static data. Put to a dedicated section. */
-const struct partition_{{manifest.name|lower}}_load_info_t {{manifest.name|lower}}_static
- __attribute__((used, section(".partition_info"))) = {
- .cmn_info = {
+/* Partition load, deps, service load data. Put to a dedicated section. */
+const struct partition_{{manifest.name|lower}}_load_info_t {{manifest.name|lower}}_load
+ __attribute__((used, section(".part_load"))) = {
+ .load_info = {
{% if manifest.psa_framework_version == 1.0 %}
.psa_ff_ver = 0x0100 | PARTITION_INFO_MAGIC,
{% elif manifest.psa_framework_version == 1.1 %}
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index b657d4e7d..3d2623c40 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -640,7 +640,7 @@ uint32_t tfm_spm_init(void)
struct partition_t *partition;
struct tfm_core_thread_t *pth, *p_ns_entry_thread = NULL;
const struct platform_data_t *platform_data_p;
- const struct partition_load_info_t *p_cmninf;
+ const struct partition_load_info_t *p_ldinf;
struct asset_desc_t *p_asset_load;
#ifdef TFM_FIH_PROFILE_ON
fih_int fih_rc = FIH_FAILURE;
@@ -661,11 +661,11 @@ uint32_t tfm_spm_init(void)
stateless_services_ref_tbl,
sizeof(stateless_services_ref_tbl));
- p_cmninf = partition->p_ldinf;
+ p_ldinf = partition->p_ldinf;
/* Init mmio assets */
- if (p_cmninf->nassets > 0) {
- if (tfm_spm_partition_get_privileged_mode(p_cmninf->flags) ==
+ if (p_ldinf->nassets > 0) {
+ if (tfm_spm_partition_get_privileged_mode(p_ldinf->flags) ==
TFM_PARTITION_PRIVILEGED_MODE) {
privileged = true;
} else {
@@ -673,8 +673,8 @@ uint32_t tfm_spm_init(void)
}
}
- p_asset_load = (struct asset_desc_t *)LOAD_INFO_ASSET(p_cmninf);
- for (i = 0; i < p_cmninf->nassets; i++) {
+ p_asset_load = (struct asset_desc_t *)LOAD_INFO_ASSET(p_ldinf);
+ for (i = 0; i < p_ldinf->nassets; i++) {
/* Skip the memory-based asset */
if (!(p_asset_load[i].attr & ASSET_DEV_REF_BIT)) {
continue;
@@ -717,13 +717,13 @@ uint32_t tfm_spm_init(void)
* in code generation time.
*/
for (j = 0; j < tfm_core_irq_signals_count; ++j) {
- if (tfm_core_irq_signals[j].partition_id == p_cmninf->pid) {
+ if (tfm_core_irq_signals[j].partition_id == p_ldinf->pid) {
partition->signals_allowed |=
tfm_core_irq_signals[j].signal_value;
- if ((p_cmninf->psa_ff_ver & PARTITION_INFO_VERSION_MASK)
+ if ((p_ldinf->psa_ff_ver & PARTITION_INFO_VERSION_MASK)
== 0x0100) {
tfm_spm_hal_enable_irq(tfm_core_irq_signals[j].irq_line);
- } else if ((p_cmninf->psa_ff_ver & PARTITION_INFO_VERSION_MASK)
+ } else if ((p_ldinf->psa_ff_ver & PARTITION_INFO_VERSION_MASK)
== 0x0101) {
tfm_spm_hal_disable_irq(tfm_core_irq_signals[j].irq_line);
}
@@ -738,17 +738,17 @@ uint32_t tfm_spm_init(void)
tfm_core_panic();
}
- /* Extendable partition static info is right after p_cmninf. */
+ /* Extendable partition load info is right after p_ldinf. */
tfm_core_thrd_init(
pth,
- POSITION_TO_ENTRY(p_cmninf->entry, tfm_core_thrd_entry_t),
+ POSITION_TO_ENTRY(p_ldinf->entry, tfm_core_thrd_entry_t),
NULL,
- LOAD_ALLOCED_STACK_ADDR(p_cmninf) + p_cmninf->stack_size,
- LOAD_ALLOCED_STACK_ADDR(p_cmninf));
+ LOAD_ALLOCED_STACK_ADDR(p_ldinf) + p_ldinf->stack_size,
+ LOAD_ALLOCED_STACK_ADDR(p_ldinf));
- pth->prior = TO_THREAD_PRIORITY(PARTITION_PRIORITY(p_cmninf->flags));
+ pth->prior = TO_THREAD_PRIORITY(PARTITION_PRIORITY(p_ldinf->flags));
- if (p_cmninf->pid == TFM_SP_NON_SECURE_ID) {
+ if (p_ldinf->pid == TFM_SP_NON_SECURE_ID) {
p_ns_entry_thread = pth;
pth->param = (void *)tfm_spm_hal_get_ns_entry_point();
}
diff --git a/secure_fw/spm/cmsis_psa/static_load.c b/secure_fw/spm/cmsis_psa/static_load.c
index 89726031b..e47f4fe02 100644
--- a/secure_fw/spm/cmsis_psa/static_load.c
+++ b/secure_fw/spm/cmsis_psa/static_load.c
@@ -19,12 +19,12 @@
#include "secure_fw/partitions/tfm_service_list.inc"
#include "tfm_spm_db_ipc.inc"
-/* Partition static data region */
-REGION_DECLARE(Image$$, TFM_SP_STATIC_LIST, $$RO$$Base);
-REGION_DECLARE(Image$$, TFM_SP_STATIC_LIST, $$RO$$Limit);
+/* Partition load data region */
+REGION_DECLARE(Image$$, TFM_SP_LOAD_LIST, $$RO$$Base);
+REGION_DECLARE(Image$$, TFM_SP_LOAD_LIST, $$RO$$Limit);
-static uintptr_t ldinf_sa = PART_REGION_ADDR(TFM_SP_STATIC_LIST, $$RO$$Base);
-static uintptr_t ldinf_ea = PART_REGION_ADDR(TFM_SP_STATIC_LIST, $$RO$$Limit);
+static uintptr_t ldinf_sa = PART_REGION_ADDR(TFM_SP_LOAD_LIST, $$RO$$Base);
+static uintptr_t ldinf_ea = PART_REGION_ADDR(TFM_SP_LOAD_LIST, $$RO$$Limit);
/* Allocate runtime space for partition from the pool. Static allocation. */
static struct partition_t *tfm_allocate_partition_assuredly(void)
diff --git a/secure_fw/spm/include/load/spm_load_api.h b/secure_fw/spm/include/load/spm_load_api.h
index d698fd73f..c9fde2d1c 100644
--- a/secure_fw/spm/include/load/spm_load_api.h
+++ b/secure_fw/spm/include/load/spm_load_api.h
@@ -14,7 +14,7 @@
#include "service_defs.h"
#include "spm_ipc.h"
-/* Length of extendable variables in partition static type */
+/* Length of extendable variables in partition load type */
#define LOAD_INFO_EXT_LENGTH 2
/* Argument "pldinf" must be a "struct partition_load_info_t *". */
#define LOAD_INFSZ_BYTES(pldinf) \