GDT, page frame allocator
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "Panic.hpp"
|
||||
|
||||
void Panic(const char *meditationString, System::Registers registers) {
|
||||
kerr << "=========== Kernel panic ===========" << Kt::newline;
|
||||
kerr << meditationString << Kt::newline;
|
||||
|
||||
|
||||
while (true) {
|
||||
#if defined (__x86_64__)
|
||||
asm ("cli");
|
||||
asm ("hlt");
|
||||
#elif defined (__aarch64__) || defined (__riscv)
|
||||
asm ("wfi");
|
||||
#elif defined (__loongarch64)
|
||||
asm ("idle 0");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <System/Registers.hpp>
|
||||
#include <KernelTerminal/terminal.hpp>
|
||||
|
||||
void Panic(const char *meditationString, System::Registers registers);
|
||||
Reference in New Issue
Block a user