Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/apic_vector.s
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
* each interrupt source, we use one entry point for each 32-bit word | * each interrupt source, we use one entry point for each 32-bit word | ||||
* in the ISR. The handler determines the highest bit set in the ISR, | * in the ISR. The handler determines the highest bit set in the ISR, | ||||
* translates that into a vector, and passes the vector to the | * translates that into a vector, and passes the vector to the | ||||
* lapic_handle_intr() function. | * lapic_handle_intr() function. | ||||
*/ | */ | ||||
#define ISR_VEC(index, vec_name) \ | #define ISR_VEC(index, vec_name) \ | ||||
.text ; \ | .text ; \ | ||||
SUPERALIGN_TEXT ; \ | SUPERALIGN_TEXT ; \ | ||||
IDTVEC(vec_name ## _pti) ; \ | |||||
IDTVEC(vec_name) ; \ | IDTVEC(vec_name) ; \ | ||||
PUSH_FRAME ; \ | PUSH_FRAME ; \ | ||||
SET_KERNEL_SREGS ; \ | SET_KERNEL_SREGS ; \ | ||||
cld ; \ | cld ; \ | ||||
FAKE_MCOUNT(TF_EIP(%esp)) ; \ | FAKE_MCOUNT(TF_EIP(%esp)) ; \ | ||||
cmpl $0,x2apic_mode ; \ | cmpl $0,x2apic_mode ; \ | ||||
je 1f ; \ | je 1f ; \ | ||||
movl $(MSR_APIC_ISR0 + index),%ecx ; \ | movl $(MSR_APIC_ISR0 + index),%ecx ; \ | ||||
Show All 37 Lines | IDTVEC(spuriousint) | ||||
ISR_VEC(6, apic_isr6) | ISR_VEC(6, apic_isr6) | ||||
ISR_VEC(7, apic_isr7) | ISR_VEC(7, apic_isr7) | ||||
/* | /* | ||||
* Local APIC periodic timer handler. | * Local APIC periodic timer handler. | ||||
*/ | */ | ||||
.text | .text | ||||
SUPERALIGN_TEXT | SUPERALIGN_TEXT | ||||
IDTVEC(timerint_pti) | |||||
IDTVEC(timerint) | IDTVEC(timerint) | ||||
PUSH_FRAME | PUSH_FRAME | ||||
SET_KERNEL_SREGS | SET_KERNEL_SREGS | ||||
cld | cld | ||||
FAKE_MCOUNT(TF_EIP(%esp)) | FAKE_MCOUNT(TF_EIP(%esp)) | ||||
pushl %esp | pushl %esp | ||||
call lapic_handle_timer | call lapic_handle_timer | ||||
add $4, %esp | add $4, %esp | ||||
MEXITCOUNT | MEXITCOUNT | ||||
jmp doreti | jmp doreti | ||||
/* | /* | ||||
* Local APIC CMCI handler. | * Local APIC CMCI handler. | ||||
*/ | */ | ||||
.text | .text | ||||
SUPERALIGN_TEXT | SUPERALIGN_TEXT | ||||
IDTVEC(cmcint_pti) | |||||
IDTVEC(cmcint) | IDTVEC(cmcint) | ||||
PUSH_FRAME | PUSH_FRAME | ||||
SET_KERNEL_SREGS | SET_KERNEL_SREGS | ||||
cld | cld | ||||
FAKE_MCOUNT(TF_EIP(%esp)) | FAKE_MCOUNT(TF_EIP(%esp)) | ||||
call lapic_handle_cmc | call lapic_handle_cmc | ||||
MEXITCOUNT | MEXITCOUNT | ||||
jmp doreti | jmp doreti | ||||
/* | /* | ||||
* Local APIC error interrupt handler. | * Local APIC error interrupt handler. | ||||
*/ | */ | ||||
.text | .text | ||||
SUPERALIGN_TEXT | SUPERALIGN_TEXT | ||||
IDTVEC(errorint_pti) | |||||
IDTVEC(errorint) | IDTVEC(errorint) | ||||
PUSH_FRAME | PUSH_FRAME | ||||
SET_KERNEL_SREGS | SET_KERNEL_SREGS | ||||
cld | cld | ||||
FAKE_MCOUNT(TF_EIP(%esp)) | FAKE_MCOUNT(TF_EIP(%esp)) | ||||
call lapic_handle_error | call lapic_handle_error | ||||
MEXITCOUNT | MEXITCOUNT | ||||
jmp doreti | jmp doreti | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |