feat: panic, printf, logo and something i dont remember
This commit is contained in:
+10
-5
@@ -4,22 +4,27 @@
|
||||
|
||||
#include "shitgui.h"
|
||||
#include "serial.h"
|
||||
#include "panic.h" // IWYU pragma: keep
|
||||
#include "../data/logo.h"
|
||||
|
||||
void kmain(Bootinfo* info) {
|
||||
u32 *fb = (u32*)info->base;
|
||||
u32 *fb = (u32*)info->framebuffer.base;
|
||||
if (!fb) return;
|
||||
|
||||
SG_Context sg_ctx = {0};
|
||||
sg_ctx.fb = fb;
|
||||
sg_ctx.height = info->height;
|
||||
sg_ctx.width = info->width;
|
||||
sg_ctx.pitch = info->pitch;
|
||||
sg_ctx.height = info->framebuffer.height;
|
||||
sg_ctx.width = info->framebuffer.width;
|
||||
sg_ctx.pitch = info->framebuffer.pitch;
|
||||
|
||||
serial_init();
|
||||
console_init(&sg_ctx);
|
||||
console_clear(0xFFFFFF);
|
||||
console_set_color(0x000000);
|
||||
kprint("Welcome to termOS!!!");
|
||||
SG_Point logo_point = {sg_ctx.width-100, 100};
|
||||
sg_put_img(&sg_ctx, &logo_point, &logo_img);
|
||||
kprint("Welcome to termOS!!!\n");
|
||||
kprintf("MemoryMap located at %x; \nMemory map size is %d", (u64)info->mem.map, (u64)info->mem.map_size);
|
||||
|
||||
while (1) { __asm__("hlt"); }
|
||||
}
|
||||
Reference in New Issue
Block a user