diff options
-rw-r--r-- | sys/arch/mvme88k/include/locore.h | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/mvme188.h | 16 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m187_machdep.c | 23 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m188_machdep.c | 30 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/m197_machdep.c | 22 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 39 |
6 files changed, 30 insertions, 104 deletions
diff --git a/sys/arch/mvme88k/include/locore.h b/sys/arch/mvme88k/include/locore.h index 62b60dbb683..c1fc400f090 100644 --- a/sys/arch/mvme88k/include/locore.h +++ b/sys/arch/mvme88k/include/locore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.h,v 1.30 2005/12/03 16:52:16 miod Exp $ */ +/* $OpenBSD: locore.h,v 1.31 2006/04/13 21:16:15 miod Exp $ */ #ifndef _MACHINE_LOCORE_H_ #define _MACHINE_LOCORE_H_ @@ -20,8 +20,6 @@ int intr_findvec(int, int, int); void myetheraddr(u_char *); void set_cpu_number(cpuid_t); -extern volatile u_int8_t *ivec[]; - /* eh.S */ void sigsys(void); diff --git a/sys/arch/mvme88k/include/mvme188.h b/sys/arch/mvme88k/include/mvme188.h index 90fa6ba7a97..2184e8d7d0f 100644 --- a/sys/arch/mvme88k/include/mvme188.h +++ b/sys/arch/mvme88k/include/mvme188.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mvme188.h,v 1.20 2004/10/01 19:00:51 miod Exp $ */ +/* $OpenBSD: mvme188.h,v 1.21 2006/04/13 21:16:15 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -91,6 +91,17 @@ #define ISTATE_REG 0xfff84088 #define CLRINT_REG 0xfff8408C +#define MVME188_VIRQLV 0xFFF85000 +#define MVME188_VIACK1V 0xFFF85004 +#define MVME188_VIACK2V 0xFFF85008 +#define MVME188_VIACK3V 0xFFF8500C +#define MVME188_VIACK4V 0xFFF85010 +#define MVME188_VIACK5V 0xFFF85014 +#define MVME188_VIACK6V 0xFFF85018 +#define MVME188_VIACK7V 0xFFF8501C +#define MVME188_VIRQV 0xFFF85020 +#define M188_IVEC 0x40 /* vector returned upon MVME188 int */ + #define MVME188_GCSR 0xFFF86000 /* 188 global control and status reg */ #define MVME188_UCSR 0xFFF87000 /* 188 utility control and status reg */ #define MVME188_BASAD 0xFFF87004 /* 188 base address reg */ @@ -363,7 +374,4 @@ #define VME_CMMU_D2 0xfff3f000 #define VME_CMMU_D3 0xfff7f000 -#define M188_IACK 0xFFF85000 -#define M188_IVEC 0x40 /* vector returned upon MVME188 int */ - #endif /* __MACHINE_MVME188_H__ */ diff --git a/sys/arch/mvme88k/mvme88k/m187_machdep.c b/sys/arch/mvme88k/mvme88k/m187_machdep.c index 1dd491e6044..30543e12b38 100644 --- a/sys/arch/mvme88k/mvme88k/m187_machdep.c +++ b/sys/arch/mvme88k/mvme88k/m187_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m187_machdep.c,v 1.7 2005/04/30 16:42:37 miod Exp $ */ +/* $OpenBSD: m187_machdep.c,v 1.8 2006/04/13 21:16:17 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -68,7 +68,6 @@ u_int m187_getipl(void); vaddr_t m187_memsize(void); u_int m187_raiseipl(u_int); u_int m187_setipl(u_int); -void m187_setupiackvectors(void); void m187_startup(void); vaddr_t obiova; @@ -131,21 +130,6 @@ m187_startup() panic("obiova %lx: OBIO not free", obiova); } -void -m187_setupiackvectors() -{ - u_int8_t *vaddr = (u_int8_t *)M187_IACK; - - ivec[0] = vaddr + 0x03; /* We dont use level 0 */ - ivec[1] = vaddr + 0x07; - ivec[2] = vaddr + 0x0b; - ivec[3] = vaddr + 0x0f; - ivec[4] = vaddr + 0x13; - ivec[5] = vaddr + 0x17; - ivec[6] = vaddr + 0x1b; - ivec[7] = vaddr + 0x1f; -} - /* * Device interrupt handler for MVME187 */ @@ -157,12 +141,15 @@ m187_ext_int(u_int v, struct trapframe *eframe) struct intrhand *intr; intrhand_t *list; int ret; + vaddr_t ivec; u_int8_t vec; mask = *(u_int8_t *)M187_IMASK & 0x07; level = *(u_int8_t *)M187_ILEVEL & 0x07; + /* generate IACK and get the vector */ - vec = *ivec[level]; + ivec = M187_IACK + (level << 2) + 0x03; + vec = *(volatile u_int8_t *)ivec; uvmexp.intrs++; diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c index d8d67216038..7791d55cbf2 100644 --- a/sys/arch/mvme88k/mvme88k/m188_machdep.c +++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m188_machdep.c,v 1.12 2005/12/04 14:58:43 miod Exp $ */ +/* $OpenBSD: m188_machdep.c,v 1.13 2006/04/13 21:16:17 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -72,7 +72,6 @@ u_int m188_getipl(void); vaddr_t m188_memsize(void); u_int m188_raiseipl(u_int); u_int m188_setipl(u_int); -void m188_setupiackvectors(void); void m188_startup(void); /* @@ -161,6 +160,9 @@ m188_bootstrap() *(volatile u_int32_t *)IEN1_REG = 0; *(volatile u_int32_t *)IEN2_REG = 0; *(volatile u_int32_t *)IEN3_REG = 0; + + /* supply a vector base for m188ih */ + *(volatile u_int8_t *)MVME188_VIRQV = M188_IVEC; } void @@ -191,26 +193,6 @@ m188_reset() } /* - * fill up ivec array with interrupt response vector addresses. - */ -void -m188_setupiackvectors() -{ - u_int8_t *vaddr = (u_int8_t *)M188_IACK; - - ivec[0] = vaddr; /* We dont use level 0 */ - ivec[1] = vaddr + 0x04; - ivec[2] = vaddr + 0x08; - ivec[3] = vaddr + 0x0c; - ivec[4] = vaddr + 0x10; - ivec[5] = vaddr + 0x14; - ivec[6] = vaddr + 0x18; - ivec[7] = vaddr + 0x1c; - ivec[8] = vaddr + 0x20; /* for self inflicted interrupts */ - *ivec[8] = M188_IVEC; /* supply a vector base for m188ih */ -} - -/* * return next safe spl to reenable interrupts. */ u_int @@ -298,6 +280,7 @@ m188_ext_int(u_int v, struct trapframe *eframe) struct intrhand *intr; intrhand_t *list; int ret, intbit; + vaddr_t ivec; u_int vec; int unmasked = 0; @@ -388,7 +371,8 @@ m188_ext_int(u_int v, struct trapframe *eframe) } vec += SYSCON_VECT; } else if (VME_INTERRUPT_MASK & (1 << intbit)) { - vec = *(u_int32_t *)ivec[level] & VME_VECTOR_MASK; + ivec = MVME188_VIRQLV + (level << 2); + vec = *(volatile u_int32_t *)ivec & VME_VECTOR_MASK; if (vec & VME_BERR_MASK) { printf("VME vec timeout, vec = %x, mask = 0x%b\n", vec, 1 << intbit, IST_STRING); diff --git a/sys/arch/mvme88k/mvme88k/m197_machdep.c b/sys/arch/mvme88k/mvme88k/m197_machdep.c index a2ae7d4b909..1cf9e2786d4 100644 --- a/sys/arch/mvme88k/mvme88k/m197_machdep.c +++ b/sys/arch/mvme88k/mvme88k/m197_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m197_machdep.c,v 1.7 2005/04/30 16:42:37 miod Exp $ */ +/* $OpenBSD: m197_machdep.c,v 1.8 2006/04/13 21:16:17 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -67,7 +67,6 @@ u_int m197_getipl(void); vaddr_t m197_memsize(void); u_int m197_raiseipl(u_int); u_int m197_setipl(u_int); -void m197_setupiackvectors(void); void m197_startup(void); vaddr_t obiova; @@ -147,21 +146,6 @@ m197_startup() panic("obiova %lx: OBIO not free", obiova); } -void -m197_setupiackvectors() -{ - u_int8_t *vaddr = (u_int8_t *)M197_IACK; - - ivec[0] = vaddr + 0x03; /* We dont use level 0 */ - ivec[1] = vaddr + 0x07; - ivec[2] = vaddr + 0x0b; - ivec[3] = vaddr + 0x0f; - ivec[4] = vaddr + 0x13; - ivec[5] = vaddr + 0x17; - ivec[6] = vaddr + 0x1b; - ivec[7] = vaddr + 0x1f; -} - /* * Device interrupt handler for MVME197 */ @@ -173,6 +157,7 @@ m197_ext_int(u_int v, struct trapframe *eframe) struct intrhand *intr; intrhand_t *list; int ret; + vaddr_t ivec; u_int8_t vec; mask = *(u_int8_t *)M197_IMASK & 0x07; @@ -183,7 +168,8 @@ m197_ext_int(u_int v, struct trapframe *eframe) } else { level = *(u_int8_t *)M197_ILEVEL & 0x07; /* generate IACK and get the vector */ - vec = *ivec[level]; + ivec = M197_IACK + (level << 2) + 0x03; + vec = *(volatile u_int8_t *)ivec; } uvmexp.intrs++; diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 71d5df45598..dee6d6430c7 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.176 2005/12/11 21:45:31 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.177 2006/04/13 21:16:18 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -102,7 +102,6 @@ void mvme_bootstrap(void); void savectx(struct pcb *); void secondary_main(void); void secondary_pre_main(void); -void setupiackvectors(void); void vector_init(m88k_exception_vector_area *, unsigned *); void _doboot(void); @@ -110,15 +109,12 @@ extern void setlevel(unsigned int); extern void m187_bootstrap(void); extern vaddr_t m187_memsize(void); -extern void m187_setupiackvectors(void); extern void m187_startup(void); extern void m188_bootstrap(void); extern vaddr_t m188_memsize(void); -extern void m188_setupiackvectors(void); extern void m188_startup(void); extern void m197_bootstrap(void); extern vaddr_t m197_memsize(void); -extern void m197_setupiackvectors(void); extern void m197_startup(void); intrhand_t intr_handlers[NVMEINTR]; @@ -130,12 +126,6 @@ u_int (*md_getipl)(void); u_int (*md_setipl)(u_int); u_int (*md_raiseipl)(u_int); -#ifdef MVME188 -volatile u_int8_t *ivec[8 + 1]; -#else -volatile u_int8_t *ivec[8]; -#endif - int physmem; /* available physical memory, in pages */ struct vm_map *exec_map = NULL; @@ -489,7 +479,6 @@ cpu_startup() */ for (i = 0; i < NVMEINTR; i++) SLIST_INIT(&intr_handlers[i]); - setupiackvectors(); /* * Configure the system. @@ -783,32 +772,6 @@ abort: } } -/* - * fill up ivec array with interrupt response vector addresses. - */ -void -setupiackvectors() -{ - switch (brdtyp) { -#ifdef MVME187 - case BRD_187: - case BRD_8120: - m187_setupiackvectors(); - break; -#endif -#ifdef MVME188 - case BRD_188: - m188_setupiackvectors(); - break; -#endif -#ifdef MVME197 - case BRD_197: - m197_setupiackvectors(); - break; -#endif - } -} - #ifdef MULTIPROCESSOR /* |