Let main print more useful things, like bootloader info
This commit is contained in:
parent
e3f4038b3a
commit
f61708d07c
|
|
@ -24,5 +24,6 @@ struct stivale2_header header2 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void stivale2_main(struct stivale2_struct *info) {
|
void stivale2_main(struct stivale2_struct *info) {
|
||||||
kmain();
|
char *argv[3] = {"stivale2", info->bootloader_brand, info->bootloader_version};
|
||||||
|
kmain(3, argv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
#include "vga.h"
|
#include "vga.h"
|
||||||
|
|
||||||
void kmain() {
|
void kmain(int argc, char **argv) {
|
||||||
vga_puts("hello!");
|
vga_puts("Kernel initialized!\n");
|
||||||
vga_putc('h');
|
vga_puts("Bootloader information:\t");
|
||||||
|
for(int i = 0; i < argc; i++) {
|
||||||
|
vga_puts(argv[i]);
|
||||||
|
vga_putc('\t');
|
||||||
|
}
|
||||||
asm volatile ("hlt");
|
asm volatile ("hlt");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
void kmain();
|
void kmain(int argc, char** argv);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue