Let main print more useful things, like bootloader info

This commit is contained in:
Quinten Kock 2020-11-30 03:43:11 +01:00
parent e3f4038b3a
commit f61708d07c
3 changed files with 10 additions and 5 deletions

View File

@ -24,5 +24,6 @@ struct stivale2_header header2 = {
};
void stivale2_main(struct stivale2_struct *info) {
kmain();
char *argv[3] = {"stivale2", info->bootloader_brand, info->bootloader_version};
kmain(3, argv);
}

View File

@ -1,7 +1,11 @@
#include "vga.h"
void kmain() {
vga_puts("hello!");
vga_putc('h');
void kmain(int argc, char **argv) {
vga_puts("Kernel initialized!\n");
vga_puts("Bootloader information:\t");
for(int i = 0; i < argc; i++) {
vga_puts(argv[i]);
vga_putc('\t');
}
asm volatile ("hlt");
}

View File

@ -1 +1 @@
void kmain();
void kmain(int argc, char** argv);