Skip to content

Commit ef42493

Browse files
committed
[nrf fromlist] boards: nordic: Align with updated Nordic owned memory bindings
Upstream PR: zephyrproject-rtos/zephyr#72273 Apply the following changes to `nrf54h20dk` and `nrf9280pdk`: * Convert `perm-*` properties to the newly introduced `nordic,access`, both in board files and tests. * Redefine shared regions to specify multiple access owners per node, and ensure that each such region is reserved by one domain at a time. `cpuapp_cpurad_ram0x_region` is only enabled by Radiocore, while `cpuapp_cpucell_ram0x_region` is only enabled by Application core. * Divide `shared_ram3x_region` so that each sub-region is owned by a different domain. Their addresses must be rounded down to fit the current UICR format. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 049e588ec4fbc22c8eeeeec7fad263dd0105035a)
1 parent a02056c commit ef42493

File tree

7 files changed

+39
-122
lines changed

7 files changed

+39
-122
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
compatible = "nordic,owned-memory";
1212
reg = <0x2f010000 DT_SIZE_K(260)>;
1313
status = "disabled";
14-
perm-read;
15-
perm-write;
16-
perm-secure;
14+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
1715
#address-cells = <1>;
1816
#size-cells = <1>;
1917
ranges = <0x0 0x2f010000 0x41000>;
@@ -35,9 +33,7 @@
3533
compatible = "nordic,owned-memory";
3634
reg = <0x2f051000 DT_SIZE_K(4)>;
3735
status = "disabled";
38-
perm-read;
39-
perm-write;
40-
perm-secure;
36+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
4137
#address-cells = <1>;
4238
#size-cells = <1>;
4339
ranges = <0x0 0x2f051000 0x1000>;
@@ -55,9 +51,7 @@
5551
compatible = "nordic,owned-memory";
5652
reg = <0x2f0be000 DT_SIZE_K(4)>;
5753
status = "disabled";
58-
perm-read;
59-
perm-write;
60-
perm-secure;
54+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
6155
#address-cells = <1>;
6256
#size-cells = <1>;
6357
ranges = <0x0 0x2f0be000 0x1000>;
@@ -72,8 +66,8 @@
7266
compatible = "nordic,owned-memory";
7367
reg = <0x2f0bf000 DT_SIZE_K(4)>;
7468
status = "disabled";
75-
perm-read;
76-
perm-write;
69+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
70+
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
7771
#address-cells = <1>;
7872
#size-cells = <1>;
7973
ranges = <0x0 0x2f0bf000 0x1000>;
@@ -111,16 +105,15 @@
111105
};
112106

113107
/*
114-
* NOTE: perm-execute is not required as FLPR has a direct
115-
* bridge with RAM21, bypassing MPC.
108+
* NOTE: FLPR has a direct bridge with RAM21 that bypasses MPC.
109+
* This means that when this region is marked as non-executable,
110+
* only FLPR can execute code from it.
116111
*/
117112
ram21_region: memory@2f890000 {
118113
compatible = "nordic,owned-memory";
119114
status = "disabled";
120115
reg = <0x2f890000 DT_SIZE_K(64)>;
121-
perm-read;
122-
perm-write;
123-
perm-secure;
116+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
124117
#address-cells = <1>;
125118
#size-cells = <1>;
126119
ranges = <0x0 0x2f890000 0x10000>;
@@ -151,9 +144,7 @@
151144
compatible = "nordic,owned-memory";
152145
reg = <0x2fc00000 DT_SIZE_K(64)>;
153146
status = "disabled";
154-
perm-read;
155-
perm-write;
156-
perm-execute;
147+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
157148
#address-cells = <1>;
158149
#size-cells = <1>;
159150
ranges = <0x0 0x2fc00000 0x10000>;
@@ -172,29 +163,27 @@
172163
};
173164

