Skip to contentSkip to conversation

configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for px30 to rk3308/etc

PATCH Superseded Heiko Stuebner 2 participants 3 messages Apr 1, 2025 – May 6, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for px30 to rk3308/etc

From: Heiko Stuebner <[email protected]>

Loading a FIT image for kernel, initrd and rootfs on px30 can result in an memory overlap, resulting in the not 100% helpful message of "This will not be a case any time" from lmb_fix_over_lap_regions().

Adding a bit of debug info to lmb_fix_over_lap_regions() brings:
lmb_fix_over_lap_regions: base1 0x280000-0x6005ac > base2 0x600000-0x6000d1

So this is because the FIT image gets loaded to the kernel_addr_r at 0x280000 while the pxe-file is already living at 0x600000, only 3.5MB behind.

In commit 4acc8bb044a4 ("configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for rk3308, rk3328, and rk3399") FUKAUMI Naoki already brought the memory layouts for the mentioned socs in sync.

Adjusting the env-layout on px30 to this scheme, magically solves the overlap issue and also brings px30 more in line with the other mentioned SoCs.

---
 include/configs/px30_common.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/px30_common.h +7 -4
index 13ed9011764..2a3dc362f98 100644
@@ -18,11 +18,14 @@
 
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
 	"pxefile_addr_r=0x00600000\0" \
-	"fdt_addr_r=0x08300000\0" \
-	"kernel_addr_r=0x00280000\0" \
-	"ramdisk_addr_r=0x0a200000\0" \
-	"kernel_comp_addr_r=0x03e80000\0" \
+	"fdt_addr_r=0x01e00000\0" \
+	"fdtoverlay_addr_r=0x01f00000\0" \
+	"kernel_addr_r=0x02080000\0" \
+	"ramdisk_addr_r=0x06000000\0" \
+	"kernel_comp_addr_r=0x08000000\0" \
 	"kernel_comp_size=0x2000000\0"
 
 #define CFG_EXTRA_ENV_SETTINGS \
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Heiko Stuebner

From: Heiko Stuebner <[email protected]>

Loading a FIT image for kernel, initrd and rootfs on px30 can result in an memory overlap, resulting in the not 100% helpful message of "This will not be a case any time" from lmb_fix_over_lap_regions().

Adding a bit of debug info to lmb_fix_over_lap_regions() brings:
lmb_fix_over_lap_regions: base1 0x280000-0x6005ac > base2 0x600000-0x6000d1

So this is because the FIT image gets loaded to the kernel_addr_r at 0x280000 while the pxe-file is already living at 0x600000, only 3.5MB behind.

In commit 4acc8bb044a4 ("configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for rk3308, rk3328, and rk3399") FUKAUMI Naoki already brought the memory layouts for the mentioned socs in sync.

Quoted 5 lines

Adjusting the env-layout on px30 to this scheme, magically solves the overlap issue and also brings px30 more in line with the other mentioned SoCs.

Thanks,
- Kever

Quoted 27 lines
---
  include/configs/px30_common.h | 11 +++++++----
  1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/px30_common.h +7 -4
index 13ed9011764..2a3dc362f98 100644
@@ -18,11 +18,14 @@
 
  #define ENV_MEM_LAYOUT_SETTINGS \
  	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
  	"pxefile_addr_r=0x00600000\0" \
-	"fdt_addr_r=0x08300000\0" \
-	"kernel_addr_r=0x00280000\0" \
-	"ramdisk_addr_r=0x0a200000\0" \
-	"kernel_comp_addr_r=0x03e80000\0" \
+	"fdt_addr_r=0x01e00000\0" \
+	"fdtoverlay_addr_r=0x01f00000\0" \
+	"kernel_addr_r=0x02080000\0" \
+	"ramdisk_addr_r=0x06000000\0" \
+	"kernel_comp_addr_r=0x08000000\0" \
  	"kernel_comp_size=0x2000000\0"
 
  #define CFG_EXTRA_ENV_SETTINGS \
#2 lore raw
In reply to Heiko Stuebner

Hi Heiko,

    Could you please re-base this patch because it got conflict after I apply a patch from Quentin.

Thanks,

- Kever

Quoted 49 lines · Heiko Stuebner

From: Heiko Stuebner <[email protected]>

Loading a FIT image for kernel, initrd and rootfs on px30 can result in an memory overlap, resulting in the not 100% helpful message of "This will not be a case any time" from lmb_fix_over_lap_regions().

Adding a bit of debug info to lmb_fix_over_lap_regions() brings:
lmb_fix_over_lap_regions: base1 0x280000-0x6005ac > base2 0x600000-0x6000d1

So this is because the FIT image gets loaded to the kernel_addr_r at 0x280000 while the pxe-file is already living at 0x600000, only 3.5MB behind.

In commit 4acc8bb044a4 ("configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for rk3308, rk3328, and rk3399") FUKAUMI Naoki already brought the memory layouts for the mentioned socs in sync.

Adjusting the env-layout on px30 to this scheme, magically solves the overlap issue and also brings px30 more in line with the other mentioned SoCs.

---
  include/configs/px30_common.h | 11 +++++++----
  1 file changed, 7 insertions(+), 4 deletions(-)
include/configs/px30_common.h +7 -4
index 13ed9011764..2a3dc362f98 100644
@@ -18,11 +18,14 @@
 
  #define ENV_MEM_LAYOUT_SETTINGS \
  	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
  	"pxefile_addr_r=0x00600000\0" \
-	"fdt_addr_r=0x08300000\0" \
-	"kernel_addr_r=0x00280000\0" \
-	"ramdisk_addr_r=0x0a200000\0" \
-	"kernel_comp_addr_r=0x03e80000\0" \
+	"fdt_addr_r=0x01e00000\0" \
+	"fdtoverlay_addr_r=0x01f00000\0" \
+	"kernel_addr_r=0x02080000\0" \
+	"ramdisk_addr_r=0x06000000\0" \
+	"kernel_comp_addr_r=0x08000000\0" \
  	"kernel_comp_size=0x2000000\0"
 
  #define CFG_EXTRA_ENV_SETTINGS \