Init struct + freeing a bit of kmain()

This commit is contained in:
2026-03-08 13:21:19 +01:00
parent 5e9c582833
commit 42c7a55d3f
9 changed files with 71 additions and 33 deletions
+14 -1
View File
@@ -19,8 +19,11 @@ enum ErrorCodes
#include "io/serial/serial.h"
#include "io/term/printf.h"
#include "idt/idt.h"
#include <stdbool.h>
#define DEBUG(log, ...) fctprintf((void*)&skputc, 0, "debug: [%s]: " log "\r\n", __FILE__, ##__VA_ARGS__)
extern volatile uint64_t ticks;
#define DEBUG(log, ...) fctprintf((void*)&skputc, 0, "[%8u] debug: [%s]: " log "\r\n", ticks, __FILE__, ##__VA_ARGS__)
/* #define DEBUG(log, ...) \
@@ -38,6 +41,7 @@ void panic(struct cpu_status_t* ctx, const char* str);
void hcf();
void idle();
/* debug */
void debug_stack_trace(unsigned int max_frames);
const char* debug_find_symbol(uintptr_t rip, uintptr_t* offset);
void boot_mem_display();
@@ -52,4 +56,13 @@ struct boot_context
struct limine_kernel_address_response* kaddr;
};
// Are these modules initialized yet?
struct init_status
{
bool terminal;
bool serial;
bool keyboard;
bool timer;
};
#endif