summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2014-03-23 15:28:10 +0000
committerkettenis <kettenis@openbsd.org>2014-03-23 15:28:10 +0000
commiteca03e4b444bec7aaabee160e37341fdb9b76784 (patch)
tree0b59280cfbcd8213e3f97a6ab5bd4c0b9fe07456
parentRetire the old concat() function. (diff)
downloadwireguard-openbsd-eca03e4b444bec7aaabee160e37341fdb9b76784.tar.xz
wireguard-openbsd-eca03e4b444bec7aaabee160e37341fdb9b76784.zip
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