(original) (raw)

Apply by doing: cd /usr/src patch -p0 < 013_altivec.patch Then build and install a new kernel. Index: sys/arch/powerpc/powerpc/trap.c =================================================================== RCS file: /cvs/src/sys/arch/powerpc/powerpc/trap.c,v retrieving revision 1.72 retrieving revision 1.72.4.1 diff -u -r1.72 -r1.72.4.1 --- sys/arch/powerpc/powerpc/trap.c 2005/12/17 07:31:27 1.72 +++ sys/arch/powerpc/powerpc/trap.c 2007/04/26 23:56:59 1.72.4.1 @@ -1,4 +1,4 @@ -/* OpenBSD:trap.c,v1.722005/12/1707:31:27miodExpOpenBSD: trap.c,v 1.72 2005/12/17 07:31:27 miod Exp OpenBSD:trap.c,v1.722005/12/1707:31:27miodExp */ +/* OpenBSD:trap.c,v1.72.4.12007/04/2623:56:59ckuetheExpOpenBSD: trap.c,v 1.72.4.1 2007/04/26 23:56:59 ckuethe Exp OpenBSD:trap.c,v1.72.4.12007/04/2623:56:59ckuetheExp */ /* NetBSD:trap.c,v1.31996/10/1303:31:37christosExpNetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp NetBSD:trap.c,v1.31996/10/1303:31:37christosExp */ /* @@ -645,6 +645,12 @@ trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv); break; #endif + + case EXC_VECAST|EXC_USER: + KERNEL_PROC_LOCK(p); + trapsignal(p, SIGFPE, 0, FPE_FLTRES, sv); + KERNEL_PROC_UNLOCK(p); + break; case EXC_AST|EXC_USER: uvmexp.softs++; Index: sys/arch/powerpc/include/trap.h =================================================================== RCS file: /cvs/src/sys/arch/powerpc/include/trap.h,v retrieving revision 1.6 retrieving revision 1.6.14.1 diff -u -r1.6 -r1.6.14.1 --- sys/arch/powerpc/include/trap.h 2003/04/26 08:01:42 1.6 +++ sys/arch/powerpc/include/trap.h 2007/04/26 23:56:59 1.6.14.1 @@ -1,4 +1,4 @@ -/* OpenBSD:trap.h,v1.62003/04/2608:01:42jmcExpOpenBSD: trap.h,v 1.6 2003/04/26 08:01:42 jmc Exp OpenBSD:trap.h,v1.62003/04/2608:01:42jmcExp */ +/* OpenBSD:trap.h,v1.6.14.12007/04/2623:56:59ckuetheExpOpenBSD: trap.h,v 1.6.14.1 2007/04/26 23:56:59 ckuethe Exp OpenBSD:trap.h,v1.6.14.12007/04/2623:56:59ckuetheExp */ /* NetBSD:trap.h,v1.11996/09/3016:34:35wsExpNetBSD: trap.h,v 1.1 1996/09/30 16:34:35 ws Exp NetBSD:trap.h,v1.11996/09/3016:34:35wsExp */ /* @@ -51,6 +51,7 @@ #define EXC_VEC 0x0f20 /* AltiVec Unavailable */ #define EXC_BPT 0x1300 /* Instruction Breakpoint */ #define EXC_SMI 0x1400 /* System Management Interrupt */ +#define EXC_VECAST 0x1600 /* AltiVec Assist */ /* And these are only on the 603: */ #define EXC_IMISS 0x1000 /* Instruction translation miss */