Kernel: Rename idt_init() to initialize_interrupts()

Also move the function out of the x86/Interrupts.h file into the generic
Interrupts.h file and add a stub for aarch64.
This commit is contained in:
Timon Kruiper 2022-05-17 11:07:02 +02:00 committed by Linus Groh
parent 02b94c6f0e
commit cbe1717181
Notes: sideshowbarker 2024-07-17 10:31:07 +09:00
5 changed files with 9 additions and 4 deletions

View File

@ -21,4 +21,6 @@ GenericInterruptHandler& get_interrupt_handler(u8 interrupt_number);
void register_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
void unregister_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
void initialize_interrupts();
}

View File

@ -23,4 +23,9 @@ void unregister_generic_interrupt_handler(u8, GenericInterruptHandler&)
VERIFY_NOT_REACHED();
}
void initialize_interrupts()
{
VERIFY_NOT_REACHED();
}
}

View File

@ -44,6 +44,4 @@ void register_interrupt_handler(u8 number, void (*handler)());
void register_user_callable_interrupt_handler(u8 number, void (*handler)());
void register_disabled_interrupt_handler(u8 number, GenericInterruptHandler& handler);
void idt_init();
}

View File

@ -615,7 +615,7 @@ UNMAP_AFTER_INIT void flush_idt()
asm("lidt %0" ::"m"(s_idtr));
}
UNMAP_AFTER_INIT void idt_init()
UNMAP_AFTER_INIT void initialize_interrupts()
{
s_idtr.address = s_idt;
s_idtr.limit = 256 * sizeof(IDTEntry) - 1;

View File

@ -656,7 +656,7 @@ UNMAP_AFTER_INIT void Processor::initialize(u32 cpu)
#endif
if (cpu == 0)
idt_init();
initialize_interrupts();
else
flush_idt();