summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/aviion/aviion/locore.S17
-rw-r--r--sys/arch/m88k/include/param.h6
-rw-r--r--sys/arch/m88k/m88k/eh_common.S11
-rw-r--r--sys/arch/mvme88k/mvme88k/locore.S37
4 files changed, 22 insertions, 49 deletions
diff --git a/sys/arch/aviion/aviion/locore.S b/sys/arch/aviion/aviion/locore.S
index 5e5a15ed0bb..e347733fda5 100644
--- a/sys/arch/aviion/aviion/locore.S
+++ b/sys/arch/aviion/aviion/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.8 2007/12/04 23:43:52 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.9 2007/12/05 22:12:32 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -117,16 +117,9 @@ ASLOCAL(main_start)
/* set cputyp */
ldcr r1, PID
- extu r2, r1, 8<8>
- bcnd.n eq0, r2, 1f
- or.u r13, r0, hi16(_C_LABEL(cputyp))
- or.u r8, r0, hi16(CPU_88110)
- br.n 2f
- or r8, r8, lo16(CPU_88110)
-1:
- or.u r8, r0, hi16(CPU_88100)
- or r8, r8, lo16(CPU_88100)
-2:
+ extu r8, r1, 8<8>
+
+ or.u r13, r0, hi16(_C_LABEL(cputyp))
st r8, r13, lo16(_C_LABEL(cputyp))
/*
@@ -213,7 +206,7 @@ ASLOCAL(main_start)
#ifdef M88110
#ifdef M88100
- cmp r2, r8, CPU_88110 /* r8 contains cputyp */
+ cmp r2, r8, CPU_88110
bb1 ne, r2, 1f /* if it's a 'mc88110, use different vectors */
#endif
or.u r3, r0, hi16(_C_LABEL(m88110_vector_list))
diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h
index 563bf09528a..f643deefa85 100644
--- a/sys/arch/m88k/include/param.h
+++ b/sys/arch/m88k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.10 2007/05/28 21:02:49 thib Exp $ */
+/* $OpenBSD: param.h,v 1.11 2007/12/05 22:12:32 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1988 University of Utah.
@@ -124,8 +124,8 @@ extern int cputyp;
/*
* Values for the cputyp variable.
*/
-#define CPU_88100 0x100
-#define CPU_88110 0x110
+#define CPU_88100 0x00
+#define CPU_88110 0x01
#ifdef M88100
#ifdef M88110
diff --git a/sys/arch/m88k/m88k/eh_common.S b/sys/arch/m88k/m88k/eh_common.S
index 9d8ba04cc6b..1946b9c4a8c 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.41 2007/12/02 21:32:08 miod Exp $ */
+/* $OpenBSD: eh_common.S,v 1.42 2007/12/05 22:12:32 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -2273,11 +2273,10 @@ ASGLOBAL(ast_done)
/* reload the control regs*/
#if defined(M88100) && defined(M88110)
- or.u r1, r0, hi16(_C_LABEL(cputyp))
- ld r30, r1, lo16(_C_LABEL(cputyp))
- cmp r1, r30, CPU_88110
- bb1 ne, r1, _ASM_LABEL(m88100_user_rte)
- br _ASM_LABEL(m88110_user_rte)
+ ldcr r1, PID
+ extu r30, r1, 8<8>
+ bcnd ne0, r30, _ASM_LABEL(m88110_user_rte)
+ /* FALLTHROUGH */
#endif
#ifdef M88100
diff --git a/sys/arch/mvme88k/mvme88k/locore.S b/sys/arch/mvme88k/mvme88k/locore.S
index 0843e814c59..0b9a04d0b7b 100644
--- a/sys/arch/mvme88k/mvme88k/locore.S
+++ b/sys/arch/mvme88k/mvme88k/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.57 2007/12/04 23:43:54 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.58 2007/12/05 22:12:30 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -124,16 +124,8 @@ ASLOCAL(main_start)
/* set cputyp */
ldcr r1, PID
- extu r2, r1, 8<8>
- bcnd.n eq0, r2, 1f
- or.u r13, r0, hi16(_C_LABEL(cputyp))
- or.u r8, r0, hi16(CPU_88110)
- br.n 2f
- or r8, r8, lo16(CPU_88110)
-1:
- or.u r8, r0, hi16(CPU_88100)
- or r8, r8, lo16(CPU_88100)
-2:
+ extu r8, r1, 8<8>
+ or.u r13, r0, hi16(_C_LABEL(cputyp))
st r8, r13, lo16(_C_LABEL(cputyp))
/*
@@ -168,7 +160,7 @@ ASLOCAL(main_start)
* jfriedl@omron.co.jp
*/
- cmp r2, r8, CPU_88110 /* r8 contains cputyp */
+ cmp r2, r8, CPU_88110
bb1 eq, r2, 1f /* if it's a 'mc88110, skip SSBR */
stcr r0, SSBR /* clear this for later */
1:
@@ -216,7 +208,7 @@ ASLOCAL(main_start)
#ifdef M88110
#ifdef M88100
- cmp r2, r8, CPU_88110 /* r8 contains cputyp */
+ cmp r2, r8, CPU_88110
bb1 ne, r2, 1f /* if it's a 'mc88110, use different vectors */
#endif
or.u r3, r0, hi16(_C_LABEL(m88110_vector_list))
@@ -243,22 +235,11 @@ ASLOCAL(main_start)
* ...and we can switch to the u area stack now.
*/
ldcr r10, CPU
- ld r31, r10, CI_CURPCB
+ ld r2, r10, CI_CURPCB
/* call main() - no arguments although main() still defines one */
bsr.n _C_LABEL(main)
- addu r31, r31, USPACE
-
- or.u r2, r0, hi16(_ASM_LABEL(main_panic))
- bsr.n _C_LABEL(panic)
- or r2, r2, lo16(_ASM_LABEL(main_panic))
-
- data
- .align 4
-ASLOCAL(main_panic)
- string "main() returned\0"
- text
- .align 8
+ addu r31, r2, USPACE
#ifdef MULTIPROCESSOR
@@ -271,8 +252,8 @@ GLOBAL(secondary_start)
or.u r31, r0, hi16(_ASM_LABEL(slavestack_end))
or r31, r31, lo16(_ASM_LABEL(slavestack_end))
- or.u r13, r0, hi16(_C_LABEL(cputyp))
- ld r8, r13, lo16(_C_LABEL(cputyp))
+ ldcr r1, PID
+ extu r8, r1, 8<8>
cmp r2, r8, CPU_88110
bb1 eq, r2, 1f