Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/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 "assym.s" | |||||
#include <machine/asmacros.h> | #include <machine/asmacros.h> | ||||
#include "assym.s" | |||||
/* | /* | ||||
* 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 ; \ | INTR_HANDLER \vec_name | ||||
SUPERALIGN_TEXT ; \ | INTR_PUSH_FRAME | ||||
IDTVEC(vec_name) ; \ | FAKE_MCOUNT(TF_RIP(%rsp)) | ||||
PUSH_FRAME ; \ | movq %rsp, %rsi | ||||
FAKE_MCOUNT(TF_RIP(%rsp)) ; \ | movl $\irq_num, %edi /* pass the IRQ */ | ||||
movq %rsp, %rsi ; \ | call atpic_handle_intr | ||||
movl $irq_num, %edi; /* pass the IRQ */ \ | MEXITCOUNT | ||||
call atpic_handle_intr ; \ | |||||
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 |