summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-05-17 11:07:02 +0200
committerLinus Groh <mail@linusgroh.de>2022-06-02 13:14:12 +0100
commitcbe171718181f93eb6bc11384690f70c7b4fe2b1 (patch)
tree617618617a767aa0eaa0af697e682e5296496e46 /Kernel
parent02b94c6f0e47371a574732c80e26dc3baf1aad7f (diff)
downloadserenity-cbe171718181f93eb6bc11384690f70c7b4fe2b1.zip
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.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Arch/Interrupts.h2
-rw-r--r--Kernel/Arch/aarch64/Interrupts.cpp5
-rw-r--r--Kernel/Arch/x86/Interrupts.h2
-rw-r--r--Kernel/Arch/x86/common/Interrupts.cpp2
-rw-r--r--Kernel/Arch/x86/common/Processor.cpp2
5 files changed, 9 insertions, 4 deletions
diff --git a/Kernel/Arch/Interrupts.h b/Kernel/Arch/Interrupts.h
index 5b41ccab77..9e5a6212fb 100644
--- a/Kernel/Arch/Interrupts.h
+++ b/Kernel/Arch/Interrupts.h
@@ -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();
+
}
diff --git a/Kernel/Arch/aarch64/Interrupts.cpp b/Kernel/Arch/aarch64/Interrupts.cpp
index 54b2f85839..5a69b1a0c3 100644
--- a/Kernel/Arch/aarch64/Interrupts.cpp
+++ b/Kernel/Arch/aarch64/Interrupts.cpp
@@ -23,4 +23,9 @@ void unregister_generic_interrupt_handler(u8, GenericInterruptHandler&)
VERIFY_NOT_REACHED();
}
+void initialize_interrupts()
+{
+ VERIFY_NOT_REACHED();
+}
+
}
diff --git a/Kernel/Arch/x86/Interrupts.h b/Kernel/Arch/x86/Interrupts.h
index 2e5ccaab03..5068ff3a13 100644
--- a/Kernel/Arch/x86/Interrupts.h
+++ b/Kernel/Arch/x86/Interrupts.h
@@ -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();
-
}
diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp
index d52e0b17d8..6e75c219c4 100644
--- a/Kernel/Arch/x86/common/Interrupts.cpp
+++ b/Kernel/Arch/x86/common/Interrupts.cpp
@@ -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;
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp
index 632d24e2b9..69cd84a663 100644
--- a/Kernel/Arch/x86/common/Processor.cpp
+++ b/Kernel/Arch/x86/common/Processor.cpp
@@ -656,7 +656,7 @@ UNMAP_AFTER_INIT void Processor::initialize(u32 cpu)
#endif
if (cpu == 0)
- idt_init();
+ initialize_interrupts();
else
flush_idt();