Follow i386, and mask deferred level-triggered interrupts at the ioapic.
This commit is contained in:
parent
204dc598d9
commit
9756b6a911
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: genassym.cf,v 1.1 2003/04/26 18:39:28 fvdl Exp $
|
||||
# $NetBSD: genassym.cf,v 1.2 2003/05/04 23:46:41 fvdl Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -115,6 +115,7 @@ include <machine/cpu.h>
|
|||
endif
|
||||
|
||||
if NIOAPIC > 0
|
||||
include <machine/i82093reg.h>
|
||||
include <machine/i82093var.h>
|
||||
endif
|
||||
|
||||
|
@ -222,6 +223,12 @@ define CPU_INFO_ILEVEL offsetof(struct cpu_info, ci_ilevel)
|
|||
define CPU_INFO_IDEPTH offsetof(struct cpu_info, ci_idepth)
|
||||
define CPU_INFO_ISOURCES offsetof(struct cpu_info, ci_isources)
|
||||
|
||||
if NIOAPIC > 0
|
||||
define IOAPIC_SC_REG offsetof(struct ioapic_softc, sc_reg)
|
||||
define IOAPIC_SC_DATA offsetof(struct ioapic_softc, sc_data)
|
||||
define PIC_LOCK offsetof(struct pic, pic_lock)
|
||||
endif
|
||||
|
||||
define IH_FUN offsetof(struct intrhand, ih_fun)
|
||||
define IH_ARG offsetof(struct intrhand, ih_arg)
|
||||
define IH_NEXT offsetof(struct intrhand, ih_next)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vector.S,v 1.1 2003/04/26 18:39:33 fvdl Exp $ */
|
||||
/* $NetBSD: vector.S,v 1.2 2003/05/04 23:46:41 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -385,13 +385,14 @@ IDTVEC(intr_lapic_ltimer)
|
|||
* for specific PICs.
|
||||
*/
|
||||
|
||||
#define INTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_check) \
|
||||
#define INTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \
|
||||
IDTVEC(recurse_/**/name/**/num) ;\
|
||||
INTR_RECURSE_HWFRAME ;\
|
||||
pushq $0 /* dummy error code */ ;\
|
||||
subq $8,%rsp ;\
|
||||
pushq $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
IDTVEC(resume_/**/name/**/num) \
|
||||
movq $IREENT_MAGIC,TF_ERR(%rsp) ;\
|
||||
movl %ebx,%r13d ;\
|
||||
movq CPUVAR(ISOURCES) + (num) * 8, %r14 ;\
|
||||
movl IS_MAXLEVEL(%r14),%ebx ;\
|
||||
|
@ -425,24 +426,28 @@ IDTVEC(intr_/**/name/**/num) ;\
|
|||
movq IH_ARG(%rbx),%rdi ;\
|
||||
movl %r12d,CPUVAR(ILEVEL) ;\
|
||||
call *IH_FUN(%rbx) /* call it */ ;\
|
||||
level_check(num) ;\
|
||||
movq IH_NEXT(%rbx),%rbx /* next handler in chain */ ;\
|
||||
testq %rbx,%rbx ;\
|
||||
jnz 6b ;\
|
||||
5: \
|
||||
UNLOCK_KERNEL ;\
|
||||
cli ;\
|
||||
unmask(num) /* unmask it in hardware */ ;\
|
||||
late_ack(num) ;\
|
||||
sti ;\
|
||||
jmp _C_LABEL(Xdoreti) /* lower spl and do ASTs */ ;\
|
||||
7: \
|
||||
UNLOCK_KERNEL ;\
|
||||
cli ;\
|
||||
orl $(1 << num),CPUVAR(IPENDING) ;\
|
||||
level_mask(num) ;\
|
||||
late_ack(num) ;\
|
||||
sti ;\
|
||||
jmp _C_LABEL(Xdoreti) /* lower spl and do ASTs */ ;\
|
||||
10: \
|
||||
cli ;\
|
||||
orl $(1 << num),CPUVAR(IPENDING) ;\
|
||||
level_mask(num) ;\
|
||||
late_ack(num) ;\
|
||||
sti ;\
|
||||
INTRFASTEXIT ;\
|
||||
|
@ -491,38 +496,73 @@ INTRSTUB(legacy,15,i8259_asm_ack2,voidop,i8259_asm_mask,i8259_asm_unmask,
|
|||
voidop)
|
||||
|
||||
#if NIOAPIC > 0
|
||||
INTRSTUB(ioapic,0,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,1,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,2,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,3,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,4,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,5,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,6,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,7,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,8,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,9,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,10,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,11,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,12,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,13,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,14,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,15,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,16,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,17,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,18,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,19,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,20,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,21,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,22,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,23,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,24,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,25,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,26,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,27,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,28,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,29,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,30,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic,31,ioapic_asm_ack,voidop,voidop,voidop,voidop)
|
||||
|
||||
INTRSTUB(ioapic_edge,0,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,1,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,2,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,3,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,4,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,5,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,6,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,7,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,8,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,9,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,10,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,11,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,12,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,13,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,14,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,15,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,16,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,17,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,18,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,19,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,20,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,21,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,22,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,23,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,24,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,25,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,26,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,27,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,28,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,29,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,30,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
INTRSTUB(ioapic_edge,31,voidop,ioapic_asm_ack,voidop,voidop,voidop)
|
||||
|
||||
INTRSTUB(ioapic_level,0,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,1,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,2,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,3,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,4,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,5,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,6,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,7,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,8,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,9,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,10,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,11,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,12,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,13,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,14,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,15,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,16,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,17,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,18,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,19,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,20,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,21,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,22,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,23,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,24,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,25,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,26,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,27,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,28,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,29,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,30,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
INTRSTUB(ioapic_level,31,voidop,ioapic_asm_ack,voidop,ioapic_unmask,ioapic_mask)
|
||||
|
||||
#endif
|
||||
|
||||
.globl _C_LABEL(i8259_stubs)
|
||||
|
@ -561,72 +601,139 @@ _C_LABEL(i8259_stubs):
|
|||
.quad _C_LABEL(Xresume_legacy15)
|
||||
|
||||
#if NIOAPIC > 0
|
||||
.globl _C_LABEL(ioapic_stubs)
|
||||
_C_LABEL(ioapic_stubs):
|
||||
.quad _C_LABEL(Xintr_ioapic0), _C_LABEL(Xrecurse_ioapic0)
|
||||
.quad _C_LABEL(Xresume_ioapic0)
|
||||
.quad _C_LABEL(Xintr_ioapic1), _C_LABEL(Xrecurse_ioapic1)
|
||||
.quad _C_LABEL(Xresume_ioapic1)
|
||||
.quad _C_LABEL(Xintr_ioapic2), _C_LABEL(Xrecurse_ioapic2)
|
||||
.quad _C_LABEL(Xresume_ioapic2)
|
||||
.quad _C_LABEL(Xintr_ioapic3), _C_LABEL(Xrecurse_ioapic3)
|
||||
.quad _C_LABEL(Xresume_ioapic3)
|
||||
.quad _C_LABEL(Xintr_ioapic4), _C_LABEL(Xrecurse_ioapic4)
|
||||
.quad _C_LABEL(Xresume_ioapic4)
|
||||
.quad _C_LABEL(Xintr_ioapic5), _C_LABEL(Xrecurse_ioapic5)
|
||||
.quad _C_LABEL(Xresume_ioapic5)
|
||||
.quad _C_LABEL(Xintr_ioapic6), _C_LABEL(Xrecurse_ioapic6)
|
||||
.quad _C_LABEL(Xresume_ioapic6)
|
||||
.quad _C_LABEL(Xintr_ioapic7), _C_LABEL(Xrecurse_ioapic7)
|
||||
.quad _C_LABEL(Xresume_ioapic7)
|
||||
.quad _C_LABEL(Xintr_ioapic8), _C_LABEL(Xrecurse_ioapic8)
|
||||
.quad _C_LABEL(Xresume_ioapic8)
|
||||
.quad _C_LABEL(Xintr_ioapic9), _C_LABEL(Xrecurse_ioapic9)
|
||||
.quad _C_LABEL(Xresume_ioapic9)
|
||||
.quad _C_LABEL(Xintr_ioapic10), _C_LABEL(Xrecurse_ioapic10)
|
||||
.quad _C_LABEL(Xresume_ioapic10)
|
||||
.quad _C_LABEL(Xintr_ioapic11), _C_LABEL(Xrecurse_ioapic11)
|
||||
.quad _C_LABEL(Xresume_ioapic11)
|
||||
.quad _C_LABEL(Xintr_ioapic12), _C_LABEL(Xrecurse_ioapic12)
|
||||
.quad _C_LABEL(Xresume_ioapic12)
|
||||
.quad _C_LABEL(Xintr_ioapic13), _C_LABEL(Xrecurse_ioapic13)
|
||||
.quad _C_LABEL(Xresume_ioapic13)
|
||||
.quad _C_LABEL(Xintr_ioapic14), _C_LABEL(Xrecurse_ioapic14)
|
||||
.quad _C_LABEL(Xresume_ioapic14)
|
||||
.quad _C_LABEL(Xintr_ioapic15), _C_LABEL(Xrecurse_ioapic15)
|
||||
.quad _C_LABEL(Xresume_ioapic15)
|
||||
.quad _C_LABEL(Xintr_ioapic16), _C_LABEL(Xrecurse_ioapic16)
|
||||
.quad _C_LABEL(Xresume_ioapic16)
|
||||
.quad _C_LABEL(Xintr_ioapic17), _C_LABEL(Xrecurse_ioapic17)
|
||||
.quad _C_LABEL(Xresume_ioapic17)
|
||||
.quad _C_LABEL(Xintr_ioapic18), _C_LABEL(Xrecurse_ioapic18)
|
||||
.quad _C_LABEL(Xresume_ioapic18)
|
||||
.quad _C_LABEL(Xintr_ioapic19), _C_LABEL(Xrecurse_ioapic19)
|
||||
.quad _C_LABEL(Xresume_ioapic19)
|
||||
.quad _C_LABEL(Xintr_ioapic20), _C_LABEL(Xrecurse_ioapic20)
|
||||
.quad _C_LABEL(Xresume_ioapic20)
|
||||
.quad _C_LABEL(Xintr_ioapic21), _C_LABEL(Xrecurse_ioapic21)
|
||||
.quad _C_LABEL(Xresume_ioapic21)
|
||||
.quad _C_LABEL(Xintr_ioapic22), _C_LABEL(Xrecurse_ioapic22)
|
||||
.quad _C_LABEL(Xresume_ioapic22)
|
||||
.quad _C_LABEL(Xintr_ioapic23), _C_LABEL(Xrecurse_ioapic23)
|
||||
.quad _C_LABEL(Xresume_ioapic23)
|
||||
.quad _C_LABEL(Xintr_ioapic24), _C_LABEL(Xrecurse_ioapic24)
|
||||
.quad _C_LABEL(Xresume_ioapic24)
|
||||
.quad _C_LABEL(Xintr_ioapic25), _C_LABEL(Xrecurse_ioapic25)
|
||||
.quad _C_LABEL(Xresume_ioapic25)
|
||||
.quad _C_LABEL(Xintr_ioapic26), _C_LABEL(Xrecurse_ioapic26)
|
||||
.quad _C_LABEL(Xresume_ioapic26)
|
||||
.quad _C_LABEL(Xintr_ioapic27), _C_LABEL(Xrecurse_ioapic27)
|
||||
.quad _C_LABEL(Xresume_ioapic27)
|
||||
.quad _C_LABEL(Xintr_ioapic28), _C_LABEL(Xrecurse_ioapic28)
|
||||
.quad _C_LABEL(Xresume_ioapic28)
|
||||
.quad _C_LABEL(Xintr_ioapic29), _C_LABEL(Xrecurse_ioapic29)
|
||||
.quad _C_LABEL(Xresume_ioapic29)
|
||||
.quad _C_LABEL(Xintr_ioapic30), _C_LABEL(Xrecurse_ioapic30)
|
||||
.quad _C_LABEL(Xresume_ioapic30)
|
||||
.quad _C_LABEL(Xintr_ioapic31), _C_LABEL(Xrecurse_ioapic31)
|
||||
.quad _C_LABEL(Xresume_ioapic31)
|
||||
.globl _C_LABEL(ioapic_edge_stubs)
|
||||
_C_LABEL(ioapic_edge_stubs):
|
||||
.quad _C_LABEL(Xintr_ioapic_edge0), _C_LABEL(Xrecurse_ioapic_edge0)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge0)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge1), _C_LABEL(Xrecurse_ioapic_edge1)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge1)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge2), _C_LABEL(Xrecurse_ioapic_edge2)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge2)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge3), _C_LABEL(Xrecurse_ioapic_edge3)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge3)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge4), _C_LABEL(Xrecurse_ioapic_edge4)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge4)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge5), _C_LABEL(Xrecurse_ioapic_edge5)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge5)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge6), _C_LABEL(Xrecurse_ioapic_edge6)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge6)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge7), _C_LABEL(Xrecurse_ioapic_edge7)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge7)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge8), _C_LABEL(Xrecurse_ioapic_edge8)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge8)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge9), _C_LABEL(Xrecurse_ioapic_edge9)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge9)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge10), _C_LABEL(Xrecurse_ioapic_edge10)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge10)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge11), _C_LABEL(Xrecurse_ioapic_edge11)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge11)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge12), _C_LABEL(Xrecurse_ioapic_edge12)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge12)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge13), _C_LABEL(Xrecurse_ioapic_edge13)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge13)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge14), _C_LABEL(Xrecurse_ioapic_edge14)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge14)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge15), _C_LABEL(Xrecurse_ioapic_edge15)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge15)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge16), _C_LABEL(Xrecurse_ioapic_edge16)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge16)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge17), _C_LABEL(Xrecurse_ioapic_edge17)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge17)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge18), _C_LABEL(Xrecurse_ioapic_edge18)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge18)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge19), _C_LABEL(Xrecurse_ioapic_edge19)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge19)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge20), _C_LABEL(Xrecurse_ioapic_edge20)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge20)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge21), _C_LABEL(Xrecurse_ioapic_edge21)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge21)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge22), _C_LABEL(Xrecurse_ioapic_edge22)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge22)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge23), _C_LABEL(Xrecurse_ioapic_edge23)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge23)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge24), _C_LABEL(Xrecurse_ioapic_edge24)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge24)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge25), _C_LABEL(Xrecurse_ioapic_edge25)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge25)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge26), _C_LABEL(Xrecurse_ioapic_edge26)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge26)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge27), _C_LABEL(Xrecurse_ioapic_edge27)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge27)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge28), _C_LABEL(Xrecurse_ioapic_edge28)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge28)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge29), _C_LABEL(Xrecurse_ioapic_edge29)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge29)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge30), _C_LABEL(Xrecurse_ioapic_edge30)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge30)
|
||||
.quad _C_LABEL(Xintr_ioapic_edge31), _C_LABEL(Xrecurse_ioapic_edge31)
|
||||
.quad _C_LABEL(Xresume_ioapic_edge31)
|
||||
|
||||
.globl _C_LABEL(ioapic_level_stubs)
|
||||
_C_LABEL(ioapic_level_stubs):
|
||||
.quad _C_LABEL(Xintr_ioapic_level0), _C_LABEL(Xrecurse_ioapic_level0)
|
||||
.quad _C_LABEL(Xresume_ioapic_level0)
|
||||
.quad _C_LABEL(Xintr_ioapic_level1), _C_LABEL(Xrecurse_ioapic_level1)
|
||||
.quad _C_LABEL(Xresume_ioapic_level1)
|
||||
.quad _C_LABEL(Xintr_ioapic_level2), _C_LABEL(Xrecurse_ioapic_level2)
|
||||
.quad _C_LABEL(Xresume_ioapic_level2)
|
||||
.quad _C_LABEL(Xintr_ioapic_level3), _C_LABEL(Xrecurse_ioapic_level3)
|
||||
.quad _C_LABEL(Xresume_ioapic_level3)
|
||||
.quad _C_LABEL(Xintr_ioapic_level4), _C_LABEL(Xrecurse_ioapic_level4)
|
||||
.quad _C_LABEL(Xresume_ioapic_level4)
|
||||
.quad _C_LABEL(Xintr_ioapic_level5), _C_LABEL(Xrecurse_ioapic_level5)
|
||||
.quad _C_LABEL(Xresume_ioapic_level5)
|
||||
.quad _C_LABEL(Xintr_ioapic_level6), _C_LABEL(Xrecurse_ioapic_level6)
|
||||
.quad _C_LABEL(Xresume_ioapic_level6)
|
||||
.quad _C_LABEL(Xintr_ioapic_level7), _C_LABEL(Xrecurse_ioapic_level7)
|
||||
.quad _C_LABEL(Xresume_ioapic_level7)
|
||||
.quad _C_LABEL(Xintr_ioapic_level8), _C_LABEL(Xrecurse_ioapic_level8)
|
||||
.quad _C_LABEL(Xresume_ioapic_level8)
|
||||
.quad _C_LABEL(Xintr_ioapic_level9), _C_LABEL(Xrecurse_ioapic_level9)
|
||||
.quad _C_LABEL(Xresume_ioapic_level9)
|
||||
.quad _C_LABEL(Xintr_ioapic_level10), _C_LABEL(Xrecurse_ioapic_level10)
|
||||
.quad _C_LABEL(Xresume_ioapic_level10)
|
||||
.quad _C_LABEL(Xintr_ioapic_level11), _C_LABEL(Xrecurse_ioapic_level11)
|
||||
.quad _C_LABEL(Xresume_ioapic_level11)
|
||||
.quad _C_LABEL(Xintr_ioapic_level12), _C_LABEL(Xrecurse_ioapic_level12)
|
||||
.quad _C_LABEL(Xresume_ioapic_level12)
|
||||
.quad _C_LABEL(Xintr_ioapic_level13), _C_LABEL(Xrecurse_ioapic_level13)
|
||||
.quad _C_LABEL(Xresume_ioapic_level13)
|
||||
.quad _C_LABEL(Xintr_ioapic_level14), _C_LABEL(Xrecurse_ioapic_level14)
|
||||
.quad _C_LABEL(Xresume_ioapic_level14)
|
||||
.quad _C_LABEL(Xintr_ioapic_level15), _C_LABEL(Xrecurse_ioapic_level15)
|
||||
.quad _C_LABEL(Xresume_ioapic_level15)
|
||||
.quad _C_LABEL(Xintr_ioapic_level16), _C_LABEL(Xrecurse_ioapic_level16)
|
||||
.quad _C_LABEL(Xresume_ioapic_level16)
|
||||
.quad _C_LABEL(Xintr_ioapic_level17), _C_LABEL(Xrecurse_ioapic_level17)
|
||||
.quad _C_LABEL(Xresume_ioapic_level17)
|
||||
.quad _C_LABEL(Xintr_ioapic_level18), _C_LABEL(Xrecurse_ioapic_level18)
|
||||
.quad _C_LABEL(Xresume_ioapic_level18)
|
||||
.quad _C_LABEL(Xintr_ioapic_level19), _C_LABEL(Xrecurse_ioapic_level19)
|
||||
.quad _C_LABEL(Xresume_ioapic_level19)
|
||||
.quad _C_LABEL(Xintr_ioapic_level20), _C_LABEL(Xrecurse_ioapic_level20)
|
||||
.quad _C_LABEL(Xresume_ioapic_level20)
|
||||
.quad _C_LABEL(Xintr_ioapic_level21), _C_LABEL(Xrecurse_ioapic_level21)
|
||||
.quad _C_LABEL(Xresume_ioapic_level21)
|
||||
.quad _C_LABEL(Xintr_ioapic_level22), _C_LABEL(Xrecurse_ioapic_level22)
|
||||
.quad _C_LABEL(Xresume_ioapic_level22)
|
||||
.quad _C_LABEL(Xintr_ioapic_level23), _C_LABEL(Xrecurse_ioapic_level23)
|
||||
.quad _C_LABEL(Xresume_ioapic_level23)
|
||||
.quad _C_LABEL(Xintr_ioapic_level24), _C_LABEL(Xrecurse_ioapic_level24)
|
||||
.quad _C_LABEL(Xresume_ioapic_level24)
|
||||
.quad _C_LABEL(Xintr_ioapic_level25), _C_LABEL(Xrecurse_ioapic_level25)
|
||||
.quad _C_LABEL(Xresume_ioapic_level25)
|
||||
.quad _C_LABEL(Xintr_ioapic_level26), _C_LABEL(Xrecurse_ioapic_level26)
|
||||
.quad _C_LABEL(Xresume_ioapic_level26)
|
||||
.quad _C_LABEL(Xintr_ioapic_level27), _C_LABEL(Xrecurse_ioapic_level27)
|
||||
.quad _C_LABEL(Xresume_ioapic_level27)
|
||||
.quad _C_LABEL(Xintr_ioapic_level28), _C_LABEL(Xrecurse_ioapic_level28)
|
||||
.quad _C_LABEL(Xresume_ioapic_level28)
|
||||
.quad _C_LABEL(Xintr_ioapic_level29), _C_LABEL(Xrecurse_ioapic_level29)
|
||||
.quad _C_LABEL(Xresume_ioapic_level29)
|
||||
.quad _C_LABEL(Xintr_ioapic_level30), _C_LABEL(Xrecurse_ioapic_level30)
|
||||
.quad _C_LABEL(Xresume_ioapic_level30)
|
||||
.quad _C_LABEL(Xintr_ioapic_level31), _C_LABEL(Xrecurse_ioapic_level31)
|
||||
.quad _C_LABEL(Xresume_ioapic_level31)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,63 @@
|
|||
/* $NetBSD: i82093reg.h,v 1.1 2003/04/26 18:39:41 fvdl Exp $ */
|
||||
/* $NetBSD: i82093reg.h,v 1.2 2003/05/04 23:46:41 fvdl Exp $ */
|
||||
|
||||
#include <x86/i82093reg.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_multiprocessor.h"
|
||||
#endif
|
||||
|
||||
#define ioapic_asm_ack(num) \
|
||||
movl $0,(_C_LABEL(local_apic)+LAPIC_EOI)(%rip)
|
||||
|
||||
#ifdef MULTIPROCESSOR
|
||||
|
||||
#define ioapic_asm_lock(num) \
|
||||
movl $1,%esi ;\
|
||||
77: \
|
||||
xchgl %esi,PIC_LOCK(%rdi) ;\
|
||||
testl %esi,%esi ;\
|
||||
jne 77b
|
||||
|
||||
#define ioapic_asm_unlock(num) \
|
||||
movl $0,PIC_LOCK(%rdi)
|
||||
|
||||
#else
|
||||
|
||||
#define ioapic_asm_lock(num)
|
||||
#define ioapic_asm_unlock(num)
|
||||
|
||||
#endif /* MULTIPROCESSOR */
|
||||
|
||||
|
||||
#define ioapic_mask(num) \
|
||||
movq IS_PIC(%r14),%rdi ;\
|
||||
ioapic_asm_lock(num) ;\
|
||||
movl IS_PIN(%r14),%esi ;\
|
||||
leaq 0x10(%rsi,%rsi,1),%rsi ;\
|
||||
movq IOAPIC_SC_REG(%rdi),%r15 ;\
|
||||
movl %esi, (%r15) ;\
|
||||
movq IOAPIC_SC_DATA(%rdi),%r15 ;\
|
||||
movl (%r15),%esi ;\
|
||||
orl $IOAPIC_REDLO_MASK,%esi ;\
|
||||
movl %esi,(%r15) ;\
|
||||
ioapic_asm_unlock(num)
|
||||
|
||||
#define ioapic_unmask(num) \
|
||||
cmpq $IREENT_MAGIC,(TF_ERR+8)(%rsp) ;\
|
||||
jne 79f ;\
|
||||
movq IS_PIC(%r14),%rdi ;\
|
||||
ioapic_asm_lock(num) ;\
|
||||
movl IS_PIN(%r14),%esi ;\
|
||||
leaq 0x10(%rsi,%rsi,1),%rsi ;\
|
||||
movq IOAPIC_SC_REG(%rdi),%r15 ;\
|
||||
movl %esi, (%r15) ;\
|
||||
movq IOAPIC_SC_DATA(%rdi),%r15 ;\
|
||||
movl (%r15),%esi ;\
|
||||
andl $~IOAPIC_REDLO_MASK,%esi ;\
|
||||
movl %esi,(%r15) ;\
|
||||
ioapic_asm_unlock(num) ;\
|
||||
79:
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue