forked from xamidev/pepperOS
Switch to nanoprintf + good spinlock (rflags) = no more FLANTERM ISSUES???
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "kernel.h"
|
||||
|
||||
extern struct init_status init;
|
||||
extern int panic_count;
|
||||
|
||||
/*
|
||||
* reaf_rflags - provide easy reading of the RFLAGS register
|
||||
@@ -70,11 +71,12 @@ void read_rflags(uint64_t rflags)
|
||||
void panic(struct cpu_status_t* ctx, const char* str)
|
||||
{
|
||||
CLEAR_INTERRUPTS;
|
||||
panic_count += 1;
|
||||
if (ctx == NULL) {
|
||||
DEBUG("\x1b[38;5;231m\x1b[48;5;196mKernel panic!!!\x1b[0m Something went horribly wrong! (no cpu ctx)");
|
||||
fctprintf((void*)&skputc, 0, "\x1b[38;5;231m\x1b[48;5;27m");
|
||||
printf("\x1b[38;5;231m\x1b[48;5;27m");
|
||||
DIE_DEBUG(str);
|
||||
fctprintf((void*)&skputc, 0, "\x1b[0m");
|
||||
printf("\x1b[0m");
|
||||
skputc('\r');
|
||||
skputc('\n');
|
||||
DEBUG("\x1b[38;5;231m\x1b[48;5;196mend Kernel panic\x1b[0m");
|
||||
|
||||
Reference in New Issue
Block a user