mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
informal discussion between Bruce Evans <bde@zeta.org.au>,
Peter Wemm <peter@spinner.DIALix.COM>, Steve Passe <smp@csn.net> removed all the IPI_INTS code. made the XFAST_IPI32 code default, renaming Xfastipi32 to Xinvltlb. cleanup of i386/isa/isa_device.h to eliminate SMP dependancies: made the id_irq member of struct isa_device an u_int. made the id_drq member of struct isa_device an int. removed all other '#ifdefs' concerning SMP & APIC_IO. removed SMP/APIC_IO dependancies from if_ze.c.
This commit is contained in:
parent
2897614119
commit
296bffc9c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25205
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)icu.h 5.6 (Berkeley) 5/9/91
|
||||
* $Id: icu.h,v 1.10 1997/02/22 09:36:13 peter Exp $
|
||||
* $Id: icu.h,v 1.11 1997/04/26 11:45:53 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -106,8 +106,10 @@ INTRDIS( unsigned s )
|
||||
#if 0
|
||||
#ifdef PC98
|
||||
#define SET_ICUS() (outb(IO_ICU1 + 2, imen), outb(IU_ICU2 + 2, imen >> 8))
|
||||
#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff)
|
||||
#else /* IBM-PC */
|
||||
#define SET_ICUS() (outb(IO_ICU1 + 1, imen), outb(IU_ICU2 + 1, imen >> 8))
|
||||
#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff)
|
||||
#endif /* PC98 */
|
||||
#else
|
||||
/*
|
||||
@ -116,8 +118,11 @@ INTRDIS( unsigned s )
|
||||
*/
|
||||
#ifdef PC98
|
||||
#define SET_ICUS() (outb(0x02, imen), outb(0x0a, imen >> 8))
|
||||
/* XXX is this correct? */
|
||||
#define INTRGET() ((inb(0x0a) << 8 | inb(0x02)) & 0xffff)
|
||||
#else
|
||||
#define SET_ICUS() (outb(0x21, imen), outb(0xa1, imen >> 8))
|
||||
#define INTRGET() ((inb(0xa1) << 8 | inb(0x21)) & 0xffff)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -160,14 +165,8 @@ INTRDIS( unsigned s )
|
||||
|
||||
#if defined(APIC_IO)
|
||||
|
||||
#include <machine/apic.h>
|
||||
#if defined(IPI_INTS)
|
||||
/* 32-47: ISA IRQ0-IRQ15, 48-55: IO APIC IRQ16-IRQ23, 56-59: LOCAL APIC IPI */
|
||||
#define ICU_LEN 28
|
||||
#else
|
||||
/* 32-47: ISA IRQ0-IRQ15, 48-55: IO APIC IRQ16-IRQ23 */
|
||||
#define ICU_LEN 24
|
||||
#endif /* IPI_INTS */
|
||||
|
||||
#else
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.80 1997/03/28 01:02:17 ache Exp $
|
||||
* $Id: isa.c,v 1.81 1997/04/26 11:46:00 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -114,10 +114,6 @@ static inthand_t *fastintr[ICU_LEN] = {
|
||||
&IDTVEC(fastintr18), &IDTVEC(fastintr19),
|
||||
&IDTVEC(fastintr20), &IDTVEC(fastintr21),
|
||||
&IDTVEC(fastintr22), &IDTVEC(fastintr23)
|
||||
#if defined(IPI_INTS)
|
||||
/* XXX probably NOT needed, we register_intr(slowintr[I]) */
|
||||
, &IDTVEC(ipi24), &IDTVEC(ipi25), &IDTVEC(ipi26), &IDTVEC(ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
};
|
||||
|
||||
@ -129,9 +125,6 @@ static inthand_t *slowintr[ICU_LEN] = {
|
||||
#if defined(APIC_IO)
|
||||
, &IDTVEC(intr16), &IDTVEC(intr17), &IDTVEC(intr18), &IDTVEC(intr19),
|
||||
&IDTVEC(intr20), &IDTVEC(intr21), &IDTVEC(intr22), &IDTVEC(intr23)
|
||||
#if defined(IPI_INTS)
|
||||
, &IDTVEC(ipi24), &IDTVEC(ipi25), &IDTVEC(ipi26), &IDTVEC(ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* from: vector.s, 386BSD 0.1 unknown origin
|
||||
* $Id: vector.s,v 1.25 1997/02/22 09:37:23 peter Exp $
|
||||
* $Id: vector.s,v 1.26 1997/04/26 11:46:07 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -343,47 +343,23 @@ __CONCAT(Xresume,irq_num): ; \
|
||||
addl $4+4,%esp ; \
|
||||
iret
|
||||
|
||||
|
||||
#if defined(APIC_IO) && defined(IPI_INTS)
|
||||
/*
|
||||
* A simple IPI_INTR() macro based on a heavily cut down FAST_INTR().
|
||||
* call it's handler, EOI and return.
|
||||
*/
|
||||
#define IPI_INTR(irq_num, vec_name) \
|
||||
.text ; \
|
||||
SUPERALIGN_TEXT ; \
|
||||
IDTVEC(vec_name) ; \
|
||||
pushl %eax ; /* save only call-used registers */ \
|
||||
pushl %ecx ; \
|
||||
pushl %edx ; \
|
||||
pushl %ds ; \
|
||||
MAYBE_PUSHL_ES ; \
|
||||
movl $KDSEL,%eax ; \
|
||||
movl %ax,%ds ; \
|
||||
MAYBE_MOVW_AX_ES ; \
|
||||
pushl _intr_unit + (irq_num) * 4 ; \
|
||||
call *_intr_handler + (irq_num) * 4 ; \
|
||||
ENABLE_APIC ; \
|
||||
addl $4,%esp ; \
|
||||
incl _cnt+V_INTR ; /* book-keeping can wait */ \
|
||||
movl _intr_countp + (irq_num) * 4,%eax ; \
|
||||
incl (%eax) ; \
|
||||
MAYBE_POPL_ES ; \
|
||||
popl %ds ; \
|
||||
popl %edx ; \
|
||||
popl %ecx ; \
|
||||
popl %eax ; \
|
||||
iret
|
||||
#endif /* APIC_IO && IPI_INTS */
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
#if defined(APIC_IO)
|
||||
.text
|
||||
SUPERALIGN_TEXT
|
||||
.globl _Xfastipi32
|
||||
_Xfastipi32:
|
||||
.globl _Xinvltlb
|
||||
_Xinvltlb:
|
||||
pushl %eax
|
||||
movl %cr3, %eax
|
||||
movl %eax, %cr3
|
||||
#if 0
|
||||
/** XXX FIXME: convert to Bruces suggested 'ss' style, eliminating %ds */
|
||||
ss
|
||||
incl _ipihits
|
||||
ss
|
||||
movl _apic_base, %eax
|
||||
ss
|
||||
movl $0, APIC_EOI(%eax)
|
||||
#else
|
||||
pushl %ds
|
||||
movl $KDSEL,%eax
|
||||
movl %ax,%ds
|
||||
@ -391,9 +367,10 @@ _Xfastipi32:
|
||||
movl _apic_base, %eax
|
||||
movl $0, APIC_EOI(%eax)
|
||||
popl %ds
|
||||
#endif
|
||||
popl %eax
|
||||
iret
|
||||
#endif /* XFAST_IPI32 */
|
||||
#endif /* APIC_IO */
|
||||
|
||||
MCOUNT_LABEL(bintr)
|
||||
FAST_INTR(0,fastintr0, ENABLE_ICU1)
|
||||
@ -447,12 +424,6 @@ MCOUNT_LABEL(bintr)
|
||||
INTR(21,intr21, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(22,intr22, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(23,intr23, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
#if defined(IPI_INTS)
|
||||
IPI_INTR(24, ipi24)
|
||||
IPI_INTR(25, ipi25)
|
||||
IPI_INTR(26, ipi26)
|
||||
IPI_INTR(27, ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
MCOUNT_LABEL(eintr)
|
||||
|
||||
@ -476,11 +447,7 @@ imasks: /* masks for interrupt handlers */
|
||||
.space NHWI*4 /* padding; HWI masks are elsewhere */
|
||||
|
||||
#if defined(APIC_IO)
|
||||
#if defined(IPI_INTS)
|
||||
/* these 4 IPI slots are counted as HARDWARE INTs, ie NHWI, above */
|
||||
#else
|
||||
.long 0, 0, 0, 0 /* padding */
|
||||
#endif /* IPI_INTS */
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, SWI_CLOCK_MASK, SWI_AST_MASK
|
||||
#else
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, 0, 0, 0, 0, 0, 0
|
||||
@ -502,19 +469,14 @@ _ivectors:
|
||||
.long _Xintr12, _Xintr13, _Xintr14, _Xintr15
|
||||
.long _Xintr16, _Xintr17, _Xintr18, _Xintr19
|
||||
.long _Xintr20, _Xintr21, _Xintr22, _Xintr23
|
||||
#if defined(IPI_INTS)
|
||||
.long _Xipi24, _Xipi25, _Xipi26, _Xipi27
|
||||
#endif /* IPI_INTS */
|
||||
|
||||
/* active flag for lazy masking */
|
||||
iactive:
|
||||
.long 0
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
.globl _ipihits
|
||||
_ipihits:
|
||||
.long 0
|
||||
#endif /* XFAST_IPI32 */
|
||||
|
||||
#if defined(TEST_CPUHITS)
|
||||
.globl _cpuhits
|
||||
@ -571,12 +533,6 @@ _intrnames:
|
||||
.asciz "stray irq21"
|
||||
.asciz "stray irq22"
|
||||
.asciz "stray irq23"
|
||||
#if defined(IPI_INTS)
|
||||
.asciz "stray irq24"
|
||||
.asciz "stray irq25"
|
||||
.asciz "stray irq26"
|
||||
.asciz "stray irq27"
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
_eintrnames:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* from: vector.s, 386BSD 0.1 unknown origin
|
||||
* $Id: vector.s,v 1.25 1997/02/22 09:37:23 peter Exp $
|
||||
* $Id: vector.s,v 1.26 1997/04/26 11:46:07 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -343,47 +343,23 @@ __CONCAT(Xresume,irq_num): ; \
|
||||
addl $4+4,%esp ; \
|
||||
iret
|
||||
|
||||
|
||||
#if defined(APIC_IO) && defined(IPI_INTS)
|
||||
/*
|
||||
* A simple IPI_INTR() macro based on a heavily cut down FAST_INTR().
|
||||
* call it's handler, EOI and return.
|
||||
*/
|
||||
#define IPI_INTR(irq_num, vec_name) \
|
||||
.text ; \
|
||||
SUPERALIGN_TEXT ; \
|
||||
IDTVEC(vec_name) ; \
|
||||
pushl %eax ; /* save only call-used registers */ \
|
||||
pushl %ecx ; \
|
||||
pushl %edx ; \
|
||||
pushl %ds ; \
|
||||
MAYBE_PUSHL_ES ; \
|
||||
movl $KDSEL,%eax ; \
|
||||
movl %ax,%ds ; \
|
||||
MAYBE_MOVW_AX_ES ; \
|
||||
pushl _intr_unit + (irq_num) * 4 ; \
|
||||
call *_intr_handler + (irq_num) * 4 ; \
|
||||
ENABLE_APIC ; \
|
||||
addl $4,%esp ; \
|
||||
incl _cnt+V_INTR ; /* book-keeping can wait */ \
|
||||
movl _intr_countp + (irq_num) * 4,%eax ; \
|
||||
incl (%eax) ; \
|
||||
MAYBE_POPL_ES ; \
|
||||
popl %ds ; \
|
||||
popl %edx ; \
|
||||
popl %ecx ; \
|
||||
popl %eax ; \
|
||||
iret
|
||||
#endif /* APIC_IO && IPI_INTS */
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
#if defined(APIC_IO)
|
||||
.text
|
||||
SUPERALIGN_TEXT
|
||||
.globl _Xfastipi32
|
||||
_Xfastipi32:
|
||||
.globl _Xinvltlb
|
||||
_Xinvltlb:
|
||||
pushl %eax
|
||||
movl %cr3, %eax
|
||||
movl %eax, %cr3
|
||||
#if 0
|
||||
/** XXX FIXME: convert to Bruces suggested 'ss' style, eliminating %ds */
|
||||
ss
|
||||
incl _ipihits
|
||||
ss
|
||||
movl _apic_base, %eax
|
||||
ss
|
||||
movl $0, APIC_EOI(%eax)
|
||||
#else
|
||||
pushl %ds
|
||||
movl $KDSEL,%eax
|
||||
movl %ax,%ds
|
||||
@ -391,9 +367,10 @@ _Xfastipi32:
|
||||
movl _apic_base, %eax
|
||||
movl $0, APIC_EOI(%eax)
|
||||
popl %ds
|
||||
#endif
|
||||
popl %eax
|
||||
iret
|
||||
#endif /* XFAST_IPI32 */
|
||||
#endif /* APIC_IO */
|
||||
|
||||
MCOUNT_LABEL(bintr)
|
||||
FAST_INTR(0,fastintr0, ENABLE_ICU1)
|
||||
@ -447,12 +424,6 @@ MCOUNT_LABEL(bintr)
|
||||
INTR(21,intr21, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(22,intr22, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(23,intr23, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
#if defined(IPI_INTS)
|
||||
IPI_INTR(24, ipi24)
|
||||
IPI_INTR(25, ipi25)
|
||||
IPI_INTR(26, ipi26)
|
||||
IPI_INTR(27, ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
MCOUNT_LABEL(eintr)
|
||||
|
||||
@ -476,11 +447,7 @@ imasks: /* masks for interrupt handlers */
|
||||
.space NHWI*4 /* padding; HWI masks are elsewhere */
|
||||
|
||||
#if defined(APIC_IO)
|
||||
#if defined(IPI_INTS)
|
||||
/* these 4 IPI slots are counted as HARDWARE INTs, ie NHWI, above */
|
||||
#else
|
||||
.long 0, 0, 0, 0 /* padding */
|
||||
#endif /* IPI_INTS */
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, SWI_CLOCK_MASK, SWI_AST_MASK
|
||||
#else
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, 0, 0, 0, 0, 0, 0
|
||||
@ -502,19 +469,14 @@ _ivectors:
|
||||
.long _Xintr12, _Xintr13, _Xintr14, _Xintr15
|
||||
.long _Xintr16, _Xintr17, _Xintr18, _Xintr19
|
||||
.long _Xintr20, _Xintr21, _Xintr22, _Xintr23
|
||||
#if defined(IPI_INTS)
|
||||
.long _Xipi24, _Xipi25, _Xipi26, _Xipi27
|
||||
#endif /* IPI_INTS */
|
||||
|
||||
/* active flag for lazy masking */
|
||||
iactive:
|
||||
.long 0
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
.globl _ipihits
|
||||
_ipihits:
|
||||
.long 0
|
||||
#endif /* XFAST_IPI32 */
|
||||
|
||||
#if defined(TEST_CPUHITS)
|
||||
.globl _cpuhits
|
||||
@ -571,12 +533,6 @@ _intrnames:
|
||||
.asciz "stray irq21"
|
||||
.asciz "stray irq22"
|
||||
.asciz "stray irq23"
|
||||
#if defined(IPI_INTS)
|
||||
.asciz "stray irq24"
|
||||
.asciz "stray irq25"
|
||||
.asciz "stray irq26"
|
||||
.asciz "stray irq27"
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
_eintrnames:
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)icu.h 5.6 (Berkeley) 5/9/91
|
||||
* $Id: icu.h,v 1.10 1997/02/22 09:36:13 peter Exp $
|
||||
* $Id: icu.h,v 1.11 1997/04/26 11:45:53 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -106,8 +106,10 @@ INTRDIS( unsigned s )
|
||||
#if 0
|
||||
#ifdef PC98
|
||||
#define SET_ICUS() (outb(IO_ICU1 + 2, imen), outb(IU_ICU2 + 2, imen >> 8))
|
||||
#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff)
|
||||
#else /* IBM-PC */
|
||||
#define SET_ICUS() (outb(IO_ICU1 + 1, imen), outb(IU_ICU2 + 1, imen >> 8))
|
||||
#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff)
|
||||
#endif /* PC98 */
|
||||
#else
|
||||
/*
|
||||
@ -116,8 +118,11 @@ INTRDIS( unsigned s )
|
||||
*/
|
||||
#ifdef PC98
|
||||
#define SET_ICUS() (outb(0x02, imen), outb(0x0a, imen >> 8))
|
||||
/* XXX is this correct? */
|
||||
#define INTRGET() ((inb(0x0a) << 8 | inb(0x02)) & 0xffff)
|
||||
#else
|
||||
#define SET_ICUS() (outb(0x21, imen), outb(0xa1, imen >> 8))
|
||||
#define INTRGET() ((inb(0xa1) << 8 | inb(0x21)) & 0xffff)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -160,14 +165,8 @@ INTRDIS( unsigned s )
|
||||
|
||||
#if defined(APIC_IO)
|
||||
|
||||
#include <machine/apic.h>
|
||||
#if defined(IPI_INTS)
|
||||
/* 32-47: ISA IRQ0-IRQ15, 48-55: IO APIC IRQ16-IRQ23, 56-59: LOCAL APIC IPI */
|
||||
#define ICU_LEN 28
|
||||
#else
|
||||
/* 32-47: ISA IRQ0-IRQ15, 48-55: IO APIC IRQ16-IRQ23 */
|
||||
#define ICU_LEN 24
|
||||
#endif /* IPI_INTS */
|
||||
|
||||
#else
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: if_ze.c,v 1.41 1997/03/24 11:32:55 bde Exp $
|
||||
* $Id: if_ze.c,v 1.42 1997/04/26 11:45:57 peter Exp $
|
||||
*/
|
||||
|
||||
/* XXX - Don't mix different PCCARD support code */
|
||||
@ -64,7 +64,6 @@
|
||||
#include "ze.h"
|
||||
#if NZE > 0
|
||||
#include "bpfilter.h"
|
||||
#include "opt_smp.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -117,11 +116,6 @@
|
||||
#include <machine/apm_bios.h>
|
||||
#endif /* NAPM > 0 */
|
||||
|
||||
#if defined(APIC_IO)
|
||||
#include <machine/smp.h>
|
||||
#include <machine/mpapic.h>
|
||||
#endif /* APIC_IO */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Driver for Ethernet Adapter *
|
||||
@ -733,11 +727,7 @@ ze_watchdog(ifp)
|
||||
#if 1
|
||||
struct ze_softc *sc = (struct ze_softc *)ifp;
|
||||
u_char isr, imr;
|
||||
#if defined(APIC_IO)
|
||||
u_int imask;
|
||||
#else
|
||||
u_short imask;
|
||||
#endif /* APIC_IO */
|
||||
|
||||
if(!(ifp->if_flags & IFF_UP))
|
||||
return;
|
||||
@ -755,11 +745,7 @@ ze_watchdog(ifp)
|
||||
/* read interrupt mask register */
|
||||
imr = inb (sc->nic_addr + ED_P2_IMR) & 0xff;
|
||||
|
||||
#if defined(APIC_IO)
|
||||
imask = INTRGET();
|
||||
#else
|
||||
imask = inb(IO_ICU2) << 8 | inb(IO_ICU1);
|
||||
#endif /* APIC_IO */
|
||||
|
||||
log (LOG_ERR, "ze%d: device timeout, isr=%02x, imr=%02x, imask=%04x\n",
|
||||
ifp->if_unit, isr, imr, imask);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.80 1997/03/28 01:02:17 ache Exp $
|
||||
* $Id: isa.c,v 1.81 1997/04/26 11:46:00 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -114,10 +114,6 @@ static inthand_t *fastintr[ICU_LEN] = {
|
||||
&IDTVEC(fastintr18), &IDTVEC(fastintr19),
|
||||
&IDTVEC(fastintr20), &IDTVEC(fastintr21),
|
||||
&IDTVEC(fastintr22), &IDTVEC(fastintr23)
|
||||
#if defined(IPI_INTS)
|
||||
/* XXX probably NOT needed, we register_intr(slowintr[I]) */
|
||||
, &IDTVEC(ipi24), &IDTVEC(ipi25), &IDTVEC(ipi26), &IDTVEC(ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
};
|
||||
|
||||
@ -129,9 +125,6 @@ static inthand_t *slowintr[ICU_LEN] = {
|
||||
#if defined(APIC_IO)
|
||||
, &IDTVEC(intr16), &IDTVEC(intr17), &IDTVEC(intr18), &IDTVEC(intr19),
|
||||
&IDTVEC(intr20), &IDTVEC(intr21), &IDTVEC(intr22), &IDTVEC(intr23)
|
||||
#if defined(IPI_INTS)
|
||||
, &IDTVEC(ipi24), &IDTVEC(ipi25), &IDTVEC(ipi26), &IDTVEC(ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
};
|
||||
|
||||
|
@ -31,16 +31,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: isa_device.h,v 1.37 1997/04/26 19:07:36 fsmp Exp $
|
||||
* $Id: isa_device.h,v 1.38 1997/04/26 19:26:37 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _I386_ISA_ISA_DEVICE_H_
|
||||
#define _I386_ISA_ISA_DEVICE_H_
|
||||
|
||||
#ifdef KERNEL
|
||||
#include "opt_smp.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ISA Bus Autoconfiguration
|
||||
*/
|
||||
@ -71,12 +67,8 @@ struct isa_device {
|
||||
int id_id; /* device id */
|
||||
struct isa_driver *id_driver;
|
||||
int id_iobase; /* base i/o address */
|
||||
#if defined(APIC_IO)
|
||||
u_int id_irq; /* interrupt request */
|
||||
#else
|
||||
u_short id_irq; /* interrupt request */
|
||||
#endif /* APIC_IO */
|
||||
short id_drq; /* DMA request */
|
||||
int id_drq; /* DMA request */
|
||||
caddr_t id_maddr; /* physical i/o memory address on bus (if any)*/
|
||||
int id_msize; /* size of i/o memory */
|
||||
inthand2_t *id_intr; /* interrupt interface routine */
|
||||
@ -150,7 +142,8 @@ inthand_t
|
||||
IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7),
|
||||
IDTVEC(intr8), IDTVEC(intr9), IDTVEC(intr10), IDTVEC(intr11),
|
||||
IDTVEC(intr12), IDTVEC(intr13), IDTVEC(intr14), IDTVEC(intr15);
|
||||
#if defined(APIC_IO)
|
||||
|
||||
/* these functions ONLY exist in an SMP/APIC_IO kernel: */
|
||||
inthand_t
|
||||
IDTVEC(fastintr16), IDTVEC(fastintr17),
|
||||
IDTVEC(fastintr18), IDTVEC(fastintr19),
|
||||
@ -159,12 +152,10 @@ inthand_t
|
||||
inthand_t
|
||||
IDTVEC(intr16), IDTVEC(intr17), IDTVEC(intr18), IDTVEC(intr19),
|
||||
IDTVEC(intr20), IDTVEC(intr21), IDTVEC(intr22), IDTVEC(intr23);
|
||||
#include <machine/apic.h>
|
||||
#if defined(IPI_INTS)
|
||||
#define XINVLTLB_OFFSET 32
|
||||
inthand_t
|
||||
IDTVEC(ipi24), IDTVEC(ipi25), IDTVEC(ipi26), IDTVEC(ipi27);
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
Xinvltlb;
|
||||
|
||||
struct isa_device *
|
||||
find_display __P((void));
|
||||
struct isa_device *
|
||||
@ -180,9 +171,8 @@ void isa_dmastart __P((int flags, caddr_t addr, u_int nbytes, int chan));
|
||||
int isa_dma_acquire __P((int chan));
|
||||
void isa_dma_release __P((int chan));
|
||||
int isa_irq_pending __P((struct isa_device *dvp));
|
||||
#if defined(APIC_IO)
|
||||
/* this functions ONLY exists in an SMP/APIC_IO kernel: */
|
||||
int icu_irq_pending __P((struct isa_device *dvp));
|
||||
#endif /* APIC_IO */
|
||||
int isa_nmi __P((int cd));
|
||||
void reconfig_isadev __P((struct isa_device *isdp, u_int *mp));
|
||||
int register_intr __P((int intr, int device_id, u_int flags,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* from: vector.s, 386BSD 0.1 unknown origin
|
||||
* $Id: vector.s,v 1.25 1997/02/22 09:37:23 peter Exp $
|
||||
* $Id: vector.s,v 1.26 1997/04/26 11:46:07 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -343,47 +343,23 @@ __CONCAT(Xresume,irq_num): ; \
|
||||
addl $4+4,%esp ; \
|
||||
iret
|
||||
|
||||
|
||||
#if defined(APIC_IO) && defined(IPI_INTS)
|
||||
/*
|
||||
* A simple IPI_INTR() macro based on a heavily cut down FAST_INTR().
|
||||
* call it's handler, EOI and return.
|
||||
*/
|
||||
#define IPI_INTR(irq_num, vec_name) \
|
||||
.text ; \
|
||||
SUPERALIGN_TEXT ; \
|
||||
IDTVEC(vec_name) ; \
|
||||
pushl %eax ; /* save only call-used registers */ \
|
||||
pushl %ecx ; \
|
||||
pushl %edx ; \
|
||||
pushl %ds ; \
|
||||
MAYBE_PUSHL_ES ; \
|
||||
movl $KDSEL,%eax ; \
|
||||
movl %ax,%ds ; \
|
||||
MAYBE_MOVW_AX_ES ; \
|
||||
pushl _intr_unit + (irq_num) * 4 ; \
|
||||
call *_intr_handler + (irq_num) * 4 ; \
|
||||
ENABLE_APIC ; \
|
||||
addl $4,%esp ; \
|
||||
incl _cnt+V_INTR ; /* book-keeping can wait */ \
|
||||
movl _intr_countp + (irq_num) * 4,%eax ; \
|
||||
incl (%eax) ; \
|
||||
MAYBE_POPL_ES ; \
|
||||
popl %ds ; \
|
||||
popl %edx ; \
|
||||
popl %ecx ; \
|
||||
popl %eax ; \
|
||||
iret
|
||||
#endif /* APIC_IO && IPI_INTS */
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
#if defined(APIC_IO)
|
||||
.text
|
||||
SUPERALIGN_TEXT
|
||||
.globl _Xfastipi32
|
||||
_Xfastipi32:
|
||||
.globl _Xinvltlb
|
||||
_Xinvltlb:
|
||||
pushl %eax
|
||||
movl %cr3, %eax
|
||||
movl %eax, %cr3
|
||||
#if 0
|
||||
/** XXX FIXME: convert to Bruces suggested 'ss' style, eliminating %ds */
|
||||
ss
|
||||
incl _ipihits
|
||||
ss
|
||||
movl _apic_base, %eax
|
||||
ss
|
||||
movl $0, APIC_EOI(%eax)
|
||||
#else
|
||||
pushl %ds
|
||||
movl $KDSEL,%eax
|
||||
movl %ax,%ds
|
||||
@ -391,9 +367,10 @@ _Xfastipi32:
|
||||
movl _apic_base, %eax
|
||||
movl $0, APIC_EOI(%eax)
|
||||
popl %ds
|
||||
#endif
|
||||
popl %eax
|
||||
iret
|
||||
#endif /* XFAST_IPI32 */
|
||||
#endif /* APIC_IO */
|
||||
|
||||
MCOUNT_LABEL(bintr)
|
||||
FAST_INTR(0,fastintr0, ENABLE_ICU1)
|
||||
@ -447,12 +424,6 @@ MCOUNT_LABEL(bintr)
|
||||
INTR(21,intr21, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(22,intr22, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
INTR(23,intr23, IO_ICU2, ENABLE_ICU1_AND_2, ah)
|
||||
#if defined(IPI_INTS)
|
||||
IPI_INTR(24, ipi24)
|
||||
IPI_INTR(25, ipi25)
|
||||
IPI_INTR(26, ipi26)
|
||||
IPI_INTR(27, ipi27)
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
MCOUNT_LABEL(eintr)
|
||||
|
||||
@ -476,11 +447,7 @@ imasks: /* masks for interrupt handlers */
|
||||
.space NHWI*4 /* padding; HWI masks are elsewhere */
|
||||
|
||||
#if defined(APIC_IO)
|
||||
#if defined(IPI_INTS)
|
||||
/* these 4 IPI slots are counted as HARDWARE INTs, ie NHWI, above */
|
||||
#else
|
||||
.long 0, 0, 0, 0 /* padding */
|
||||
#endif /* IPI_INTS */
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, SWI_CLOCK_MASK, SWI_AST_MASK
|
||||
#else
|
||||
.long SWI_TTY_MASK, SWI_NET_MASK, 0, 0, 0, 0, 0, 0
|
||||
@ -502,19 +469,14 @@ _ivectors:
|
||||
.long _Xintr12, _Xintr13, _Xintr14, _Xintr15
|
||||
.long _Xintr16, _Xintr17, _Xintr18, _Xintr19
|
||||
.long _Xintr20, _Xintr21, _Xintr22, _Xintr23
|
||||
#if defined(IPI_INTS)
|
||||
.long _Xipi24, _Xipi25, _Xipi26, _Xipi27
|
||||
#endif /* IPI_INTS */
|
||||
|
||||
/* active flag for lazy masking */
|
||||
iactive:
|
||||
.long 0
|
||||
|
||||
#if defined(XFAST_IPI32)
|
||||
.globl _ipihits
|
||||
_ipihits:
|
||||
.long 0
|
||||
#endif /* XFAST_IPI32 */
|
||||
|
||||
#if defined(TEST_CPUHITS)
|
||||
.globl _cpuhits
|
||||
@ -571,12 +533,6 @@ _intrnames:
|
||||
.asciz "stray irq21"
|
||||
.asciz "stray irq22"
|
||||
.asciz "stray irq23"
|
||||
#if defined(IPI_INTS)
|
||||
.asciz "stray irq24"
|
||||
.asciz "stray irq25"
|
||||
.asciz "stray irq26"
|
||||
.asciz "stray irq27"
|
||||
#endif /* IPI_INTS */
|
||||
#endif /* APIC_IO */
|
||||
_eintrnames:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user