Some unfinished changes + TODO chnages

This commit is contained in:
2025-03-18 20:40:29 +01:00
parent 244b83d370
commit 883cd5c1d4
11 changed files with 333 additions and 205 deletions
+7 -9
View File
@@ -76,17 +76,15 @@ extern uint32_t __kernel_start, __kernel_end;
/*
* Logging and errors
*/
// TODO: Logging with printk()
// TODO: Log levels & pr_*() wrappers for printk()
#define BUG() (panic("BUG()"))
// TODO
#define printk(_s) NULL
#define pr_dbg(_s) NULL
#define pr_wrn(_s) NULL
#define pr_err(_s) NULL
#define panic(_s) NULL
#define BUG() NULL
#define WARN() NULL
#define BUG_ON(_e) ((_e) ? BUG() : NULL)
#define WARN_ON(_e) ((_e) ? WARN() : NULL)
#include <serial.h>
__noreturn static inline void panic(char* s) {
serial_puts(COM1, s);
__asm__ volatile("cli");
while (1) __asm__ volatile ("hlt");
}
#endif