summaryrefslogtreecommitdiff
path: root/sys/arch/luna88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-05-08 14:03:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-05-08 14:03:36 +0000
commitac5c8692e0df20716a5d9f9bf5c5218fa0b8dff4 (patch)
treef5178f09efda927b517fd9786aa4fc499341e2c7 /sys/arch/luna88k
parent9ef8006bfb0efa3753205f60b8ec197299f26bef (diff)
Clean the internal m88k trap type codes; while there, simplify and
factorize the build of the VBR page betweem luna88k and mvme88k. Tested by aoyama@ and I.
Diffstat (limited to 'sys/arch/luna88k')
-rw-r--r--sys/arch/luna88k/include/locore.h3
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c56
2 files changed, 2 insertions, 57 deletions
diff --git a/sys/arch/luna88k/include/locore.h b/sys/arch/luna88k/include/locore.h
index 00d85fab2c1..35d2442e99e 100644
--- a/sys/arch/luna88k/include/locore.h
+++ b/sys/arch/luna88k/include/locore.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.h,v 1.7 2005/12/03 16:52:14 miod Exp $ */
+/* $OpenBSD: locore.h,v 1.8 2006/05/08 14:03:34 miod Exp $ */
#ifndef _MACHINE_LOCORE_H_
#define _MACHINE_LOCORE_H_
@@ -21,7 +21,6 @@ void set_cpu_number(cpuid_t);
/* eh.S */
void sigsys(void);
-void sigtrap(void);
void stepbpt(void);
void userbpt(void);
void syscall_handler(void);
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index fa7aa4db21f..5cfd9f0228a 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.30 2005/12/11 21:36:04 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.31 2006/05/08 14:03:34 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -104,10 +104,6 @@
#include <ddb/db_output.h> /* db_printf() */
#endif /* DDB */
-typedef struct {
- unsigned word_one, word_two;
-} m88k_exception_vector_area;
-
caddr_t allocsys(caddr_t);
void consinit(void);
void dumpconf(void);
@@ -121,7 +117,6 @@ void savectx(struct pcb *);
void setlevel(unsigned int);
void slave_pre_main(void);
int slave_main(void);
-void vector_init(m88k_exception_vector_area *, unsigned *);
vaddr_t size_memory(void);
void powerdown(void);
@@ -1319,55 +1314,6 @@ nvram_by_symbol(symbol)
return value;
}
-#define SIGSYS_MAX 501
-#define SIGTRAP_MAX 510
-
-#define EMPTY_BR 0xc0000000 /* empty "br" instruction */
-#define NO_OP 0xf4005800 /* "or r0, r0, r0" */
-
-#define BRANCH(FROM, TO) \
- (EMPTY_BR | ((unsigned)(TO) - (unsigned)(FROM)) >> 2)
-
-#define SET_VECTOR(NUM, VALUE) \
- do { \
- vector[NUM].word_one = NO_OP; \
- vector[NUM].word_two = BRANCH(&vector[NUM].word_two, VALUE); \
- } while (0)
-
-/*
- * vector_init(vector, vector_init_list)
- *
- * This routine sets up the m88k vector table for the running processor.
- * It is called with a very little stack, and interrupts disabled,
- * so don't call any other functions!
- */
-void
-vector_init(m88k_exception_vector_area *vector, unsigned *vector_init_list)
-{
- unsigned num;
- unsigned vec;
-
- for (num = 0; (vec = vector_init_list[num]) != END_OF_VECTOR_LIST;
- num++) {
- if (vec != UNKNOWN_HANDLER)
- SET_VECTOR(num, vec);
- }
-
- for (; num <= SIGSYS_MAX; num++)
- SET_VECTOR(num, sigsys);
-
- for (; num <= SIGTRAP_MAX; num++)
- SET_VECTOR(num, sigtrap);
-
- SET_VECTOR(450, syscall_handler);
- SET_VECTOR(451, cache_flush_handler);
- SET_VECTOR(504, stepbpt);
- SET_VECTOR(511, userbpt);
-
- /* GCC will by default produce explicit trap 503 for division by zero */
- SET_VECTOR(503, vector_init_list[T_ZERODIV]);
-}
-
/*
* return next safe spl to reenable interrupts.
*/