diff options
author | Marvin Borner | 2020-01-26 23:33:47 +0100 |
---|---|---|
committer | Marvin Borner | 2020-01-26 23:33:47 +0100 |
commit | 85aea3c82746bbcfe8562e0ff90c77292651fa13 (patch) | |
tree | 6bf839e9857fea5e652b63a058e7a7fc6483ced7 /src/kernel | |
parent | 43f501c74aa09f18c904ace902dc4cc5d241c218 (diff) |
Nothin' special
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/kernel.c | 4 | ||||
-rw-r--r-- | src/kernel/system.c | 28 |
2 files changed, 23 insertions, 9 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 91206a2..e49861c 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -29,9 +29,9 @@ void kernel_main(uint32_t initial_stack) isrs_install(); irq_install(); paging_install(); + load_binaries(); set_optimal_resolution(); - serial_printf("%d", memory_get_all()); // Install drivers asm ("cli"); @@ -63,4 +63,4 @@ void kernel_main(uint32_t initial_stack) panic("This should NOT happen!"); // asm ("div %0" :: "r"(0)); // Exception testing x/0 -} +}
\ No newline at end of file diff --git a/src/kernel/system.c b/src/kernel/system.c index ae2e524..368dee5 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -31,7 +31,7 @@ void vga_log(char *msg) strcpy(string, "["); strcat(string, itoa((int) get_time())); strcat(string, "] "); - strcat(string, "INFO: "); + strcat(string, "INF: "); strcat(string, msg); strcat(string, "\n"); strcat(vga_buffer, string); @@ -47,7 +47,7 @@ void debug(const char *fmt, ...) { vesa_set_color(vesa_dark_white); kernel_time(); - printf("DEBG: "); + printf("DBG: "); va_list args; va_start(args, fmt); @@ -62,7 +62,7 @@ void info(const char *fmt, ...) { vesa_set_color(vesa_blue); kernel_time(); - printf("INFO: "); + printf("INF: "); va_list args; va_start(args, fmt); @@ -77,7 +77,7 @@ void warn(const char *fmt, ...) { vesa_set_color(vesa_dark_yellow); kernel_time(); - printf("WARN: "); + printf("WRN: "); va_list args; va_start(args, fmt); @@ -88,13 +88,27 @@ void warn(const char *fmt, ...) writec('\n'); } +const char *random_message[10] = { + "Uh... Did I do that?", + "Layer 8 problem!", + "Oops.", + "DON'T PANIC!", + "Must be a typo.", + "I'm tired of this ;(", + "PC LOAD LETTER", + "Have you tried turning it off and on again?", + "Call 01189998819991197253 pls", + "Please fix me!" +}; + void panic(char *msg) { asm ("cli"); vesa_set_color(vesa_dark_red); kernel_time(); - serial_printf("PANIC: %s - System halted!", msg); - printf("PANIC: %s - System halted!\n", msg); + serial_printf("PNC: %s - System halted!", msg); + printf("PNC: %s - System halted!\n\n", msg); + printf("> %s", random_message[get_time() % 10]); halt_loop(); } @@ -118,4 +132,4 @@ void v86(uint8_t code, regs16_t *regs) paging_disable(); int32(code, regs); paging_enable(); -} +}
\ No newline at end of file |