kern

view src/main.c @ 80:4db99a52863e

fixed the "endianess" of the text messages in the ATA identify info block. this is the first time I've seen wrong byteorder in ascii text, the ATA committee should be commended.
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 06 Dec 2011 13:35:39 +0200
parents 0fe6eef16335
children a398bf73fe93
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 }