From owner-svn-src-all@FreeBSD.ORG Fri Dec 16 23:40:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46ED2106564A; Fri, 16 Dec 2011 23:40:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35BB78FC0A; Fri, 16 Dec 2011 23:40:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBGNevtD032530; Fri, 16 Dec 2011 23:40:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBGNevbe032528; Fri, 16 Dec 2011 23:40:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112162340.pBGNevbe032528@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 16 Dec 2011 23:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228605 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 23:40:57 -0000 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@ha + addi 8,8,_edata@l + lis 9,_end@ha + addi 9,9,_end@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