2025-07-18 23:50:07 -07:00
|
|
|
#include <gdt.h>
|
2025-05-23 17:24:25 -07:00
|
|
|
#include <klibc/string.h>
|
2025-07-18 23:50:07 -07:00
|
|
|
#include <drivers/video/vga.h>
|
2025-05-23 17:24:25 -07:00
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <bootloader.h>
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
vga_set_mode_13h();
|
2025-05-23 17:24:25 -07:00
|
|
|
|
2025-07-18 23:50:07 -07:00
|
|
|
/* initGDT(); */
|
2025-05-23 17:24:25 -07:00
|
|
|
|
|
|
|
|
/* done so now hang */
|
|
|
|
|
hcf();
|
2025-04-17 21:32:48 -07:00
|
|
|
}
|