2021-02-14 09:01:52 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-02-14 09:01:52 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <AK/Format.h>
|
2021-03-07 21:28:28 +01:00
|
|
|
#include <Kernel/Arch/x86/CPU.h>
|
2021-02-14 09:01:52 +01:00
|
|
|
#include <Kernel/KSyms.h>
|
|
|
|
|
#include <Kernel/Panic.h>
|
|
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
|
|
void __panic(const char* file, unsigned int line, const char* function)
|
|
|
|
|
{
|
2021-04-16 22:58:51 +03:00
|
|
|
critical_dmesgln("at {}:{} in {}", file, line, function);
|
2021-02-14 09:01:52 +01:00
|
|
|
dump_backtrace();
|
|
|
|
|
Processor::halt();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|