Skip to content

Commit 333c7c9

Browse files
authored
Update spm.md
1 parent 0f65576 commit 333c7c9

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

docs/porting/psa/spm.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Typically, PSA platforms share the same RAM and flash between secure and nonsecu
1414
RAM
1515
+-----------+-------------+--------------------------------------------------+
1616
| Secure | Shared | Non-Secure |
17-
| RAM | RAM | RAM |
17+
| RAM | RAM | RAM |
1818
+-----------+-------------+--------------------------------------------------+
1919
2020
Flash
2121
+-----------------------+----------------------------------------------------+
2222
| Secure | Non-Secure |
23-
| Flash | Flash |
23+
| Flash | Flash |
2424
+-----------------------+----------------------------------------------------+
2525
2626
```
@@ -79,11 +79,12 @@ To achieve RAM and flash partitioning, you must add start and size values to a t
7979

8080
Linker scripts must include `MBED_ROM_START`, `MBED_ROM_SIZE`, `MBED_RAM_START` and `MBED_RAM_START` macros for defining memory regions. You can define a shared memory region by reserving RAM space for shared memory use. The shared memory location is target specific and depends on the memory protection scheme applied.
8181

82-
Typically, shared memory is located before or after nonsecure RAM, for saving MPU regions. The shared memory region is nonsecure memory that both cores use.
82+
Typically, shared memory is located adjacent (before or after) to the nonsecure RAM, for saving MPU regions. The shared memory region is nonsecure memory that both cores use.
8383

84-
#### Linker script example GCC_ARM
84+
#### Linker script example for GCC_ARM
8585

8686
```
87+
...
8788
#if !defined(MBED_ROM_START)
8889
#define MBED_ROM_START 0x10000000
8990
#endif
@@ -111,9 +112,10 @@ MEMORY
111112
...
112113
```
113114

114-
#### Linker Script example ARM
115+
#### Linker script example for ARM
115116

116117
```
118+
...
117119
#if !defined(MBED_ROM_START)
118120
#define MBED_ROM_START 0x10000000
119121
#endif
@@ -148,11 +150,13 @@ LR_IROM1 MBED_ROM_START MBED_ROM_SIZE {
148150
.ANY (+RW +ZI)
149151
}
150152
}
153+
...
151154
```
152155

153-
#### Linker script example IAR
156+
#### Linker script example for IAR
154157

155158
```
159+
...
156160
if (!isdefinedsymbol(MBED_ROM_START)) {
157161
define symbol MBED_ROM_START = 0x10000000;
158162
}
@@ -247,8 +251,7 @@ Arm provides a list of tests to make sure the HAL functions are implemented acco
247251

248252
After finalizing the porting, execute the following tests:
249253

250-
- [TODO: WHEN READY, ADD TEST NAME]
251-
- [TODO: WHEN READY, ADD TEST NAME]
252-
- ...
254+
- **tests-psa-spm_smoke:** This test will make sure that the porting of the mailbox mechanism (for dual core systems) is successful.
255+
- **tests-mbed_hal-spm:** This test will make sure the porting of the memory protection (*spm_hal_memory_protection_init()* implementation) makes the correct partitioning between secure RAM/Flash and non-secure RAM/Flash.
253256

254257
We recommended you leave the memory protection part (*spm_hal_memory_protection_init()* implementation) to the end of the porting. First, implement and test other HAL functions. After these tests pass, implement *spm_hal_memory_protection_init()*, and run the entire test suite again, including the memory protection related tests.

0 commit comments

Comments
 (0)