summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-12-05 22:12:33 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-12-05 22:12:33 +0000
commitfd3c05b551cee43749b85427fb4cae3645822e44 (patch)
tree32d7c366512b33335a6bb41b652f388a9f1f996d /sys/arch/mvme88k
parent963dc33e02cf3c4dabfb45b295a903a212bff1b1 (diff)
Make the CPU_88100 and CPU_88110 constants match the architectural number
field from the processor identification register; this allows .S code which needs to decide on the cpu type at runtime to check quicker, without needing to access memory. No functional change.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/locore.S37
1 files changed, 9 insertions, 28 deletions
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