From d680d4c641c085e7a31d19fe2d01f528e96d2ced Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 27 Aug 2014 16:32:34 +0200 Subject: put vesa init to top and integrated binary font. binary fool-font is now part of the kernel image and is loaded by the bootloader on startup into ram --- kernel/kernel.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'kernel/kernel.c') diff --git a/kernel/kernel.c b/kernel/kernel.c index efa703b..c260e80 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -29,10 +29,29 @@ void int_test_handler() } -// heart of our operating system +// heart of our operating system. void kernel_main() { + // + // We want to get output to the screen as fast as possible! + // + // Our Fool-Boot-Loader did set up VESA already for us. + // The desired VESA mode is hardcoded in [boot/mbr.asm]. + // + // The [vesa_init(...)] function requires: + // + // * the addresses of the vbeinfo struct + // * the address of the vbemodeinfo struct (for selected mode). + // * the address of our Fool-Font binary data. + // + // The first two paramters are hardcoded in [boot/mbr.asm], + // while the last one is set in the Makefile. The font binary + // is integrated in the kernel image. + // + vesa_init(0x8300,0x8400,0x7200); + while(1); // never ending loop + // clear console //! scr_clear(); @@ -47,7 +66,7 @@ void kernel_main() //! mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600))); mem_init(0x9000); - // we know that here the bootloader placed the mamory map! + // paging (Todo) vmem_init(); // init and interrupt decriptor table @@ -84,9 +103,6 @@ void kernel_main() // floppy floppy_init(); - // vesa init - vesa_init(0x8300,0x8400); - //! scr_put_string_nl(""); @@ -101,12 +117,7 @@ void kernel_main() // put some text on monitor! - uint8_t *rawfont=0xb000; // here the floppy_init puts first sector - // after 0x8000 (font data :)) - PutString(rawfont,"Welcome to Fool OS 001",10,10,0xff00); - PutString(rawfont,"Welcome to Fool OS 001",20,20,0xf00); - PutString(rawfont,"Welcome to Fool OS 001",30,30,0xfff00); while(1); // never ending loop -- cgit v1.2.3