Date: Thu, 18 Jan 2018 07:41:05 +0000 (UTC) From: Wojciech Macek <wma@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328111 - head/sys/powerpc/powerpc Message-ID: <201801180741.w0I7f5xm055308@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wma Date: Thu Jan 18 07:41:04 2018 New Revision: 328111 URL: https://svnweb.freebsd.org/changeset/base/328111 Log: PPC: machdep, zero BSS always but BookE Zero BSS always. The only case when this operation is ommitted is when booting on BookE. Created by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Reviewed by: imp, nwhitehorn Differential revision: https://reviews.freebsd.org/D13948 Sponsored by: QCM Technologies Modified: head/sys/powerpc/powerpc/machdep.c Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Thu Jan 18 07:38:54 2018 (r328110) +++ head/sys/powerpc/powerpc/machdep.c Thu Jan 18 07:41:04 2018 (r328111) @@ -260,6 +260,15 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs if (mdp_cookie != 0xfb5d104d) mdp = NULL; +#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 + #ifdef AIM /* * If running from an FDT, make sure we are in real mode to avoid @@ -293,14 +302,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs #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(init_kenv, sizeof(init_kenv)); ofw_bootargs = true; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801180741.w0I7f5xm055308>