[U-Boot] [PATCH 1/2] ARM: uniphier: define CONFIG_SYS_BOOTMAPSZ

U-Boot relocates the device tree and the initramdisk to the tail of the memory region before booting the kernel.
Some UniPhier boards are equipped with a large amount of memory. For those boards, the device tree and the initramdisk are placed out of the the kernel causing a kernel panic.
Add CONFIG_SYS_BOOTMAPSZ to prevent them from going too high.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
include/configs/uniphier.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 463c687..c7d8628 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -226,6 +226,8 @@ "nand write $loadaddr 0x00010000 0x000f0000\0" \ LINUXBOOT_ENV_SETTINGS
+#define CONFIG_SYS_BOOTMAPSZ 0x20000000 + /* Open Firmware flat tree */ #define CONFIG_OF_LIBFDT

The load address of the kernel can be changed via "kernel_addr_r" environment. The device tree and the initramdisk should be relocated according to the kernel location.
The "bootm_low" should be calculated by masking the lower bits (TEXT_OFFSET part) of the "kernel_addr_r" environment value.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
include/configs/uniphier.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index c7d8628..599b269 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -201,15 +201,18 @@ "ramdisk_addr_r=0x84a00000\0" \ "ramdisk_size=0x00600000\0" \ "ramdisk_file=rootfs.cpio.uboot\0" \ - "norboot=setexpr kernel_addr $nor_base + $kernel_addr &&" \ + "norboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ + "setexpr kernel_addr $nor_base + $kernel_addr &&" \ "setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \ "setexpr fdt_addr $nor_base + $fdt_addr &&" \ "bootz $kernel_addr $ramdisk_addr $fdt_addr\0" \ - "nandboot=nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ + "nandboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ + "nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \ "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \ "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \ - "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \ + "tftpboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ + "tftpboot $kernel_addr_r $bootfile &&" \ "tftpboot $ramdisk_addr_r $ramdisk_file &&" \ "tftpboot $fdt_addr_r $fdt_file &&" \ "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0"

2016-01-09 2:12 GMT+09:00 Masahiro Yamada yamada.masahiro@socionext.com:
The load address of the kernel can be changed via "kernel_addr_r" environment. The device tree and the initramdisk should be relocated according to the kernel location.
The "bootm_low" should be calculated by masking the lower bits (TEXT_OFFSET part) of the "kernel_addr_r" environment value.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
Applied to u-boot-uniphier/master.

2016-01-09 2:12 GMT+09:00 Masahiro Yamada yamada.masahiro@socionext.com:
U-Boot relocates the device tree and the initramdisk to the tail of the memory region before booting the kernel.
Some UniPhier boards are equipped with a large amount of memory. For those boards, the device tree and the initramdisk are placed out of the the kernel causing a kernel panic.
Add CONFIG_SYS_BOOTMAPSZ to prevent them from going too high.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
Applied to u-boot-uniphier/master.
participants (1)
-
Masahiro Yamada