[PATCH V2] ARM: imx6q_logic: Fix broken booting by moving fdt_addr_r address

The loading address is too close to the kernel address, so newer kernels may overlap memory space, so loading the device tree may corrupt zImage.
This patch moves the fdt_addr_r to 0x14000000 which is also consistent with guidance that the kernel be allocated 32MB. This places it in the same place as the ramdisk, so this patch moves the ramdisk address 512KB after the fdt.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: Use 0x14000000 instead of 0x18000000 and move ramdisk to 0x14080000
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h index 63662dd18d..6b992f9ab8 100644 --- a/include/configs/imx6_logic.h +++ b/include/configs/imx6_logic.h @@ -34,8 +34,8 @@ "script=boot.scr\0" \ "image=zImage\0" \ "bootm_size=0x10000000\0" \ - "fdt_addr_r=0x13000000\0" \ - "ramdisk_addr_r=0x14000000\0" \ + "fdt_addr_r=0x14000000\0" \ + "ramdisk_addr_r=0x14080000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ "ramdisk_file=rootfs.cpio.uboot\0" \ "boot_fdt=try\0" \

On Thu, Aug 20, 2020 at 08:56:49AM -0500, Adam Ford wrote:
The loading address is too close to the kernel address, so newer kernels may overlap memory space, so loading the device tree may corrupt zImage.
This patch moves the fdt_addr_r to 0x14000000 which is also consistent with guidance that the kernel be allocated 32MB. This places it in the same place as the ramdisk, so this patch moves the ramdisk address 512KB after the fdt.
Signed-off-by: Adam Ford aford173@gmail.com
Reviewed-by: Tom Rini trini@konsulko.com

Hi Adam,
On Thu, Aug 20, 2020 at 10:57 AM Adam Ford aford173@gmail.com wrote:
The loading address is too close to the kernel address, so newer kernels may overlap memory space, so loading the device tree may corrupt zImage.
This patch moves the fdt_addr_r to 0x14000000 which is also consistent with guidance that the kernel be allocated 32MB. This places it in the same place as the ramdisk, so this patch moves the ramdisk address 512KB after the fdt.
Signed-off-by: Adam Ford aford173@gmail.com
Reviewed-by: Fabio Estevam festevam@gmail.com

The loading address is too close to the kernel address, so newer kernels may overlap memory space, so loading the device tree may corrupt zImage. This patch moves the fdt_addr_r to 0x14000000 which is also consistent with guidance that the kernel be allocated 32MB. This places it in the same place as the ramdisk, so this patch moves the ramdisk address 512KB after the fdt. Signed-off-by: Adam Ford aford173@gmail.com Reviewed-by: Tom Rini trini@konsulko.com Reviewed-by: Fabio Estevam festevam@gmail.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (4)
-
Adam Ford
-
Fabio Estevam
-
sbabic@denx.de
-
Tom Rini