GDT, page frame allocator

This commit is contained in:
Daniel Hammer
2025-02-27 19:48:03 +04:00
commit 6f1c6f1316
31 changed files with 2016 additions and 0 deletions
+18
View File
@@ -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
}
}