Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/atpic_vector.s
Show All 30 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
/* | /* | ||||
* Interrupt entry points for external interrupts triggered by the 8259A | * Interrupt entry points for external interrupts triggered by the 8259A | ||||
* master and slave interrupt controllers. | * master and slave interrupt controllers. | ||||
*/ | */ | ||||
#include <machine/psl.h> | |||||
#include <machine/asmacros.h> | #include <machine/asmacros.h> | ||||
#include "assym.inc" | #include "assym.inc" | ||||
/* | /* | ||||
* Macros for interrupt entry, call to handler, and exit. | * Macros for interrupt entry, call to handler, and exit. | ||||
*/ | */ | ||||
#define INTR(irq_num, vec_name) \ | .macro INTR irq_num, vec_name | ||||
.text ; \ | .text | ||||
SUPERALIGN_TEXT ; \ | SUPERALIGN_TEXT | ||||
IDTVEC(vec_name ##_pti) ; \ | .globl X\()\vec_name\()_pti, X\()\vec_name | ||||
IDTVEC(vec_name) ; \ | |||||
PUSH_FRAME ; \ | X\()\vec_name\()_pti: | ||||
SET_KERNEL_SREGS ; \ | X\()\vec_name: | ||||
cld ; \ | PUSH_FRAME | ||||
; \ | SET_KERNEL_SREGS | ||||
FAKE_MCOUNT(TF_EIP(%esp)) ; \ | cld | ||||
pushl %esp ; \ | KENTER | ||||
pushl $irq_num; /* pass the IRQ */ \ | FAKE_MCOUNT(TF_EIP(%esp)) | ||||
call atpic_handle_intr ; \ | pushl %esp | ||||
addl $8, %esp ; /* discard the parameters */ \ | pushl $\irq_num /* pass the IRQ */ | ||||
; \ | movl $atpic_handle_intr, %eax | ||||
MEXITCOUNT ; \ | call *%eax | ||||
addl $8, %esp /* discard the parameters */ | |||||
MEXITCOUNT | |||||
jmp doreti | jmp doreti | ||||
.endm | |||||
INTR(0, atpic_intr0) | INTR 0, atpic_intr0 | ||||
INTR(1, atpic_intr1) | INTR 1, atpic_intr1 | ||||
INTR(2, atpic_intr2) | INTR 2, atpic_intr2 | ||||
INTR(3, atpic_intr3) | INTR 3, atpic_intr3 | ||||
INTR(4, atpic_intr4) | INTR 4, atpic_intr4 | ||||
INTR(5, atpic_intr5) | INTR 5, atpic_intr5 | ||||
INTR(6, atpic_intr6) | INTR 6, atpic_intr6 | ||||
INTR(7, atpic_intr7) | INTR 7, atpic_intr7 | ||||
INTR(8, atpic_intr8) | INTR 8, atpic_intr8 | ||||
INTR(9, atpic_intr9) | INTR 9, atpic_intr9 | ||||
INTR(10, atpic_intr10) | INTR 10, atpic_intr10 | ||||
INTR(11, atpic_intr11) | INTR 11, atpic_intr11 | ||||
INTR(12, atpic_intr12) | INTR 12, atpic_intr12 | ||||
INTR(13, atpic_intr13) | INTR 13, atpic_intr13 | ||||
INTR(14, atpic_intr14) | INTR 14, atpic_intr14 | ||||
INTR(15, atpic_intr15) | INTR 15, atpic_intr15 |