Browse Source

powerpc: Clear the BSS at the start of early_init with ARCH=ppc

Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras 19 years ago
parent
commit
dd184343b4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      arch/powerpc/kernel/setup_32.c

+ 4 - 0
arch/powerpc/kernel/setup_32.c

@@ -294,6 +294,10 @@ unsigned long __init early_init(unsigned long dt_ptr)
 {
 {
 	unsigned long offset = reloc_offset();
 	unsigned long offset = reloc_offset();
 
 
+	/* First zero the BSS -- use memset_io, some platforms don't have
+	 * caches on yet */
+	memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
+
 	/*
 	/*
 	 * Identify the CPU type and fix up code sections
 	 * Identify the CPU type and fix up code sections
 	 * that depend on which cpu we have.
 	 * that depend on which cpu we have.