[PATCH] powerpc: zero out BSS for all platforms

Kumar Gala galak at freescale.com
Tue Oct 11 05:51:12 EST 2005


We need to ensure that the BSS is zeroed out for all platforms.
Currently only prom_init.c was clearlying out the BSS which only works
for PPC_OF platforms.

Signed-off-by: Kumar K. Gala <kumar.gala at freescale.com>

---
commit 56381a9f0765ba3ffa5f21a4cdcb93ac0279eeea
tree 9f0f353b0776129626082a46b578d637fb79dad1
parent dfc32a358c961c3fbfa94942ecb06da2e895ffe7
author Kumar K. Gala <kumar.gala at freescale.com> Mon, 10 Oct 2005 14:48:36 -0500
committer Kumar K. Gala <kumar.gala at freescale.com> Mon, 10 Oct 2005 14:48:36 -0500

 arch/powerpc/kernel/setup.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/setup.c b/arch/powerpc/kernel/setup.c
--- a/arch/powerpc/kernel/setup.c
+++ b/arch/powerpc/kernel/setup.c
@@ -293,6 +293,10 @@ unsigned long __init early_init(unsigned
 
 	reloc_got2(offset);
 
+	/* First zero the BSS -- use memset, some arches don't have
+	 * caches on yet */
+	memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
+
 	/*
 	 * Identify the CPU type and fix up code sections
 	 * that depend on which cpu we have.



More information about the Linuxppc-dev mailing list