Commit 7b01b9a2 by malcolm

Update idt.c

parent 51ad7510
Showing with 6 additions and 5 deletions
......@@ -33,7 +33,7 @@ idt_desc* get_ir(uint32_t i)
{
if (i > MAX_IDT_INT)
{
return 0;
return 0;
}
return &_idt[i];
}
......@@ -42,11 +42,11 @@ int install_ir(uint32_t i, uint16_t flags, uint16_t code_sel, IRQ_HANDLER irq)
{
if (i > MAX_IDT_INT)
{
return 0;
return 0;
}
if (!irq)
{
return 0;
return 0;
}
uint64_t uiBase = (uintptr_t)(&(*irq));
_idt[i].low_base = (uint16_t)(uiBase & 0xffff);
......@@ -64,9 +64,9 @@ int idt_init(uint16_t code_sel)
memset ((void*)&_idt[0], 0, sizeof (idt_desc) * MAX_IDT_INT-1);
for (int i=0; i<MAX_IDT_INT; i++)
{
install_ir (i, IDT_PR|IDT_32, code_sel, (IRQ_HANDLER)default_handler);
install_ir (i, IDT_PR|IDT_32, code_sel, (IRQ_HANDLER)default_handler);
}
idt_install();
return 0;
}
#pragma GCC pop_options
#pragma GCC pop_options
\ No newline at end of file
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 sign in to comment