mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-18 09:04:49 -04:00
Send EOI first
This commit is contained in:
parent
7cc6c9dc5a
commit
6be9f46bcf
@ -232,11 +232,6 @@ void _fault_handler(interrupt::fault_regs regs){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _irq_handler(interrupt::syscall_regs regs){
|
void _irq_handler(interrupt::syscall_regs regs){
|
||||||
//If there is an handler, call it
|
|
||||||
if(irq_handlers[regs.code]){
|
|
||||||
irq_handlers[regs.code](regs);
|
|
||||||
}
|
|
||||||
|
|
||||||
//If the IRQ is on the slave controller, send EOI to it
|
//If the IRQ is on the slave controller, send EOI to it
|
||||||
if(regs.code >= 8){
|
if(regs.code >= 8){
|
||||||
out_byte(0xA0, 0x20);
|
out_byte(0xA0, 0x20);
|
||||||
@ -244,6 +239,11 @@ void _irq_handler(interrupt::syscall_regs regs){
|
|||||||
|
|
||||||
//Send EOI to the master controller
|
//Send EOI to the master controller
|
||||||
out_byte(0x20, 0x20);
|
out_byte(0x20, 0x20);
|
||||||
|
|
||||||
|
//If there is an handler, call it
|
||||||
|
if(irq_handlers[regs.code]){
|
||||||
|
irq_handlers[regs.code](regs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _syscall_handler(interrupt::syscall_regs regs){
|
void _syscall_handler(interrupt::syscall_regs regs){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user