diff options
Diffstat (limited to 'sys/arch/i386/isa/vector.s')
-rw-r--r-- | sys/arch/i386/isa/vector.s | 84 |
1 files changed, 49 insertions, 35 deletions
diff --git a/sys/arch/i386/isa/vector.s b/sys/arch/i386/isa/vector.s index 1407c3166fe..93a7bab51da 100644 --- a/sys/arch/i386/isa/vector.s +++ b/sys/arch/i386/isa/vector.s @@ -1,4 +1,4 @@ -/* $OpenBSD: vector.s,v 1.15 2001/12/06 21:09:13 niklas Exp $ */ +/* $OpenBSD: vector.s,v 1.16 2003/04/17 03:42:14 drahn Exp $ */ /* $NetBSD: vector.s,v 1.32 1996/01/07 21:29:47 mycroft Exp $ */ /* @@ -85,16 +85,16 @@ #ifdef ICU_HARDWARE_MASK #define MASK(irq_num, icu) \ - movb _imen + IRQ_BYTE(irq_num),%al ;\ + movb _C_LABEL(imen) + IRQ_BYTE(irq_num),%al ;\ orb $IRQ_BIT(irq_num),%al ;\ - movb %al,_imen + IRQ_BYTE(irq_num) ;\ + movb %al,_C_LABEL(imen) + IRQ_BYTE(irq_num) ;\ FASTER_NOP ;\ outb %al,$(icu+1) #define UNMASK(irq_num, icu) \ cli ;\ - movb _imen + IRQ_BYTE(irq_num),%al ;\ + movb _C_LABEL(imen) + IRQ_BYTE(irq_num),%al ;\ andb $~IRQ_BIT(irq_num),%al ;\ - movb %al,_imen + IRQ_BYTE(irq_num) ;\ + movb %al,_C_LABEL(imen) + IRQ_BYTE(irq_num) ;\ FASTER_NOP ;\ outb %al,$(icu+1) ;\ sti @@ -130,7 +130,7 @@ * scattered cld's? */ - .globl _isa_strayintr + .globl _C_LABEL(isa_strayintr) /* * Normal vectors. @@ -154,7 +154,7 @@ IDTVEC(recurse/**/irq_num) ;\ pushl %cs ;\ pushl %esi ;\ cli ;\ -_Xintr/**/irq_num/**/: ;\ +_C_LABEL(Xintr)/**/irq_num/**/: ;\ pushl $0 /* dummy error code */ ;\ pushl $T_ASTFLT /* trap # for doing ASTs */ ;\ INTRENTRY ;\ @@ -162,26 +162,26 @@ _Xintr/**/irq_num/**/: ;\ MASK(irq_num, icu) /* mask it in hardware */ ;\ ack(irq_num) /* and allow other intrs */ ;\ incl MY_COUNT+V_INTR /* statistical info */ ;\ - movl _C_LABEL(iminlevel) + (irq_num) * 4, %eax ;\ + movl _C_LABEL(iminlevel) + (irq_num) * 4, %eax ;\ movzbl _C_LABEL(cpl),%ebx ;\ cmpl %eax,%ebx ;\ jae _C_LABEL(Xhold/**/irq_num)/* currently masked; hold it */;\ -_Xresume/**/irq_num/**/: ;\ +_C_LABEL(Xresume)/**/irq_num/**/: ;\ movzbl _C_LABEL(cpl),%eax /* cpl to restore on exit */ ;\ pushl %eax ;\ - movl _C_LABEL(imaxlevel) + (irq_num) * 4,%eax ;\ + movl _C_LABEL(imaxlevel) + (irq_num) * 4,%eax ;\ movl %eax,_C_LABEL(cpl) /* block enough for this irq */ ;\ sti /* safe to take intrs now */ ;\ - movl _intrhand + (irq_num) * 4,%ebx /* head of chain */ ;\ + movl _C_LABEL(intrhand) + (irq_num) * 4,%ebx /* head of chain */ ;\ testl %ebx,%ebx ;\ - jz _Xstray/**/irq_num /* no handlears; we're stray */ ;\ + jz _C_LABEL(Xstray)/**/irq_num /* no handlears; we're stray */ ;\ STRAY_INITIALIZE /* nobody claimed it yet */ ;\ 7: movl IH_ARG(%ebx),%eax /* get handler arg */ ;\ testl %eax,%eax ;\ jnz 4f ;\ movl %esp,%eax /* 0 means frame pointer */ ;\ 4: pushl %eax ;\ - call IH_FUN(%ebx) /* call it */ ;\ + call *IH_FUN(%ebx) /* call it */ ;\ addl $4,%esp /* toss the arg */ ;\ STRAY_INTEGRATE /* maybe he claimed it */ ;\ orl %eax,%eax /* should it be counted? */ ;\ @@ -192,14 +192,14 @@ _Xresume/**/irq_num/**/: ;\ jnz 7b ;\ STRAY_TEST /* see if it's a stray */ ;\ 6: UNMASK(irq_num, icu) /* unmask it in hardware */ ;\ - jmp _Xdoreti /* lower spl and do ASTs */ ;\ + jmp _C_LABEL(Xdoreti) /* lower spl and do ASTs */ ;\ IDTVEC(stray/**/irq_num) ;\ pushl $irq_num ;\ - call _isa_strayintr ;\ + call _C_LABEL(isa_strayintr) ;\ addl $4,%esp ;\ jmp 6b ;\ IDTVEC(hold/**/irq_num) ;\ - orb $IRQ_BIT(irq_num),_ipending + IRQ_BYTE(irq_num) ;\ + orb $IRQ_BIT(irq_num),_C_LABEL(ipending) + IRQ_BYTE(irq_num) ;\ INTRFASTEXIT #if defined(DEBUG) && defined(notdef) @@ -209,7 +209,7 @@ IDTVEC(hold/**/irq_num) ;\ orl %eax,%esi #define STRAY_TEST \ testl %esi,%esi ;\ - jz _Xstray/**/irq_num + jz _C_LABEL(Xstray)/**/irq_num #else /* !DEBUG */ #define STRAY_INITIALIZE #define STRAY_INTEGRATE @@ -245,37 +245,51 @@ INTR(15, IO_ICU2, ACK2) */ /* interrupt service routine entry points */ IDTVEC(intr) - .long _Xintr0, _Xintr1, _Xintr2, _Xintr3, _Xintr4, _Xintr5, _Xintr6 - .long _Xintr7, _Xintr8, _Xintr9, _Xintr10, _Xintr11, _Xintr12 - .long _Xintr13, _Xintr14, _Xintr15 + .long _C_LABEL(Xintr0), _C_LABEL(Xintr1), _C_LABEL(Xintr2) + .long _C_LABEL(Xintr3), _C_LABEL(Xintr4), _C_LABEL(Xintr5) + .long _C_LABEL(Xintr6), _C_LABEL(Xintr7), _C_LABEL(Xintr8) + .long _C_LABEL(Xintr9), _C_LABEL(Xintr10), _C_LABEL(Xintr11) + .long _C_LABEL(Xintr12), _C_LABEL(Xintr13) + .long _C_LABEL(Xintr14), _C_LABEL(Xintr15) /* * These tables are used by Xdoreti() and Xspllower(). */ /* resume points for suspended interrupts */ IDTVEC(resume) - .long _Xresume0, _Xresume1, _Xresume2, _Xresume3, _Xresume4 - .long _Xresume5, _Xresume6, _Xresume7, _Xresume8, _Xresume9 - .long _Xresume10, _Xresume11, _Xresume12, _Xresume13, _Xresume14 - .long _Xresume15 + .long _C_LABEL(Xresume0), _C_LABEL(Xresume1) + .long _C_LABEL(Xresume2), _C_LABEL(Xresume3) + .long _C_LABEL(Xresume4), _C_LABEL(Xresume5) + .long _C_LABEL(Xresume6), _C_LABEL(Xresume7) + .long _C_LABEL(Xresume8), _C_LABEL(Xresume9) + .long _C_LABEL(Xresume10), _C_LABEL(Xresume11) + .long _C_LABEL(Xresume12), _C_LABEL(Xresume13) + .long _C_LABEL(Xresume14), _C_LABEL(Xresume15) /* for soft interrupts */ .long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - .long _Xsofttty, _Xsoftnet, _Xsoftclock + .long _C_LABEL(Xsofttty), _C_LABEL(Xsoftnet) + .long _C_LABEL(Xsoftclock) /* fake interrupts to resume from splx() */ IDTVEC(recurse) - .long _Xrecurse0, _Xrecurse1, _Xrecurse2, _Xrecurse3, _Xrecurse4 - .long _Xrecurse5, _Xrecurse6, _Xrecurse7, _Xrecurse8, _Xrecurse9 - .long _Xrecurse10, _Xrecurse11, _Xrecurse12, _Xrecurse13, _Xrecurse14 - .long _Xrecurse15 + .long _C_LABEL(Xrecurse0), _C_LABEL(Xrecurse1) + .long _C_LABEL(Xrecurse2), _C_LABEL(Xrecurse3) + .long _C_LABEL(Xrecurse4), _C_LABEL(Xrecurse5) + .long _C_LABEL(Xrecurse6), _C_LABEL(Xrecurse7) + .long _C_LABEL(Xrecurse8), _C_LABEL(Xrecurse9) + .long _C_LABEL(Xrecurse10), _C_LABEL(Xrecurse11) + .long _C_LABEL(Xrecurse12), _C_LABEL(Xrecurse13) + .long _C_LABEL(Xrecurse14), _C_LABEL(Xrecurse15) /* for soft interrupts */ .long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - .long _Xsofttty, _Xsoftnet, _Xsoftclock + .long _C_LABEL(Xsofttty), _C_LABEL(Xsoftnet) + .long _C_LABEL(Xsoftclock) /* Some bogus data, to keep vmstat happy, for now. */ - .globl _intrnames, _eintrnames, _intrcnt, _eintrcnt -_intrnames: + .globl _C_LABEL(intrnames), _C_LABEL(eintrnames) + .globl _C_LABEL(intrcnt), _C_LABEL(eintrcnt) +_C_LABEL(intrnames): .long 0 -_eintrnames: -_intrcnt: +_C_LABEL(eintrnames): +_C_LABEL(intrcnt): .long 0 -_eintrcnt: +_C_LABEL(eintrcnt): |