Revamped kernel panic functions with significant improvements

This commit is contained in:
EnderIce2
2024-02-28 06:31:02 +02:00
parent ddad5ca38a
commit 5fd8d3b3a5
23 changed files with 2057 additions and 3573 deletions

View File

@ -34,7 +34,6 @@
#elif defined(aa64)
#endif
#include "crashhandler.hpp"
#include "../kernel.h"
void HandleException(CPU::ExceptionFrame *Frame);
@ -112,7 +111,6 @@ namespace Interrupts
/* APIC::Timer */ void *apicTimer[MAX_CPU] = {nullptr};
#elif defined(aa64)
#endif
void *InterruptFrames[INT_FRAMES_MAX];
void Initialize(int Core)
{
@ -293,17 +291,6 @@ namespace Interrupts
#endif
// debug("IRQ%ld", Frame->InterruptNumber - 32);
memmove(InterruptFrames + 1,
InterruptFrames,
sizeof(InterruptFrames) - sizeof(InterruptFrames[0]));
#if defined(a64)
InterruptFrames[0] = (void *)Frame->rip;
#elif defined(a32)
InterruptFrames[0] = (void *)Frame->eip;
#elif defined(aa64)
InterruptFrames[0] = (void *)Frame->pc;
#endif
CPUData *CoreData = GetCurrentCPU();
int Core = 0;
if (likely(CoreData != nullptr))