You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/porting/psa/spm.md
+34-29Lines changed: 34 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -6,37 +6,24 @@ For more information about SPM, please refer to [the SPM overview page](/docs/de
6
6
7
7
**This page gives guidelines for silicon partners wishing to have Secure Partition Manager capabilities**
8
8
9
-
### Memory layout
9
+
### New target configuration
10
10
11
-
Typically, PSA platforms share the same RAM and flash between secure and nonsecure cores. To provide PSA isolation level 1 or higher, you need to partition both RAM and flash in a way the following image describes:
To achieve RAM and flash partitioning, you must add start and size values to a target configuration in `targets.json`. You can do this with the following steps:
11
+
When adding a new target, a new root target node should be added to mbed-os/targets/targets.json file.
12
+
For PSA support, specific PSA related fields should be defined for this target:
29
13
30
14
1. Secure target must inherit from `SPE_Target` meta-target.
31
15
2. Nonsecure target must inherit from `NSPE_Target`.
32
-
3. Both targets must override the default configuration by specifying flash RAM and shared RAM regions.
16
+
3. Only for multicore architectures:
17
+
- Both targets must add "SPM_MAILBOX" component. Mailbox mechanism is explained in [Mailbox section](#mailbox)
18
+
- Both targets must override the default configuration by specifying flash RAM and shared RAM regions. This is explained in more details in [Memory layout section](#memory-layout)
19
+
- Secure target must declare which is its corresponding nonsecure target using the "deliver_to_target" field.
20
+
21
+
These is demonstrated in the example below:
33
22
34
23
```json
35
24
"FUTURE_SEQUANA_M0_PSA": {
36
-
"inherits": ["SPE_Target", "FUTURE_SEQUANA_M0"],
37
-
"extra_labels_add": ["PSOC6_PSA"],
25
+
"inherits": ["SPE_Target"],
38
26
"components_add": ["SPM_MAILBOX"],
39
-
"macros_add": ["PSOC6_DYNSRM_DISABLE=1"],
40
27
"deliver_to_target": "FUTURE_SEQUANA_PSA",
41
28
"overrides": {
42
29
"secure-rom-start": "0x10000000",
@@ -50,14 +37,11 @@ To achieve RAM and flash partitioning, you must add start and size values to a t
50
37
"shared-ram-start": "0x08010000",
51
38
"shared-ram-size": "0x1000"
52
39
}
40
+
...
53
41
},
54
42
"FUTURE_SEQUANA_PSA": {
55
-
"inherits": ["NSPE_Target", "FUTURE_SEQUANA"],
56
-
"sub_target": "FUTURE_SEQUANA_M0_PSA",
57
-
"extra_labels_remove": ["CORDIO"],
58
-
"extra_labels_add": ["PSOC6_PSA"],
43
+
"inherits": ["NSPE_Target"],
59
44
"components_add": ["SPM_MAILBOX"],
60
-
"macros_add": ["PSOC6_DYNSRM_DISABLE=1"],
61
45
"overrides": {
62
46
"secure-rom-start": "0x10000000",
63
47
"secure-rom-size": "0x78000",
@@ -70,10 +54,30 @@ To achieve RAM and flash partitioning, you must add start and size values to a t
70
54
"shared-ram-start": "0x08010000",
71
55
"shared-ram-size": "0x1000"
72
56
}
57
+
...
73
58
}
74
59
```
75
60
76
-
<spanclass="notes">**Note:** Only multicore architectures require a shared memory region.</span>
61
+
#### Memory layout
62
+
63
+
Typically, PSA platforms share the same RAM and flash between secure and nonsecure cores. To provide PSA isolation level 1 or higher, you need to partition both RAM and flash in a way the following image describes:
To achieve RAM and flash partitioning, you must add start and size values to a target configuration in `targets.json` as in the example above.
77
81
78
82
### Linker scripts
79
83
@@ -207,6 +211,7 @@ These are the guidelines you should follow if you have multicore systems:
207
211
- This handler must call an Arm callback function. The [HAL functions section](#hal-functions) explains this in more detail.
208
212
- It is your responsibility to clear the mailbox event. You can do this in the event handler.
209
213
- For each core, implement the HAL function that notifies the peer processor about a mailbox event occurrence. This is a part of the HAL, and the section below explains this in more detail.
214
+
- For each core, add the "SPM_MAILBOX" component field for its target node in mbed-os/targets/targets.json file.
0 commit comments