From 529adafde26d951fa425029e0b56370c36d29081 Mon Sep 17 00:00:00 2001 From: Michael Brandt Date: Fri, 27 Aug 2010 14:21:17 +0200 Subject: Make U-Boot restartable and crash dump support * Added an u8500 board specific ld script. Reserve space for .data backup. * Make a backup copy of initialised data (.data section). If restarted, copy the backup data back to .data. * Create crashkernel env variable dynamically, since it depends on U-Boot start address. For dumping U-Boot itself is used as crashkernel. * Set preboot environment variable to checkcrash command, if data_init_flag > 0, i.e. we were restarted e.g. by kexec. * Added crashkernel parameter to common bootargs. Decreased environment and pool sizes. * Changed link address of U-Boot: moved it 32 K up for kdump info to 0x05608000 * Added "checkcrash" command This command checks if there is a pending crash dump and writes it to a file on SD/MMC. ST-Ericsson ID: WP264488 Change-Id: If545822e424b95532f1128afb0e762b6b73834e9 Signed-off-by: Michael Brandt Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/3011 --- include/configs/u8500.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'include/configs') diff --git a/include/configs/u8500.h b/include/configs/u8500.h index 3ee8b599f..31c4d9453 100644 --- a/include/configs/u8500.h +++ b/include/configs/u8500.h @@ -44,15 +44,15 @@ #define BOARD_LATE_INIT 1 /*----------------------------------------------------------------------- - * Size of malloc() pool + * Size of environment and malloc() pool */ -#ifdef CONFIG_BOOT_SRAM -#define CONFIG_ENV_SIZE 32*1024 -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 64*1024) -#else -#define CONFIG_ENV_SIZE 128*1024 -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256*1024) -#endif +/* + * If you use U-Boot as crash kernel, make sure that it does not overwrite + * information saved by kexec during panic. Kexec expects the start + * address of the executable 32K above "crashkernel" address. + */ +#define CONFIG_ENV_SIZE 4*1024 +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 16*1024) #define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */ /*----------------------------------------------------------------------- @@ -116,6 +116,9 @@ #endif #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ +/* preboot is set dynamically to "checkcrash" if U-Boot was executed by kexec */ +#define CONFIG_PREBOOT + #undef CONFIG_BOOTARGS #define CONFIG_BOOTCOMMAND "run emmcboot" @@ -131,6 +134,7 @@ "commonargs=setenv bootargs cachepolicy=writealloc noinitrd " \ "init=init " \ "board_id=${board_id} " \ + "crashkernel=${crashkernel} " \ "logo.${logo} " \ "startup_graphics=${startup_graphics}\0" \ "emmcargs=setenv bootargs ${bootargs} " \ -- cgit v1.2.3