summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-27 16:32:34 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-27 16:32:34 +0200
commitd680d4c641c085e7a31d19fe2d01f528e96d2ced (patch)
treefb1f35486c584feaeb087c740c42508f7abe32fc /kernel/kernel.c
parentd85b6209f37b4d886f9e85fd9592c9d7cf25deb9 (diff)
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
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c31
1 files changed, 21 insertions, 10 deletions
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