kern
view src/main.c @ 69:b45e2d5f0ae1
ok I *think* i've fixed it now
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 12 Oct 2011 14:39:40 +0300 |
parents | f65b348780e3 |
children | 0fe6eef16335 |
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 "rtc.h"
9 #include "timer.h"
10 #include "mem.h"
11 #include "vm.h"
12 #include "proc.h"
15 void kmain(struct mboot_info *mbinf)
16 {
17 clear_scr();
19 /* pointless verbal diarrhea */
20 if(mbinf->flags & MB_LDRNAME) {
21 printf("loaded by: %s\n", mbinf->boot_loader_name);
22 }
23 if(mbinf->flags & MB_CMDLINE) {
24 printf("kernel command line: %s\n", mbinf->cmdline);
25 }
27 puts("kernel starting up");
29 init_segm();
30 init_intr();
33 /* initialize the physical memory manager */
34 init_mem(mbinf);
35 /* initialize paging and the virtual memory manager */
36 init_vm();
38 /* initialize the timer and RTC */
39 init_timer();
40 init_rtc();
42 /* create the first process and switch to it */
43 init_proc();
45 /* XXX unreachable */
47 for(;;) {
48 halt_cpu();
49 }
50 }