Commit 278ac9f8 authored by Mathieu Maret's avatar Mathieu Maret

Rename IRQ exception base addr

parent 0d43780f
......@@ -23,7 +23,7 @@ int irqSetRoutine(int irq, irq_handler handler)
if (handler != NULL) {
int ret =
idt_set_handler(IRQ_BASE_ADDRESS + irq, (unsigned int)irq_handler_array[irq], 0);
idt_set_handler(IRQ_INTERRUPT_BASE_ADDRESS + irq, (unsigned int)irq_handler_array[irq], 0);
if (!ret)
enableIrq(irq);
}
......
......@@ -28,7 +28,7 @@
#define IRQ_HARDDISK 14
#define IRQ_RESERVED_5 15
#define IRQ_BASE_ADDRESS 0x20
#define IRQ_INTERRUPT_BASE_ADDRESS 0x20
#define IRQ_NUM 16
// An handler should finish by the iret opcode -> https://wiki.osdev.org/Interrupt_Service_Routines
......
......@@ -23,8 +23,8 @@ void initPic(void)
/* Send ICW2: ctrl base address. Remap IRQ from interupt range 0x0-0xF to 0x20-0x2F as
* intel
* reserve interupt 0x0-0x1F in protected mode (e.g. 0-7 are CPU exception) */
outb(IRQ_BASE_ADDRESS, PIC_MASTER_DATA);
outb(IRQ_BASE_ADDRESS + 8, PIC_SLAVE_DATA);
outb(IRQ_INTERRUPT_BASE_ADDRESS, PIC_MASTER_DATA);
outb(IRQ_INTERRUPT_BASE_ADDRESS + 8, PIC_SLAVE_DATA);
/* Send ICW3 master: mask where slaves are connected */
outb(0x4, PIC_MASTER_DATA);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment