summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc/include
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/powerpc/include
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/powerpc/include')
-rw-r--r--sys/arch/powerpc/include/pcb.h3
-rw-r--r--sys/arch/powerpc/include/psl.h3
-rw-r--r--sys/arch/powerpc/include/reg.h15
-rw-r--r--sys/arch/powerpc/include/trap.h5
4 files changed, 20 insertions, 6 deletions
diff --git a/sys/arch/powerpc/include/pcb.h b/sys/arch/powerpc/include/pcb.h
index dabc3d740c5..680e8ab545d 100644
--- a/sys/arch/powerpc/include/pcb.h
+++ b/sys/arch/powerpc/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.6 2001/09/01 15:49:05 drahn Exp $ */
+/* $OpenBSD: pcb.h,v 1.7 2001/11/13 14:31:52 drahn Exp $ */
/* $NetBSD: pcb.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
@@ -57,6 +57,7 @@ struct pcb {
double fpr[32];
double fpcsr; /* FPCSR stored as double for easier access */
} pcb_fpu; /* Floating point processor */
+ struct vreg *pcb_vr; /* Vector unit */
};
struct md_coredump {
diff --git a/sys/arch/powerpc/include/psl.h b/sys/arch/powerpc/include/psl.h
index 1bf401927b8..ca74f5f959d 100644
--- a/sys/arch/powerpc/include/psl.h
+++ b/sys/arch/powerpc/include/psl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: psl.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */
+/* $OpenBSD: psl.h,v 1.5 2001/11/13 14:31:52 drahn Exp $ */
/* $NetBSD: psl.h,v 1.1 1996/09/30 16:34:32 ws Exp $ */
/*
@@ -37,6 +37,7 @@
/*
* Flags in MSR:
*/
+#define PSL_VEC 0x02000000 /* AltiVec vector unit available */
#define PSL_POW 0x00040000
#define PSL_ILE 0x00010000
#define PSL_EE 0x00008000
diff --git a/sys/arch/powerpc/include/reg.h b/sys/arch/powerpc/include/reg.h
index d3b43ec642a..6cdf7067053 100644
--- a/sys/arch/powerpc/include/reg.h
+++ b/sys/arch/powerpc/include/reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: reg.h,v 1.3 2001/06/29 06:07:09 drahn Exp $ */
+/* $OpenBSD: reg.h,v 1.4 2001/11/13 14:31:52 drahn Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -59,5 +59,18 @@ struct reg {
u_int32_t xer;
u_int32_t mq;
};
+
+struct vreg {
+ u_int32_t vreg[32][4];
+ u_int32_t vscr;
+ u_int32_t vrsave;
+};
+
int process_read_regs __P((struct proc *p, struct reg *regs));
+#ifdef PPC_VECTOR_SUPPORTED
+void save_vec(struct proc *);
+void enable_vec(struct proc *);
+extern struct proc *ppc_vecproc;
+extern struct pool ppc_vecpl;
+#endif /* PPC_VECTOR_SUPPORTED */
#endif /* !_POWERPC_REG_H_ */
diff --git a/sys/arch/powerpc/include/trap.h b/sys/arch/powerpc/include/trap.h
index 219cbd6b83b..a6c05ac2f3e 100644
--- a/sys/arch/powerpc/include/trap.h
+++ b/sys/arch/powerpc/include/trap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */
+/* $OpenBSD: trap.h,v 1.5 2001/11/13 14:31:52 drahn Exp $ */
/* $NetBSD: trap.h,v 1.1 1996/09/30 16:34:35 ws Exp $ */
/*
@@ -47,9 +47,8 @@
#define EXC_SC 0x0c00 /* System Call */
#define EXC_TRC 0x0d00 /* Trace */
#define EXC_FPA 0x0e00 /* Floating-point Assist */
-
-/* The following are only available on 604: */
#define EXC_PERF 0x0f00 /* Performance Monitoring */
+#define EXC_VEC 0x0f20 /* AltiVec Unavailable */
#define EXC_BPT 0x1300 /* Instruction Breakpoint */
#define EXC_SMI 0x1400 /* System Managment Interrupt */