svn commit: r228605 - head/sys/powerpc/aim
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Fri Dec 16 23:40:57 UTC 2011
Author: nwhitehorn
Date: Fri Dec 16 23:40:56 2011
New Revision: 228605
URL: http://svn.freebsd.org/changeset/base/228605
Log:
Zero BSS on start, in case the ELF loader that started the kernel did not
do this for us. This can happen on some embedded systems.
Submitted by: rpaulo
Modified:
head/sys/powerpc/aim/locore32.S
Modified: head/sys/powerpc/aim/locore32.S
==============================================================================
--- head/sys/powerpc/aim/locore32.S Fri Dec 16 23:15:11 2011 (r228604)
+++ head/sys/powerpc/aim/locore32.S Fri Dec 16 23:40:56 2011 (r228605)
@@ -128,6 +128,17 @@ __start:
sync
isync
+ /* Zero bss, in case we were started by something unhelpful */
+ li 0,0
+ lis 8,_edata at ha
+ addi 8,8,_edata at l
+ lis 9,_end at ha
+ addi 9,9,_end at l
+2: stw 0,0(8)
+ addi 8,8,4
+ cmplw 8,9
+ blt 2b
+
/* Save the argument pointer and length */
mr 20,6
mr 21,7
More information about the svn-src-head
mailing list