From f8942434df8aa9d0caf6572c95e8763398803c97 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 6 May 2025 19:09:42 +0200 Subject: [PATCH] enable interrupts for each core --- arch/ioapic.h | 2 +- main.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/ioapic.h b/arch/ioapic.h index 2f3480f..a5282ef 100644 --- a/arch/ioapic.h +++ b/arch/ioapic.h @@ -57,7 +57,7 @@ void config(uint8_t slot, Core::Interrupt::Vector vector, * To fully enable interrupt handling, the interrupts must be enabled for every * CPU (e.g., by calling * \ref Core::Interrupt::enable() in main). - * \todo(12) Do that somewhere appropriate. + * \todo Do that somewhere appropriate. * * \param slot Number of the external interrupt that should be enabled. * diff --git a/main.cc b/main.cc index c25e180..aa0ad01 100644 --- a/main.cc +++ b/main.cc @@ -112,6 +112,8 @@ extern "C" int main() { ApplicationProcessor::boot(); PS2Controller::init(); + Core::Interrupt:enable() + Key key = Key(); while (true){ if (PS2Controller::fetch(key)) { @@ -125,6 +127,7 @@ extern "C" int main() { extern "C" int main_ap() { DBG_VERBOSE << "CPU core " << static_cast(Core::getID()) << " / LAPIC " << static_cast(LAPIC::getID()) << " in main_ap()" << endl; + Core::Interrupt:enable()