1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
/***** WARNING: This file SHOULD BE CHANGED according to storage template *****/
#include <stdint.h>
#include <stddef.h>
#include "region.h"
#include "region_defs.h"
#include "spm_partition_defs.h"
#include "load/partition_static_load.h"
#include "load/partition_defs.h"
#include "load/service_defs.h"
#include "psa_manifest/pid.h"
#include "psa_manifest/sid.h"
#define TFM_SP_NS_PROXY_NDEPS (0)
#define TFM_SP_NS_PROXY_NSERVS (0)
/* Memory region declaration */
REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Base);
REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit);
/* Entrypoint function declaration */
extern void tfm_nspm_thread_entry(void);
struct partition_tfm_sp_ns_proxy_static_info_t {
/* common length data */
struct partition_static_info_t cmn_info;
/* per-partition variable length data */
uintptr_t stack_pos;
uintptr_t heap_pos;
} __attribute__((aligned(4)));
/* Partition static, deps, service static data. Put to a dedicated section. */
const struct partition_tfm_sp_ns_proxy_static_info_t
tfm_sp_ns_proxy_static __attribute__((used, section(".partition_info"))) = {
.cmn_info = {
.psa_ff_ver = 0x0100 | PARTITION_INFO_MAGIC,
.pid = TFM_SP_NON_SECURE_ID,
.flags = PARTITION_PRI_LOWEST | SPM_PART_FLAG_IPC
#if TFM_MULTI_CORE_TOPOLOGY
| SPM_PART_FLAG_PSA_ROT
#endif
,
.entry = ENTRY_TO_POSITION(tfm_nspm_thread_entry),
.stack_size = S_PSP_STACK_SIZE,
.heap_size = 0,
.ndeps = TFM_SP_NS_PROXY_NDEPS,
.nservices = TFM_SP_NS_PROXY_NSERVS,
.plat_cookie = 0,
#if TFM_LVL == 3
.mems = {
.start = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base),
.limit = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit),
},
#endif
},
.stack_pos = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base),
.heap_pos = 0,
};
|