mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
use generic numbers for the IPIs (shutdown, TLB shootdown)
This commit is contained in:
parent
a04bde011f
commit
4805e62467
3 changed files with 15 additions and 11 deletions
|
@ -714,9 +714,9 @@ int apic_init(void)
|
|||
// set APIC error handler
|
||||
irq_install_handler(126, apic_err_handler);
|
||||
#if MAX_CORES > 1
|
||||
irq_install_handler(124, apic_tlb_handler);
|
||||
irq_install_handler(80+32, apic_tlb_handler);
|
||||
#endif
|
||||
irq_install_handler(122, apic_shutdown);
|
||||
irq_install_handler(81+32, apic_shutdown);
|
||||
kprintf("Boot processor %u (ID %u)\n", boot_processor, apic_processors[boot_processor]->id);
|
||||
online[boot_processor] = 1;
|
||||
|
||||
|
|
|
@ -289,12 +289,12 @@ isrstub_pseudo_error 9
|
|||
%assign i i+1
|
||||
%endrep
|
||||
|
||||
global apic_shutdown
|
||||
align 16
|
||||
apic_shutdown:
|
||||
push byte 0 ; pseudo error code
|
||||
push byte 122
|
||||
jmp common_stub
|
||||
; Create entries for the interrupts 80 to 81
|
||||
%assign i 80
|
||||
%rep 2
|
||||
irqstub i
|
||||
%assign i i+1
|
||||
%endrep
|
||||
|
||||
global apic_timer
|
||||
align 16
|
||||
|
|
|
@ -71,7 +71,8 @@ extern void irq20(void);
|
|||
extern void irq21(void);
|
||||
extern void irq22(void);
|
||||
extern void irq23(void);
|
||||
extern void apic_shutdown(void);
|
||||
extern void irq80(void);
|
||||
extern void irq81(void);
|
||||
extern void apic_timer(void);
|
||||
extern void apic_lint0(void);
|
||||
extern void apic_lint1(void);
|
||||
|
@ -211,9 +212,12 @@ static int irq_install(void)
|
|||
idt_set_gate(55, (size_t)irq23, KERNEL_CODE_SELECTOR,
|
||||
IDT_FLAG_PRESENT|IDT_FLAG_RING0|IDT_FLAG_32BIT|IDT_FLAG_INTTRAP);
|
||||
|
||||
idt_set_gate(112, (size_t)irq80, KERNEL_CODE_SELECTOR,
|
||||
IDT_FLAG_PRESENT|IDT_FLAG_RING0|IDT_FLAG_32BIT|IDT_FLAG_INTTRAP);
|
||||
idt_set_gate(113, (size_t)irq81, KERNEL_CODE_SELECTOR,
|
||||
IDT_FLAG_PRESENT|IDT_FLAG_RING0|IDT_FLAG_32BIT|IDT_FLAG_INTTRAP);
|
||||
|
||||
// add APIC interrupt handler
|
||||
idt_set_gate(122, (size_t)apic_shutdown, KERNEL_CODE_SELECTOR,
|
||||
IDT_FLAG_PRESENT|IDT_FLAG_RING0|IDT_FLAG_32BIT|IDT_FLAG_INTTRAP);
|
||||
idt_set_gate(123, (size_t)apic_timer, KERNEL_CODE_SELECTOR,
|
||||
IDT_FLAG_PRESENT|IDT_FLAG_RING0|IDT_FLAG_32BIT|IDT_FLAG_INTTRAP);
|
||||
idt_set_gate(124, (size_t)apic_lint0, KERNEL_CODE_SELECTOR,
|
||||
|
|
Loading…
Add table
Reference in a new issue