kmain: get bootloader name as a test of mbi thing

This commit is contained in:
2025-04-14 16:29:59 +03:00
parent 170299bce3
commit ab72a7ee18
+15 -5
View File
@@ -9,6 +9,7 @@
#include "../include/paging.h"
#include "../include/fat.h"
#include "../include/task.h"
#include "../include/multiboot.h"
#include <stdint.h>
@@ -135,10 +136,19 @@ void apply_pic_masks()
outb(0xa1,0xff);
}
void kmain()
void kmain(unsigned int info)
{
struct multiboot_info mbi;
memcpy(&mbi, (void*)info, sizeof(struct multiboot_info));
terminal_initialize();
printf("KatauOS booting up\n");
if(mbi.flags & MULTIBOOT_INFO_BOOT_LOADER_NAME) {
printf("bootloader: %s\n", mbi.boot_loader_name);
}
isr_install();
pic_remap(0x20, 0x28);
pit_init(100);
@@ -152,15 +162,15 @@ void kmain()
heap_init();
printf("after heap_init\n");
__asm__ __volatile__ ("sti");
scheduler_init();
//scheduler_init();
printf("Kernel init sequence completed\n");
char yooo[256] = "heheh";
printf("test string: %s\n", yooo);
disk_info info;
get_disk_info(&info);
printf("CYL HEAD SECT: %X %X %X\n", info.cylinders, info.heads, info.sectors);
disk_info info1;
get_disk_info(&info1);
printf("CYL HEAD SECT: %X %X %X\n", info1.cylinders, info1.heads, info1.sectors);
//file_fuckery();