source: libcaca/trunk/kernel/boot/stage2.c @ 4154

Revision 4154, 520 bytes checked in by jylam, 3 years ago (diff)
  • Total kernel rewrite
Line 
1#include "kernel.h"
2#include "klibc.h"
3
4extern int kmain(void);
5
6
7/* Entry point
8 * bootsect.asm loaded this file at 0x0100:0x0, which is mapped
9 * at 0x8:0x1000 (selector+8bytes, offset 1000 (0x100 + 0x0)
10 */
11
12/* 0x1000 */
13void _start(void) {
14
15        clearscreen();
16   
17    init_gdt();
18    print("Loading IDT\n");
19    init_idt();
20    print("Loading PIC\n");
21    init_pic();
22    print("Running kmain()\n");
23    sti;
24        kmain(); /* Call kernel's kmain() */
25   
26    while(1) { /* Never return */
27                print("hlt;\n");
28    }
29}
30
Note: See TracBrowser for help on using the repository browser.