kern

annotate src/main.c @ 98:921a264297a4

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