svn commit: r304829 - head/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Fri Aug 26 03:36:38 UTC 2016
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 <int0dster_gmail.com>
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 */
More information about the svn-src-head
mailing list