summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2007-12-22 19:38:33 +0000
committermiod <miod@openbsd.org>2007-12-22 19:38:33 +0000
commit00e96f9aaacd4b500b0fafc2e00bdfc9832461b0 (patch)
treeee8bf59306f6ae1c5bdf1b4a732a0a86e2da66f8
parentjust call getpwnam(NTPD_USER) once; ok henning@ (diff)
downloadwireguard-openbsd-00e96f9aaacd4b500b0fafc2e00bdfc9832461b0.tar.xz
wireguard-openbsd-00e96f9aaacd4b500b0fafc2e00bdfc9832461b0.zip
Make sure we have a real stack when invoking getipl() during exceptions.
Fits in the brown-paperbag bug category.
-rw-r--r--sys/arch/m88k/m88k/eh_common.S22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/m88k/m88k/eh_common.S b/sys/arch/m88k/m88k/eh_common.S
index 47054ef2b95..c5fc334612e 100644
--- a/sys/arch/m88k/m88k/eh_common.S
+++ b/sys/arch/m88k/m88k/eh_common.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: eh_common.S,v 1.43 2007/12/21 23:56:54 miod Exp $ */
+/* $OpenBSD: eh_common.S,v 1.44 2007/12/22 19:38:33 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -1415,11 +1415,7 @@ ASLOCAL(m88100_fpu_enable)
st r26, r31, GENREG_OFF(26)
st r27, r31, GENREG_OFF(27)
st r28, r31, GENREG_OFF(28)
-
- /* get and save IPL */
- bsr.n _C_LABEL(getipl)
- st r29, r31, GENREG_OFF(29)
- st r2, r31, EF_MASK
+ st r29, r31, GENREG_OFF(29)
/*
* SR1: free
@@ -1461,6 +1457,10 @@ ASLOCAL(m88100_fpu_enable)
addu r31, r31, USPACE /* point at proper end */
1:
+ /* get and save IPL */
+ bsr _C_LABEL(getipl)
+ st r2, r30, EF_MASK
+
/*
* here - r30 holds a pointer to the exception frame.
* r31 is a pointer to the kernel stack/interrupt stack.
@@ -2047,11 +2047,7 @@ ASLOCAL(m88110_shadow_enable)
st r26, r31, GENREG_OFF(26)
st r27, r31, GENREG_OFF(27)
st r28, r31, GENREG_OFF(28)
-
- /* get and save IPL */
- bsr.n _C_LABEL(getipl)
- st r29, r31, GENREG_OFF(29)
- st r2, r31, EF_MASK
+ st r29, r31, GENREG_OFF(29)
/*
* SR1: free
@@ -2090,6 +2086,10 @@ ASLOCAL(m88110_shadow_enable)
addu r31, r31, USPACE /* point at proper end */
1:
+ /* get and save IPL */
+ bsr _C_LABEL(getipl)
+ st r2, r30, EF_MASK
+
/*
* here - r30 holds a pointer to the exception frame.
* r31 is a pointer to the kernel stack/interrupt stack.