Updated pic init
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <myke/cpu/isr.h>
|
||||
#include <myke/debug/debug.h>
|
||||
#include <myke/cpu/idt.h>
|
||||
#include <myke/cpu/pic.h>
|
||||
#include <myke/cpu/syscall_handler.h>
|
||||
#include <myke/drivers/ports.h>
|
||||
#include <myke/libk/libk.h>
|
||||
@@ -52,19 +53,10 @@ void isr_install() {
|
||||
|
||||
// Remap the PIC
|
||||
// todo make readable
|
||||
port_byte_out(0x20, 0x11);
|
||||
port_byte_out(0xA0, 0x11);
|
||||
port_byte_out(0x21, 0x20);
|
||||
port_byte_out(0xA1, 0x28);
|
||||
port_byte_out(0x21, 0x04);
|
||||
port_byte_out(0xA1, 0x02);
|
||||
port_byte_out(0x21, 0x01);
|
||||
port_byte_out(0xA1, 0x01);
|
||||
port_byte_out(0x21, 0x0);
|
||||
port_byte_out(0xA1, 0x0);
|
||||
pic_init();
|
||||
|
||||
// Install the IRQs
|
||||
set_idt_gate(32, (uint32_t) irq0);
|
||||
set_idt_gate(32, (uint32_t) irq0); // 0x20
|
||||
set_idt_gate(33, (uint32_t) irq1);
|
||||
set_idt_gate(34, (uint32_t) irq2);
|
||||
set_idt_gate(35, (uint32_t) irq3);
|
||||
@@ -72,7 +64,7 @@ void isr_install() {
|
||||
set_idt_gate(37, (uint32_t) irq5);
|
||||
set_idt_gate(38, (uint32_t) irq6);
|
||||
set_idt_gate(39, (uint32_t) irq7);
|
||||
set_idt_gate(40, (uint32_t) irq8);
|
||||
set_idt_gate(40, (uint32_t) irq8); // 0x28
|
||||
set_idt_gate(41, (uint32_t) irq9);
|
||||
set_idt_gate(42, (uint32_t) irq10);
|
||||
set_idt_gate(43, (uint32_t) irq11);
|
||||
|
||||
Reference in New Issue
Block a user