e300: increase CONFIG_SYS_BOOTMAPSZ to allow booting large kernels
PATCH 1/1 e300: increase CONFIG_SYS_BOOTMAPSZ to allow booting large kernels
Newer Linux kernels can overrun the initial memory window used for booting with their BSS area. When this happens, they overwrite the FDT and silently fail to boot.
On e300 CPUs, the Linux kernel uses an initial BAT covering the first 256MB of RAM. See arch/powerpc/kernel/head_32.S for details. Increase the value of CONFIG_SYS_BOOTMAPSZ to accommodate the maximum value allowed by Linux. This will allow very large kernels to boot.
---
Wolfgang,
I did both mpc83xx and mpc51xx (CONFIG_E300) at the same time. There were fewer boards than I expected. A quick read through head_fsl_booke.S shows that CONFIG_E500 could be increased to 64MB. I'll leave that to that arch's maintainer. They have already increased theirs to 16MB, after finding this problem.
This patch doesn't attempt to add support for actually loading a kernel larger than 8MB uncompressed (code + data, but not bss). That would mean adding #define CONFIG_SYS_BOOTM_LEN SOME_VALUE_GREATER_THAN_8MB.
This boots up fine on my MPC8349EMDS.
Thanks,
Ira
include/configs/MPC8308RDB.h | 4 ++-- include/configs/MPC8313ERDB.h | 4 ++-- include/configs/MPC8315ERDB.h | 4 ++-- include/configs/MPC8323ERDB.h | 4 ++-- include/configs/MPC832XEMDS.h | 4 ++-- include/configs/MPC8349EMDS.h | 4 ++-- include/configs/MPC8349ITX.h | 4 ++-- include/configs/MPC8360EMDS.h | 4 ++-- include/configs/MPC8360ERDK.h | 4 ++-- include/configs/MPC837XEMDS.h | 4 ++-- include/configs/MPC837XERDB.h | 4 ++-- include/configs/MVBLM7.h | 4 ++-- include/configs/SIMPC8313.h | 4 ++-- include/configs/TQM834x.h | 4 ++-- include/configs/aria.h | 4 ++-- include/configs/kmeter1.h | 4 ++-- include/configs/mecp5123.h | 4 ++-- include/configs/mpc5121ads.h | 4 ++-- include/configs/pdm360ng.h | 4 ++-- include/configs/sbc8349.h | 4 ++-- include/configs/ve8313.h | 4 ++-- include/configs/vme8349.h | 4 ++-- 22 files changed, 44 insertions(+), 44 deletions(-)
include/configs/MPC8308RDB.h +2 -2
@@ -439,10 +439,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC8313ERDB.h +2 -2
@@ -453,10 +453,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_RCWH_PCIHOST 0x80000000/* PCIHOST */
include/configs/MPC8315ERDB.h +2 -2
@@ -529,10 +529,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC8323ERDB.h +2 -2
@@ -430,10 +430,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC832XEMDS.h +2 -2
@@ -447,10 +447,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC8349EMDS.h +2 -2
@@ -496,10 +496,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_RCWH_PCIHOST 0x80000000/* PCIHOST */
include/configs/MPC8349ITX.h +2 -2
@@ -539,10 +539,10 @@ boards, we say we have two, but don't display a message if we find only one. *//* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_HRCW_LOW (\ HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
include/configs/MPC8360EMDS.h +2 -2
@@ -487,10 +487,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC8360ERDK.h +2 -2
@@ -404,10 +404,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC837XEMDS.h +2 -2
@@ -537,10 +537,10 @@ extern int board_pci_host_broken(void);/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MPC837XERDB.h +2 -2
@@ -545,10 +545,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/MVBLM7.h +2 -2
@@ -300,10 +300,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_HRCW_LOW 0x0#define CONFIG_SYS_HRCW_HIGH 0x0
include/configs/SIMPC8313.h +2 -2
@@ -373,10 +373,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_RCWH_PCIHOST 0x80000000/* PCIHOST */
include/configs/TQM834x.h +2 -2
@@ -359,10 +359,10 @@ extern int tqm834x_num_flash_banks;/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_HRCW_LOW (\ HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
include/configs/aria.h +2 -2
@@ -507,10 +507,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Cache Configuration */ #define CONFIG_SYS_DCACHE_SIZE 32768
include/configs/kmeter1.h +2 -2
@@ -358,10 +358,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux */ /* * Core HID Setup
include/configs/mecp5123.h +2 -2
@@ -344,10 +344,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Linux initial memory map */ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Linux initial memory map */ /* Cache Configuration */ #define CONFIG_SYS_DCACHE_SIZE 32768
include/configs/mpc5121ads.h +2 -2
@@ -477,10 +477,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ /* Cache Configuration */ #define CONFIG_SYS_DCACHE_SIZE 32768
include/configs/pdm360ng.h +2 -2
@@ -412,11 +412,11 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ /* Initial Memory map for Linux */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20) +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Cache Configuration */ #define CONFIG_SYS_DCACHE_SIZE 32768
include/configs/sbc8349.h +2 -2
@@ -465,10 +465,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ #define CONFIG_SYS_RCWH_PCIHOST 0x80000000/* PCIHOST */
include/configs/ve8313.h +2 -2
@@ -366,10 +366,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Initial Memory map for Linux*/ /* 0x64050000 */ #define CONFIG_SYS_HRCW_LOW (\
include/configs/vme8349.h +2 -2
@@ -402,10 +402,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Init Memory map for Linux*/ +#define CONFIG_SYS_BOOTMAPSZ (256 << 20)/* Init Memory map for Linux*/ #define CONFIG_SYS_RCWH_PCIHOST 0x80000000/* PCIHOST */
Signature · 1 line
1.7.1
PATCH 1/1 e300: increase CONFIG_SYS_BOOTMAPSZ to allow booting large kernels
Quoted 20 lines · Ira W. Snyder
Newer Linux kernels can overrun the initial memory window used for booting with their BSS area. When this happens, they overwrite the FDT and silently fail to boot.
On e300 CPUs, the Linux kernel uses an initial BAT covering the first 256MB of RAM. See
arch/powerpc/kernel/head_32.Sfor details. Increase the value ofCONFIG_SYS_BOOTMAPSZto accommodate the maximum value allowed by Linux. This will allow very large kernels to boot.Signed-off-by Ira W. Snyder <[email protected]>---
Wolfgang,
I did both mpc83xx and mpc51xx (
CONFIG_E300) at the same time. There were fewer boards than I expected. A quick read throughhead_fsl_booke.Sshows thatCONFIG_E500could be increased to 64MB. I'll leave that to that arch's maintainer. They have already increased theirs to 16MB, after finding this problem.
Quoted 6 lines
This patch doesn't attempt to add support for actually loading a kernel larger than 8MB uncompressed (code + data, but not bss). That would mean adding #define
CONFIG_SYS_BOOTM_LENSOME_VALUE_GREATER_THAN_8MB.This boots up fine on my MPC8349EMDS.
Sorry about forgetting to CC maintainers before. I've added the 83xx and 5xxx maintainers, Kim and Wolfgang respectively. Is there anything I should do to help this patch into mainline. I haven't heard anything for about a week.
Thanks,
Ira
PATCH 1/1 e300: increase CONFIG_SYS_BOOTMAPSZ to allow booting large kernels
In reply to Ira W. SnyderQuoted 44 lines · On Fri, 10 Sep 2010 15:42:32 -0700 "Ira W. Snyder" <[email protected]> wrote:
Newer Linux kernels can overrun the initial memory window used for booting with their BSS area. When this happens, they overwrite the FDT and silently fail to boot.
On e300 CPUs, the Linux kernel uses an initial BAT covering the first 256MB of RAM. See
arch/powerpc/kernel/head_32.Sfor details. Increase the value ofCONFIG_SYS_BOOTMAPSZto accommodate the maximum value allowed by Linux. This will allow very large kernels to boot.Signed-off-by Ira W. Snyder <[email protected]>---
Wolfgang,
I did both mpc83xx and mpc51xx (
CONFIG_E300) at the same time. There were fewer boards than I expected. A quick read throughhead_fsl_booke.Sshows thatCONFIG_E500could be increased to 64MB. I'll leave that to that arch's maintainer. They have already increased theirs to 16MB, after finding this problem.This patch doesn't attempt to add support for actually loading a kernel larger than 8MB uncompressed (code + data, but not bss). That would mean adding #define
CONFIG_SYS_BOOTM_LENSOME_VALUE_GREATER_THAN_8MB.This boots up fine on my MPC8349EMDS.
Thanks,
Irainclude/configs/MPC8308RDB.h | 4 ++-- include/configs/MPC8313ERDB.h | 4 ++-- include/configs/MPC8315ERDB.h | 4 ++-- include/configs/MPC8323ERDB.h | 4 ++-- include/configs/MPC832XEMDS.h | 4 ++-- include/configs/MPC8349EMDS.h | 4 ++-- include/configs/MPC8349ITX.h | 4 ++-- include/configs/MPC8360EMDS.h | 4 ++-- include/configs/MPC8360ERDK.h | 4 ++-- include/configs/MPC837XEMDS.h | 4 ++-- include/configs/MPC837XERDB.h | 4 ++-- include/configs/MVBLM7.h | 4 ++-- include/configs/SIMPC8313.h | 4 ++-- include/configs/TQM834x.h | 4 ++-- include/configs/aria.h | 4 ++--
Quoted 8 lines
include/configs/kmeter1.h | 4 ++-- include/configs/mecp5123.h | 4 ++-- include/configs/mpc5121ads.h | 4 ++-- include/configs/pdm360ng.h | 4 ++-- include/configs/sbc8349.h | 4 ++-- include/configs/ve8313.h | 4 ++-- include/configs/vme8349.h | 4 ++-- 22 files changed, 44 insertions(+), 44 deletions(-)
applied to u-boot-mpc83xx/next. Wolfgang, hope you don't mind.
Thanks,
Kim
PATCH 1/1 e300: increase CONFIG_SYS_BOOTMAPSZ to allow booting large kernels
Dear Kim Phillips,
Quoted 2 lines · In message <[email protected]> you wrote:
applied to u-boot-mpc83xx/next. Wolfgang, hope you don't mind.
Thanks, that's fine with me.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "No matter where you go, there you are..." - Buckaroo Banzai