kern

view src/main.c @ 88:a398bf73fe93

- added the partition table parsing code - starting with the filesystem
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 08 Dec 2011 13:34:47 +0200
parents a6513dc35f04
children
line source
1 #include <stdio.h>
2 #include "mboot.h"
3 #include "vid.h"
4 #include "term.h"
5 #include "asmops.h"
6 #include "segm.h"
7 #include "intr.h"
8 #include "ata.h"
9 #include "fs.h"
10 #include "rtc.h"
11 #include "timer.h"
12 #include "mem.h"
13 #include "vm.h"
14 #include "proc.h"
17 void kmain(struct mboot_info *mbinf)
18 {
19 clear_scr();
21 /* pointless verbal diarrhea */
22 if(mbinf->flags & MB_LDRNAME) {
23 printf("loaded by: %s\n", mbinf->boot_loader_name);
24 }
25 if(mbinf->flags & MB_CMDLINE) {
26 printf("kernel command line: %s\n", mbinf->cmdline);
27 }
29 puts("kernel starting up");
31 init_segm();
32 init_intr();
35 /* initialize the physical memory manager */
36 init_mem(mbinf);
37 /* initialize paging and the virtual memory manager */
38 init_vm();
40 /* initialize ATA disks */
41 init_ata();
42 /* initialize the filesystem */
43 init_fs();
45 /* initialize the timer and RTC */
46 init_timer();
47 init_rtc();
49 /* create the first process and switch to it */
50 /*init_proc();*/
52 /* XXX unreachable */
54 for(;;) {
55 halt_cpu();
56 }
57 }