Skip to content

Commit efc2cfe

Browse files
AlexCharltonkartben
authored andcommitted
boards: beaglev_fire: fix memory address
Per the docs, the memory at address 0x80000000 ends at 0xC0000000. In other words, the address space is 0x40000000, which is only half of the size we want to map. This means that the upper address space previously mapped was overlapping with the space reserved for non-cached memory. Instead, we map the entire 2GB at 0x1000000000, which is the correct address for cached DDR that occupies more than 1 GB. We defined a new node in the device tree for this memory region, `beaglev.ddr_cached_high`. We did not reuse the `soc` node because we needed to redefine the `#address-cells` to be 2, and doing so would have affected other nodes under `soc`. Signed-off-by: Alex Charlton <[email protected]>
1 parent 16e0a6f commit efc2cfe

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

boards/beagle/beaglev_fire/beaglev_fire_common.dtsi

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@
1515
aliases {
1616
};
1717

18-
soc {
19-
sram1: memory@80000000 {
18+
beaglev {
19+
#address-cells = <2>;
20+
#size-cells = <1>;
21+
22+
ddr_cached_high: memory@1000000000 {
2023
compatible = "mmio-sram";
21-
reg = <0x80000000 0x77F80000>; /* Size = 2GB - 0x80000 */
24+
reg = <0x10 0x00000000 0x80000000>; /* 2GB */
2225
};
2326
};
2427

2528
chosen {
2629
zephyr,console = &uart0;
2730
zephyr,shell-uart = &uart0;
28-
zephyr,sram = &sram1;
31+
zephyr,sram = &ddr_cached_high;
2932
};
3033
};
3134

boards/beagle/beaglev_fire/beaglev_fire_polarfire_e51.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type: mcu
44
arch: riscv
55
toolchain:
66
- zephyr
7-
ram: 2012741
7+
ram: 2048000
88
testing:
99
ignore_tags:
1010
- net

boards/beagle/beaglev_fire/beaglev_fire_polarfire_u54.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type: mcu
44
arch: riscv
55
toolchain:
66
- zephyr
7-
ram: 2012741
7+
ram: 2048000
88
testing:
99
ignore_tags:
1010
- net

boards/beagle/beaglev_fire/beaglev_fire_polarfire_u54_smp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type: mcu
44
arch: riscv
55
toolchain:
66
- zephyr
7-
ram: 2012741
7+
ram: 2048000
88
testing:
99
ignore_tags:
1010
- net

boards/beagle/beaglev_fire/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ When using the PolarFire `Hart Software Services <https://github.com/polarfire-s
9393
9494
# Define the entry point address for each hart (U54 cores)
9595
hart-entry-points:
96-
u54_1: '0x80000000'
96+
u54_1: '0x1000000000'
9797
9898
# Define the payloads (ELF binaries or raw blobs)
9999
payloads:
100100
<path_to_zephyr.elf>:
101-
exec-addr: '0x80000000' # Where Zephyr should be loaded
101+
exec-addr: '0x1000000000' # Where Zephyr should be loaded
102102
owner-hart: u54_1 # Primary hart that runs Zephyr
103103
priv-mode: prv_m # Start in Machine mode
104104
skip-opensbi: true # Boot directly without OpenSBI

0 commit comments

Comments
 (0)