2023-05-17 20:42:59 -07:00
|
|
|
#include "debug/debug.h"
|
|
|
|
|
|
|
|
#include "common/port.h"
|
|
|
|
|
|
|
|
#define COM1 0x3f8
|
|
|
|
|
|
|
|
void dbgln(const char* str) {
|
|
|
|
while (*str != 0) {
|
|
|
|
outb(COM1, *str);
|
|
|
|
str++;
|
|
|
|
}
|
|
|
|
outb(COM1, '\n');
|
|
|
|
}
|
2023-05-17 22:54:37 -07:00
|
|
|
|
|
|
|
void panic(const char* str) {
|
|
|
|
asm volatile("cli");
|
|
|
|
dbgln(str);
|
|
|
|
dbgln("PANIC");
|
|
|
|
while (1)
|
|
|
|
;
|
|
|
|
}
|