Skip to content

Commit a57a69b

Browse files
carlocaioneMaureenHelm
authored andcommitted
dts: virt: Move sram node to DT board files
Currently the SRAM location is fixed for all the boards derived from qemu_cortex_a53. While this is acceptable when the image is directly loaded in SRAM by QEMU, in some cases Zephyr can be loaded in RAM by another piece of software or by semihosting at a different address before jumping into it. When for example TF-A is used and Zephyr is run as BL33 payload using QEMU, in this case the default location in RAM is at a different address (when preloaded BL33 base address is not used). To address these cases, move the SRAM location into the board-specific DTS so that it can be adjusted on a board by board basis. Signed-off-by: Carlo Caione <[email protected]>
1 parent 8847790 commit a57a69b

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

boards/arm64/qemu_cortex_a53/qemu_cortex_a53.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
zephyr,shell-uart = &uart0;
2525
zephyr,flash = &flash0;
2626
};
27+
28+
soc {
29+
sram0: memory@40000000 {
30+
compatible = "mmio-sram";
31+
reg = <0x40000000 DT_SIZE_M(128)>;
32+
};
33+
34+
};
2735
};
2836

2937
&uart0 {

boards/arm64/qemu_cortex_a53/qemu_cortex_a53_xip.dts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,4 @@
55
*
66
*/
77

8-
/dts-v1/;
9-
#include <arm64/qemu-virt/qemu-virt-a53.dtsi>
10-
11-
/ {
12-
model = "QEMU Cortex-A53";
13-
compatible = "qemu,arm-cortex-a53";
14-
15-
chosen {
16-
zephyr,sram = &sram0;
17-
zephyr,console = &uart0;
18-
zephyr,shell-uart = &uart0;
19-
zephyr,flash = &flash0;
20-
};
21-
};
22-
23-
&uart0 {
24-
status = "okay";
25-
current-speed = <115200>;
26-
};
8+
#include "qemu_cortex_a53.dts"

dts/arm64/qemu-virt/qemu-virt-a53.dtsi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@
5858
soc {
5959
interrupt-parent = <&gic>;
6060

61-
sram0: memory@40000000 {
62-
compatible = "mmio-sram";
63-
reg = <0x40000000 DT_SIZE_M(128)>;
64-
};
65-
6661
gic: interrupt-controller@8000000 {
6762
compatible = "arm,gic";
6863
reg = <0x8000000 0x010000>,

0 commit comments

Comments
 (0)