feat: changed font to 8x16; kfetch

This commit is contained in:
Karina
2025-12-22 00:11:32 +04:00
parent dd4155584a
commit 2c998b53e5
11 changed files with 234 additions and 166 deletions
+12 -4
View File
@@ -1,6 +1,7 @@
#include "panic.h"
#include "console.h"
#include "types.h"
#include "shitgui.h"
const char* exception_messages[] = {
@@ -42,17 +43,24 @@ __attribute__((noreturn)) void panic(Registers *regs) {
console_clear(0xFF0000);
console_set_color(0xFFFFFF);
SG_Point p = console_get_dimensions();
p.x /= 2;
p.y /= 2;
p.y -= 200;
console_set_cursor_pos(&p);
kprintf("\n\n");
kprintf("\t\t KERNEL PANIC :( \n");
kprintf("\t\t-------------------\n");
kprintf("\t\t\tKERNEL PANIC :( \n");
kprintf("\t\t-------------------------\n");
kprintf("\t\tCPU EXCEPTION: %d (%s)\n", regs->int_no, exception_messages[regs->int_no]);
kprintf("\t\tError Code: 0x%x\n", regs->err_code);
kprintf("\t\tInstruction Pointer (RIP): 0x%x\n", regs->rip);
kprintf("\t\tCode Segment (CS): 0x%x\n", regs->cs);
kprintf("\t\tFlags (RFLAGS): 0x%x\n", regs->rflags);
kprintf("\t\tStack Pointer (RSP): 0x%x\n", regs->rsp);
kprintf("\t\t-------------------\n");
kprintf(" \tSystem halted.\n");
kprintf("\t\t-------------------------\n");
kprintf("\t\t\tSystem halted.\n");
while (1) {
__asm__ volatile ("cli; hlt");