summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-03-23 15:28:11 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-03-23 15:28:11 +0000
commit002272459f0f605584eda3963716faaec3c0cf8a (patch)
tree49827901572c48fa5f1dbc7d92d0be6fd2fc40c7
parent4fef91dac76600b3e376f48755249e53f730ecbd (diff)
Initialize additional BATs (IBAT4-IBAT7 and DBAT4-IBAT7). The rb600 firmware
has these enabled and this leads to memory corruption that (surprisingly) only shows up when running PIE.
-rw-r--r--sys/arch/socppc/socppc/machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index f7c790a8114..86cacdadbe5 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.41 2014/03/22 06:05:45 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.42 2014/03/23 15:28:10 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -249,10 +249,18 @@ initppc(u_int startkernel, u_int endkernel, char *args)
ppc_mtibat1u(0);
ppc_mtibat2u(0);
ppc_mtibat3u(0);
+ ppc_mtibat4u(0);
+ ppc_mtibat5u(0);
+ ppc_mtibat6u(0);
+ ppc_mtibat7u(0);
ppc_mtdbat0u(0);
ppc_mtdbat1u(0);
ppc_mtdbat2u(0);
ppc_mtdbat3u(0);
+ ppc_mtdbat4u(0);
+ ppc_mtdbat5u(0);
+ ppc_mtdbat6u(0);
+ ppc_mtdbat7u(0);
/*
* Set up initial BAT table to only map the lowest 256 MB area