174165
shared_ram3x_region: memory@2fc12000 {
175-
compatible = "nordic,owned-memory";
176166
reg = <0x2fc12000 DT_SIZE_K(8)>;
177-
status = "disabled";
178-
perm-read;
179-
perm-write;
180167
#address-cells = <1>;
181168
#size-cells = <1>;
182169
ranges = <0x0 0x2fc12000 0x2000>;
183170

184-
cpuapp_dma_region: memory@e80 {
185-
compatible = "zephyr,memory-region";
186-
reg = <0xe80 DT_SIZE_K(4)>;
171+
cpuapp_dma_region: memory@0 {
172+
compatible = "nordic,owned-memory", "zephyr,memory-region";
173+
reg = <0x0 DT_SIZE_K(4)>;
187174
status = "disabled";
188175
#memory-region-cells = <0>;
176+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
189177
zephyr,memory-region = "DMA_RAM3x_APP";
190178
zephyr,memory-attr = <( DT_MEM_DMA )>;
191179
};
192180

193-
cpurad_dma_region: memory@1e80 {
194-
compatible = "zephyr,memory-region";
195-
reg = <0x1e80 0x80>;
181+
cpurad_dma_region: memory@1000 {
182+
compatible = "nordic,owned-memory", "zephyr,memory-region";
183+
reg = <0x1000 0x80>;
196184
status = "disabled";
197185
#memory-region-cells = <0>;
186+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
198187
zephyr,memory-region = "DMA_RAM3x_RAD";
199188
zephyr,memory-attr = <( DT_MEM_DMA )>;
200189
};
@@ -206,9 +195,7 @@
206195
cpurad_rx_partitions: cpurad-rx-partitions {
207196
compatible = "nordic,owned-partitions", "fixed-partitions";
208197
status = "disabled";
209-
perm-read;
210-
perm-execute;
211-
perm-secure;
198+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RXS>;
212199
#address-cells = <1>;
213200
#size-cells = <1>;
214201

@@ -220,9 +207,7 @@
220207
cpuapp_rx_partitions: cpuapp-rx-partitions {
221208
compatible = "nordic,owned-partitions", "fixed-partitions";
222209
status = "disabled";
223-
perm-read;
224-
perm-execute;
225-
perm-secure;
210+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RXS>;
226211
#address-cells = <1>;
227212
#size-cells = <1>;
228213

@@ -242,9 +227,7 @@
242227
cpuapp_rw_partitions: cpuapp-rw-partitions {
243228
compatible = "nordic,owned-partitions", "fixed-partitions";
244229
status = "disabled";
245-
perm-read;
246-
perm-write;
247-
perm-secure;
230+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
248231
#address-cells = <1>;
249232
#size-cells = <1>;
250233

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,6 @@
123123
status = "okay";
124124
};
125125

126-
&cpuapp_cpurad_ram0x_region {
127-
status = "okay";
128-
};
129-
130-
&shared_ram3x_region {
131-
status = "okay";
132-
};
133-
134126
&ram21_region {
135127
status = "okay";
136128
};

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
};
4040
};
4141

42-
&shared_ram3x_region {
43-
status = "okay";
44-
};
45-
4642
&cpuapp_cpurad_ram0x_region {
4743
status = "okay";
4844
};

boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-memory_map.dtsi

Lines changed: 16 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
compatible = "nordic,owned-memory";
1616
reg = <0x2f011000 DT_SIZE_K(4)>;
1717
status = "disabled";
18-
perm-read;
19-
perm-write;
20-
perm-secure;
18+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RWS>;
2119
#address-cells = <1>;
2220
#size-cells = <1>;
2321
ranges = <0x0 0x2f011000 0x1000>;
@@ -35,9 +33,7 @@
3533
compatible = "nordic,owned-memory";
3634
reg = <0x2f012000 DT_SIZE_K(516)>;
3735
status = "disabled";
38-
perm-read;
39-
perm-write;
40-
perm-secure;
36+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
4137
#address-cells = <1>;
4238
#size-cells = <1>;
4339
ranges = <0x0 0x2f012000 0x81000>;
@@ -59,8 +55,8 @@
5955
compatible = "nordic,owned-memory";
6056
reg = <0x2f0cf000 DT_SIZE_K(4)>;
6157
status = "disabled";
62-
perm-read;
63-
perm-write;
58+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
59+
<NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
6460
#address-cells = <1>;
6561
#size-cells = <1>;
6662
ranges = <0x0 0x2f0cf000 0x1000>;
@@ -75,8 +71,11 @@
7571
};
7672

7773
cpuapp_cpucell_ram0x_region: memory@2f0d0000 {
74+
compatible = "nordic,owned-memory";
7875
reg = <0x2f0d0000 DT_SIZE_K(36)>;
7976
status = "disabled";
77+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>,
78+
<NRF_OWNER_ID_CELL NRF_PERM_RW>;
8079
#address-cells = <1>;
8180
#size-cells = <1>;
8281
ranges = <0x0 0x2f0d0000 0x9000>;
@@ -99,31 +98,6 @@
9998
};
10099
};
101100

102-
/* Shared memory ownership.
103-
* TODO:
104-
* remove these two after https://github.com/zephyrproject-rtos/zephyr/pull/72273
105-
* and let cpuapp_cpucell_ram0x_region use the `access` binding to describe
106-
* the shared memory ownership.
107-
*/
108-
109-
cpuapp_cpucell_ipc_shm: memory@2 {
110-
compatible = "nordic,owned-memory";
111-
reg = <0x2f0d0000 DT_SIZE_K(36)>;
112-
owner-id = <2>;
113-
perm-read;
114-
perm-write;
115-
status = "disabled";
116-
};
117-
118-
cpucell_cpuapp_ipc_shm: memory@4 {
119-
compatible = "nordic,owned-memory";
120-
reg = <0x2f0d0000 DT_SIZE_K(36)>;
121-
owner-id = <4>;
122-
perm-read;
123-
perm-write;
124-
status = "disabled";
125-
};
126-
127101
shared_ram20_region: memory@2f88f000 {
128102
reg = <0x2f88f000 DT_SIZE_K(4)>;
129103
#address-cells = <1>;
@@ -151,9 +125,7 @@
151125
compatible = "nordic,owned-memory";
152126
status = "disabled";
153127
reg = <0x2f890000 DT_SIZE_K(32)>;
154-
perm-read;
155-
perm-write;
156-
perm-secure;
128+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
157129
#address-cells = <1>;
158130
#size-cells = <1>;
159131
ranges = <0x0 0x2f890000 0x8000>;
@@ -172,9 +144,7 @@
172144
compatible = "nordic,owned-memory";
173145
reg = <0x2fc00000 DT_SIZE_K(24)>;
174146
status = "disabled";
175-
perm-read;
176-
perm-write;
177-
perm-execute;
147+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWX>;
178148
#address-cells = <1>;
179149
#size-cells = <1>;
180150
ranges = <0x0 0x2fc00000 0x6000>;
@@ -193,29 +163,27 @@
193163
};
194164

195165
shared_ram3x_region: memory@2fc06000 {
196-
compatible = "nordic,owned-memory";
197166
reg = <0x2fc06000 DT_SIZE_K(8)>;
198-
status = "disabled";
199-
perm-read;
200-
perm-write;
201167
#address-cells = <1>;
202168
#size-cells = <1>;
203169
ranges = <0x0 0x2fc06000 0x4000>;
204170

205171
cpuapp_dma_region: memory@0 {
206-
compatible = "zephyr,memory-region";
172+
compatible = "nordic,owned-memory", "zephyr,memory-region";
207173
reg = <0x0 DT_SIZE_K(4)>;
208174
status = "disabled";
209175
#memory-region-cells = <0>;
176+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RW>;
210177
zephyr,memory-region = "DMA_RAM3x_APP";
211178
zephyr,memory-attr = <( DT_MEM_DMA )>;
212179
};
213180

214181
cpurad_dma_region: memory@1000 {
215-
compatible = "zephyr,memory-region";
182+
compatible = "nordic,owned-memory", "zephyr,memory-region";
216183
reg = <0x1000 0x80>;
217184
status = "disabled";
218185
#memory-region-cells = <0>;
186+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RW>;
219187
zephyr,memory-region = "DMA_RAM3x_RAD";
220188
zephyr,memory-attr = <( DT_MEM_DMA )>;
221189
};
@@ -227,9 +195,7 @@
227195
cpurad_rx_partitions: cpurad-rx-partitions {
228196
compatible = "nordic,owned-partitions", "fixed-partitions";
229197
status = "disabled";
230-
perm-read;
231-
perm-execute;
232-
perm-secure;
198+
nordic,access = <NRF_OWNER_ID_RADIOCORE NRF_PERM_RXS>;
233199
#address-cells = <1>;
234200
#size-cells = <1>;
235201

@@ -241,9 +207,7 @@
241207
cpuapp_rx_partitions: cpuapp-rx-partitions {
242208
compatible = "nordic,owned-partitions", "fixed-partitions";
243209
status = "disabled";
244-
perm-read;
245-
perm-execute;
246-
perm-secure;
210+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RXS>;
247211
#address-cells = <1>;
248212
#size-cells = <1>;
249213

@@ -259,9 +223,7 @@
259223
cpuapp_rw_partitions: cpuapp-rw-partitions {
260224
compatible = "nordic,owned-partitions", "fixed-partitions";
261225
status = "disabled";
262-
perm-read;
263-
perm-write;
264-
perm-secure;
226+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
265227
#address-cells = <1>;
266228
#size-cells = <1>;
267229

boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,7 @@
120120
status = "okay";
121121
};
122122

123-
&cpuapp_cpurad_ram0x_region {
124-
status = "okay";
125-
};
126-
127-
&cpuapp_cpucell_ipc_shm {
128-
status = "okay";
129-
};
130-
131-
&cpucell_cpuapp_ipc_shm {
132-
status = "okay";
133-
};
134-
135-
&shared_ram3x_region {
123+
&cpuapp_cpucell_ram0x_region {
136124
status = "okay";
137125
};
138126

boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpurad.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
};
4141
};
4242

43-
&shared_ram3x_region {
44-
status = "okay";
45-
};
46-
4743
&cpuapp_cpurad_ram0x_region {
4844
status = "okay";
4945
};

tests/arch/common/ramfunc/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
*/
55

66
&cpuapp_ram0x_region {
7-
perm-execute;
7+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWXS>;
88
};

0 commit comments

Comments
 (0)