mirror of
https://github.com/cowmonk/cowos.git
synced 2026-03-13 16:43:29 +00:00
Memory paging was "fixed", there was previously a stub because I was working out some compilation issue. Turns out, I had extern keyword called to the structs. Stupidly, I forgot to declare the struct in the header the whole time. Luckily that worked itself out, and now vga memory is mapped.
33 lines
611 B
C
33 lines
611 B
C
#include <gdt.h>
|
|
#include <klibc/string.h>
|
|
#include <stddef.h>
|
|
#include <bootloader.h>
|
|
#include <drivers/video/framebuffer.h>
|
|
#include <mm/paging.h>
|
|
|
|
static void
|
|
hcf(void)
|
|
{
|
|
for (;;) {
|
|
__asm__("hlt");
|
|
}
|
|
}
|
|
|
|
void
|
|
kernel_main(void)
|
|
{
|
|
/* Make sure the bootloader understands our base revision */
|
|
if (LIMINE_BASE_REVISION_SUPPORTED == 0) hcf();
|
|
|
|
/* Initialize framebuffer console */
|
|
fb_init();
|
|
map_vga_memory();
|
|
|
|
/* Test print */
|
|
fb_puts("Hello World\n");
|
|
|
|
initGDT();
|
|
|
|
/* done so now hang */
|
|
hcf();
|
|
}
|