2025-07-18 23:50:07 -07:00
|
|
|
#include <gdt.h>
|
2025-05-23 17:24:25 -07:00
|
|
|
#include <klibc/string.h>
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <bootloader.h>
|
2025-07-19 21:44:14 -07:00
|
|
|
#include <drivers/video/framebuffer.h>
|
2025-10-16 13:53:36 -07:00
|
|
|
#include <mm/paging.h>
|
2025-05-23 17:24:25 -07:00
|
|
|
|
2025-07-18 23:50:07 -07:00
|
|
|
static void
|
|
|
|
|
hcf(void)
|
|
|
|
|
{
|
|
|
|
|
for (;;) {
|
|
|
|
|
__asm__("hlt");
|
|
|
|
|
}
|
2025-05-23 17:24:25 -07:00
|
|
|
}
|
2025-04-17 21:32:48 -07:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
kernel_main(void)
|
|
|
|
|
{
|
2025-05-23 17:24:25 -07:00
|
|
|
/* Make sure the bootloader understands our base revision */
|
|
|
|
|
if (LIMINE_BASE_REVISION_SUPPORTED == 0) hcf();
|
2025-07-18 23:50:07 -07:00
|
|
|
|
2025-07-19 21:44:14 -07:00
|
|
|
/* Initialize framebuffer console */
|
|
|
|
|
fb_init();
|
2025-10-16 13:53:36 -07:00
|
|
|
map_vga_memory();
|
2025-07-19 21:44:14 -07:00
|
|
|
|
|
|
|
|
/* Test print */
|
|
|
|
|
fb_puts("Hello World\n");
|
|
|
|
|
|
|
|
|
|
initGDT();
|
2025-05-23 17:24:25 -07:00
|
|
|
|
|
|
|
|
/* done so now hang */
|
|
|
|
|
hcf();
|
2025-04-17 21:32:48 -07:00
|
|
|
}
|