feat: changed font to 8x16; kfetch
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user