aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2005-07-30 11:14:31 +0000
committerPeter Grehan <grehan@FreeBSD.org>2005-07-30 11:14:31 +0000
commitebc2aa7496f556008d0ebd3ccb7f336e397fc9d0 (patch)
treea64d06e4aae330b1b275ad706f9ce8ee75083f0a /sys
parent3419317c321ece920138023e6f6675c8f5dc7c06 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/aim/machdep.c3
-rw-r--r--sys/powerpc/aim/trap.c5
-rw-r--r--sys/powerpc/aim/trap_subr.S8
-rw-r--r--sys/powerpc/powerpc/machdep.c3
-rw-r--r--sys/powerpc/powerpc/trap.c5
-rw-r--r--sys/powerpc/powerpc/trap_subr.S8
6 files changed, 32 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 75b59186187e0..a74cc27286e49 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -247,6 +247,7 @@ extern void *dsitrap, *dsisize;
extern void *decrint, *decrsize;
extern void *extint, *extsize;
extern void *dblow, *dbsize;
+extern void *vectrap, *vectrapsize;
void
powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
@@ -335,6 +336,8 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
bcopy(&trapcode, (void *)EXC_SC, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_TRC, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_FPA, (size_t)&trapsize);
+ bcopy(&vectrap, (void *)EXC_VEC, (size_t)&vectrapsize);
+ bcopy(&trapcode, (void *)EXC_VECAST, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_THRM, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_BPT, (size_t)&trapsize);
#ifdef KDB
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 669bb60b939d5..85bdab95ccd18 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -199,6 +199,11 @@ trap(struct trapframe *frame)
enable_vec(td);
frame->srr1 |= PSL_VEC;
break;
+#else
+ case EXC_VEC:
+ case EXC_VECAST:
+ sig = SIGILL;
+ break;
#endif /* ALTIVEC */
case EXC_ALI:
diff --git a/sys/powerpc/aim/trap_subr.S b/sys/powerpc/aim/trap_subr.S
index 60435dd834818..c7199171df037 100644
--- a/sys/powerpc/aim/trap_subr.S
+++ b/sys/powerpc/aim/trap_subr.S
@@ -443,6 +443,14 @@ CNAME(trapexit):
FRAME_LEAVE(PC_TEMPSAVE)
rfi
+/*
+ * Temporary: vector-unavailable traps are directed to vector-assist traps
+ */
+ .globl CNAME(vectrap),CNAME(vectrapsize)
+CNAME(vectrap):
+ ba EXC_VECAST
+CNAME(vectrapsize) = .-CNAME(vectrap)
+
#if defined(KDB)
/*
* Deliberate entry to dbtrap
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 75b59186187e0..a74cc27286e49 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -247,6 +247,7 @@ extern void *dsitrap, *dsisize;
extern void *decrint, *decrsize;
extern void *extint, *extsize;
extern void *dblow, *dbsize;
+extern void *vectrap, *vectrapsize;
void
powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
@@ -335,6 +336,8 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
bcopy(&trapcode, (void *)EXC_SC, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_TRC, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_FPA, (size_t)&trapsize);
+ bcopy(&vectrap, (void *)EXC_VEC, (size_t)&vectrapsize);
+ bcopy(&trapcode, (void *)EXC_VECAST, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_THRM, (size_t)&trapsize);
bcopy(&trapcode, (void *)EXC_BPT, (size_t)&trapsize);
#ifdef KDB
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index 669bb60b939d5..85bdab95ccd18 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -199,6 +199,11 @@ trap(struct trapframe *frame)
enable_vec(td);
frame->srr1 |= PSL_VEC;
break;
+#else
+ case EXC_VEC:
+ case EXC_VECAST:
+ sig = SIGILL;
+ break;
#endif /* ALTIVEC */
case EXC_ALI:
diff --git a/sys/powerpc/powerpc/trap_subr.S b/sys/powerpc/powerpc/trap_subr.S
index 60435dd834818..c7199171df037 100644
--- a/sys/powerpc/powerpc/trap_subr.S
+++ b/sys/powerpc/powerpc/trap_subr.S
@@ -443,6 +443,14 @@ CNAME(trapexit):
FRAME_LEAVE(PC_TEMPSAVE)
rfi
+/*
+ * Temporary: vector-unavailable traps are directed to vector-assist traps
+ */
+ .globl CNAME(vectrap),CNAME(vectrapsize)
+CNAME(vectrap):
+ ba EXC_VECAST
+CNAME(vectrapsize) = .-CNAME(vectrap)
+
#if defined(KDB)
/*
* Deliberate entry to dbtrap