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