summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-11-13 14:31:53 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-11-13 14:31:53 +0000
commit661e8fbc2f4b11788fc42fa5a38571b6fd93fc00 (patch)
tree0df2eb3234baf8b5608206ffee5b1174dafafc1a /sys/arch/macppc
parentbb78d2489d1784bc41de0246d10a10951c377a71 (diff)
Add AltiVec support to powerpc/macppc. This is not currently enabled because
the 'as' in openbsd source tree does not yet support altivec instructions. The pieces to enable it have been put in macppc/conf/GENERIC and macppc/conf/Makefile.macppc in comments. Once 'as' is updated the kernel option should be removed.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/conf/GENERIC3
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc3
-rw-r--r--sys/arch/macppc/macppc/machdep.c10
3 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/macppc/conf/GENERIC b/sys/arch/macppc/conf/GENERIC
index cd63483ec2f..b1efa944efa 100644
--- a/sys/arch/macppc/conf/GENERIC
+++ b/sys/arch/macppc/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.5 2001/10/03 14:45:37 drahn Exp $
+# $OpenBSD: GENERIC,v 1.6 2001/11/13 14:31:52 drahn Exp $
#
# PPC GENERIC config file
#
@@ -17,6 +17,7 @@ option PCIVERBOSE
option USBVERBOSE
#option MACOBIOVERBOSE
option WSEMUL_NO_DUMB
+#option PPC_VECTOR_SUPPORTED
option USER_PCICONF # user-space PCI configuration
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index 8035d4672cd..002ff9ffd4e 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.1 2001/09/01 15:59:31 drahn Exp $
+# $OpenBSD: Makefile.macppc,v 1.2 2001/11/13 14:31:52 drahn Exp $
#
# Makefile for OpenBSD PowerPC
#
@@ -45,6 +45,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL \
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main
CFLAGS= ${DEBUG} ${CWARNFLAGS} -O2 -msoft-float
+#CFLAGS= ${DEBUG} ${CWARNFLAGS} -O2 -msoft-float -Wa,-maltivec
AFLAGS= -D_LOCORE
LINKFLAGS= -N -Ttext 100074 -e start
STRIPFLAGS= -d
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 1c807835f0e..b5749119721 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.13 2001/11/09 15:25:55 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.14 2001/11/13 14:31:52 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -102,6 +102,9 @@ struct pmap *curpm;
struct proc *fpuproc;
extern struct user *proc0paddr;
+#ifdef PPC_VECTOR_SUPPORTED
+struct pool ppc_vecpl;
+#endif /* PPC_VECTOR_SUPPORTED */
/*
* Declare these as initialized data so we can patch them.
@@ -478,6 +481,11 @@ where = 3;
*/
(void)power4e_get_eth_addr();
+#ifdef PPC_VECTOR_SUPPORTED
+ pool_init(&ppc_vecpl, sizeof(struct vreg), 16, 0, 0, "ppcvec",
+ 0, NULL, NULL, M_SUBPROC);
+#endif /* PPC_VECTOR_SUPPORTED */
+
}
void ofw_dbg(char *str)
{