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

Kernel: Unify x86-64 and AArch64 __panic implementation

We now have everything in the AArch64 kernel to be able to use the full
`__panic` implementation, so we can share the code with x86-64.

I have kept `__assertion_failed` separate for now, as the x86-64 version
directly executes inline assembly, thus `Kernel/Arch/aarch64/Panic.cpp`
could not be removed.
This commit is contained in:
Daniel Bertalan 2023-05-15 07:38:47 +02:00 committed by Andrew Kaster
parent d6d097b671
commit 555d301e3b
2 changed files with 1 additions and 9 deletions

View file

@ -22,11 +22,3 @@ using namespace Kernel;
// Used for printing a nice backtrace!
PANIC("Aborted");
}
void Kernel::__panic(char const* file, unsigned int line, char const* function)
{
critical_dmesgln("at {}:{} in {}", file, line, function);
dump_backtrace(PrintToScreen::Yes);
Processor::halt();
}

View file

@ -260,6 +260,7 @@ set(KERNEL_SOURCES
Net/Socket.cpp
Net/TCPSocket.cpp
Net/UDPSocket.cpp
Panic.cpp
PerformanceEventBuffer.cpp
Process.cpp
ProcessGroup.cpp
@ -405,7 +406,6 @@ if ("${SERENITY_ARCH}" STREQUAL "x86_64")
# TODO: Share these with the aarch64 build
Interrupts/SpuriousInterruptHandler.cpp
kprintf.cpp
Panic.cpp
)
set(KERNEL_SOURCES