Fix long-standing bug in NetBSD/pmax interrupt initalization on
Turbochannel machines with an IOASIC. After an interrupt is taken, the IOASIC interrupt enable mask is and'ed with the kernel's interrupt-mask variable. This masks off any interrupts that were enabled after the hardware interrupt-enable mask was set. Due to this bug all iynterrupts must be enabled before the first interrupt is taken. (Interrupts enabled later aren't on in the ioasic intr-mask register, so they aren't on in (sirm & kernelmask), which is what used to get written back to the ioasic interrupt-mask register. Fixed, and tested on on 3MAX+ but not xine/3min. If this patch perchance breaks on Xines or 3mins, the old code can be re-enabled by changing the #if 0 in machdep.c to #if 1.
This commit is contained in:
parent
4c8828e743
commit
03c9dc7a48
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.6 1995/01/18 06:42:56 mellon Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.7 1995/05/04 19:48:46 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -172,6 +172,17 @@ configure()
|
|||
drp->d_name, i);
|
||||
tc_slot_info[i].intr = drp->d_intr;
|
||||
tc_slot_info[i].unit = cp->pmax_unit;
|
||||
|
||||
/*
|
||||
* Only enable interrupts if there is an
|
||||
* interrupt handler for it. (e.g., PMAG-BA
|
||||
* can't disable the vertical retrace interrupt
|
||||
* and we might want to ignore it).
|
||||
*/
|
||||
printf("autoenable %s pri %d\n",
|
||||
drp->d_name, i);
|
||||
(*tc_enable_interrupt)(i, 1);
|
||||
/*cp->pmax_alive = 1;*/ /*XXX*/
|
||||
}
|
||||
break;
|
||||
#endif /* DS5000 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.27 1995/05/01 17:35:45 mellon Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.28 1995/05/04 19:48:41 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -1675,20 +1675,22 @@ tc_find_all_options()
|
|||
if (cp->pmax_addr == (char *)QUES) {
|
||||
cp->pmax_addr = (char *)sl->k1seg_address;
|
||||
cp->pmax_pri = i;
|
||||
/*
|
||||
* Only enable interrupts if there is an
|
||||
* interrupt handler for it. (e.g., PMAG-BA
|
||||
* can't disable the vertical retrace interrupt
|
||||
* and we might want to ignore it).
|
||||
*/
|
||||
if (drp->d_intr)
|
||||
/* #ifdef this back in if it breaks */
|
||||
#if 0
|
||||
if (pmax_boardtype == DS_3MIN ||
|
||||
pmax_boardtype == DS_MAXINE)
|
||||
if (drp->d_intr) {
|
||||
printf("Enabling %s, slot %d\n",
|
||||
drp->d_name, i);
|
||||
(*tc_enable_interrupt)(i, 1);
|
||||
}
|
||||
#endif
|
||||
cp->pmax_alive = 1;
|
||||
break;
|
||||
}
|
||||
if (cp->pmax_addr != (char *)sl->k1seg_address) {
|
||||
cp->pmax_addr = (char *)QUES;
|
||||
printf("%s: device not at configued address (expected at %x, found at %x)\n",
|
||||
printf("%s: device not at configured address (expected at %x, found at %x)\n",
|
||||
drp->d_name,
|
||||
cp->pmax_addr, sl->k1seg_address);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue