kern

view src/main.c @ 76:0fe6eef16335

holy fuck, copy_on_write didn't actually do the copy!!!!
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Nov 2011 04:53:46 +0200
parents fa65b4f45366
children a6513dc35f04
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 "rtc.h"
10 #include "timer.h"
11 #include "mem.h"
12 #include "vm.h"
13 #include "proc.h"
16 void kmain(struct mboot_info *mbinf)
17 {
18 clear_scr();
20 /* pointless verbal diarrhea */
21 if(mbinf->flags & MB_LDRNAME) {
22 printf("loaded by: %s\n", mbinf->boot_loader_name);
23 }
24 if(mbinf->flags & MB_CMDLINE) {
25 printf("kernel command line: %s\n", mbinf->cmdline);
26 }
28 puts("kernel starting up");
30 init_segm();
31 init_intr();
34 /* initialize the physical memory manager */
35 init_mem(mbinf);
36 /* initialize paging and the virtual memory manager */
37 init_vm();
39 /* initialize ATA disks */
40 init_ata();
42 /* initialize the timer and RTC */
43 init_timer();
44 init_rtc();
46 /* create the first process and switch to it */
47 init_proc();
49 /* XXX unreachable */
51 for(;;) {
52 halt_cpu();
53 }
54 }