1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

Kernel: Use PANIC() in a bunch of places :^)

This commit is contained in:
Andreas Kling 2021-02-14 09:30:31 +01:00
parent c598a95b1c
commit b712345c92
8 changed files with 26 additions and 42 deletions

View file

@ -36,6 +36,7 @@
#include <Kernel/IO.h>
#include <Kernel/Interrupts/APIC.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
#include <Kernel/Panic.h>
#include <Kernel/Thread.h>
#include <Kernel/Time/APICTimer.h>
#include <Kernel/VM/MemoryManager.h>
@ -424,8 +425,7 @@ void APIC::enable(u32 cpu)
{
if (cpu >= 8) {
// TODO: x2apic support?
klog() << "SMP support is currently limited to 8 CPUs!";
Processor::halt();
PANIC("SMP support is currently limited to 8 CPUs!");
}
// Use the CPU# as logical apic id

View file

@ -25,6 +25,7 @@
*/
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
#include <Kernel/Panic.h>
namespace Kernel {
UnhandledInterruptHandler::UnhandledInterruptHandler(u8 interrupt_vector)
@ -34,14 +35,12 @@ UnhandledInterruptHandler::UnhandledInterruptHandler(u8 interrupt_vector)
void UnhandledInterruptHandler::handle_interrupt(const RegisterState&)
{
dbgln("Interrupt: Unhandled vector {} was invoked for handle_interrupt(RegisterState&).", interrupt_number());
Processor::halt();
PANIC("Interrupt: Unhandled vector {} was invoked for handle_interrupt(RegisterState&).", interrupt_number());
}
[[noreturn]] bool UnhandledInterruptHandler::eoi()
{
dbgln("Interrupt: Unhandled vector {} was invoked for eoi().", interrupt_number());
Processor::halt();
PANIC("Interrupt: Unhandled vector {} was invoked for eoi().", interrupt_number());
}
UnhandledInterruptHandler::~UnhandledInterruptHandler()