Switch to nanoprintf + good spinlock (rflags) = no more FLANTERM ISSUES???

This commit is contained in:
2026-03-15 09:34:17 +01:00
parent 6a3abb0f55
commit af3a9e27fd
15 changed files with 1708 additions and 1039 deletions

View File

@@ -7,6 +7,7 @@
#include <kernel.h>
#include "limine.h"
#include "string/string.h"
#include <stddef.h>
extern struct boot_context boot_ctx;

View File

@@ -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");

View File

@@ -6,6 +6,7 @@
#include <stdint.h>
#include "kernel.h"
#include <stddef.h>
extern struct init_status init;