From 58085efd69fe6cf43125d0af874487a86f1e21b9 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 17 Dec 2008 15:33:43 +0900 Subject: [PATCH] --- yaml --- r: 120151 b: refs/heads/master c: 740a3e677b70181d5e2b1458a27891209e3bf635 h: refs/heads/master i: 120149: 784878215925baa0ebddf1beae3113fbba418dd2 120147: 11e1fae649594c99080ea808c8a6ed6612b02988 120143: 7877cadc5b1f9bb52832dfb2be2f9d1a8c4773d8 v: v3 --- [refs] | 2 +- trunk/arch/sh/Kconfig.debug | 15 ++++++++++++--- trunk/arch/sh/kernel/head_32.S | 12 ++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 253259128ee6..c292453270e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8a655053ca1593dd160dac2a4ee638fdec037d86 +refs/heads/master: 740a3e677b70181d5e2b1458a27891209e3bf635 diff --git a/trunk/arch/sh/Kconfig.debug b/trunk/arch/sh/Kconfig.debug index 834a2d24342b..eef2fa940ce0 100644 --- a/trunk/arch/sh/Kconfig.debug +++ b/trunk/arch/sh/Kconfig.debug @@ -98,6 +98,18 @@ config IRQSTACKS for handling hard and soft interrupts. This can help avoid overflowing the process kernel stacks. +config SH_NO_BSS_INIT + bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)" + depends on DEBUG_KERNEL + default n + help + If running in painfully slow environments, such as an RTL + simulation or from remote memory via SHdebug, where the memory + can already be gauranteed to ber zeroed on boot, say Y. + + For all other cases, say N. If this option seems perplexing, or + you aren't sure, say N. + config MORE_COMPILE_OPTIONS bool "Add any additional compile options" help @@ -125,9 +137,6 @@ config SH_ALPHANUMERIC bool "Enable debug outputs to on-board alphanumeric display" depends on SH_CAYMAN -config SH_NO_BSS_INIT - bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)" - endif endmenu diff --git a/trunk/arch/sh/kernel/head_32.S b/trunk/arch/sh/kernel/head_32.S index ae0a382a82eb..788605ff7088 100644 --- a/trunk/arch/sh/kernel/head_32.S +++ b/trunk/arch/sh/kernel/head_32.S @@ -80,8 +80,14 @@ ENTRY(_stext) mov.l 7f, r0 ldc r0, r7_bank ! ... and initial thread_info #endif - - ! Clear BSS area + +#ifndef CONFIG_SH_NO_BSS_INIT + /* + * Don't clear BSS if running on slow platforms such as an RTL simulation, + * remote memory via SHdebug link, etc. For these the memory can be guaranteed + * to be all zero on boot anyway. + */ + ! Clear BSS area #ifdef CONFIG_SMP mov.l 3f, r0 cmp/eq #0, r0 ! skip clear if set to zero @@ -97,6 +103,8 @@ ENTRY(_stext) mov.l r0,@-r2 10: +#endif + ! Additional CPU initialization mov.l 6f, r0 jsr @r0