kern

view src/main.c @ 43:5f6c5751ae05

- implemented clone_vmem
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 25 Jul 2011 11:29:02 +0300
parents 928b0ebfff4d
children f65b348780e3
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"
14 void kmain(struct mboot_info *mbinf)
15 {
16 clear_scr();
18 /* pointless verbal diarrhea */
19 if(mbinf->flags & MB_LDRNAME) {
20 printf("loaded by: %s\n", mbinf->boot_loader_name);
21 }
22 if(mbinf->flags & MB_CMDLINE) {
23 printf("kernel command line: %s\n", mbinf->cmdline);
24 }
26 puts("kernel starting up");
28 init_segm();
29 init_intr();
32 /* initialize the physical memory manager */
33 init_mem(mbinf);
34 /* initialize paging and the virtual memory manager */
35 init_vm();
37 /* initialize the timer and RTC */
38 init_timer();
39 init_rtc();
41 /* initialization complete, enable interrupts */
42 enable_intr();
45 for(;;) {
46 halt_cpu();
47 }
48 }