From owner-svn-src-all@freebsd.org Fri Aug 26 03:36:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0510BC4700; Fri, 26 Aug 2016 03:36:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7307A1210; Fri, 26 Aug 2016 03:36:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7Q3abqe002523; Fri, 26 Aug 2016 03:36:37 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7Q3abC4002522; Fri, 26 Aug 2016 03:36:37 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201608260336.u7Q3abC4002522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 26 Aug 2016 03:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304829 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 26 Aug 2016 03:36:38 -0000 Author: jhibbits Date: Fri Aug 26 03:36:37 2016 New Revision: 304829 URL: https://svnweb.freebsd.org/changeset/base/304829 Log: Prevent BSS from being cleared twice on BookE Summary: First time BSS is cleared in booke_init(), Second time it's cleared in powerpc_init(). Any variable initialized between two those guys gets wiped out what is wrong. In particular it wipes tlb1_entries initialized by tlb1_init(), which was fine when tlb1_init() was called a second time, but this was removed in r304656. Submitted by: Ivan Krivonos Differential Revision: https://reviews.freebsd.org/D7638 Modified: head/sys/powerpc/powerpc/machdep.c Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Fri Aug 26 02:46:47 2016 (r304828) +++ head/sys/powerpc/powerpc/machdep.c Fri Aug 26 03:36:37 2016 (r304829) @@ -284,8 +284,14 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #endif } } else { +#if !defined(BOOKE) + /* + * On BOOKE the BSS is already cleared and some variables + * initialized. Do not wipe them out. + */ bzero(__sbss_start, __sbss_end - __sbss_start); bzero(__bss_start, _end - __bss_start); +#endif init_static_kenv(NULL, 0); } /* Store boot environment state */