kern
annotate src/main.c @ 78:251a65b62223
of course I forgot to actually add the new files... every fucking time...
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 06 Dec 2011 12:56:46 +0200 |
parents | 0fe6eef16335 |
children | a398bf73fe93 |
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@36 | 9 #include "rtc.h" |
nuclear@33 | 10 #include "timer.h" |
nuclear@27 | 11 #include "mem.h" |
nuclear@16 | 12 #include "vm.h" |
nuclear@47 | 13 #include "proc.h" |
nuclear@16 | 14 |
nuclear@2 | 15 |
nuclear@16 | 16 void kmain(struct mboot_info *mbinf) |
nuclear@0 | 17 { |
nuclear@2 | 18 clear_scr(); |
nuclear@16 | 19 |
nuclear@16 | 20 /* pointless verbal diarrhea */ |
nuclear@16 | 21 if(mbinf->flags & MB_LDRNAME) { |
nuclear@16 | 22 printf("loaded by: %s\n", mbinf->boot_loader_name); |
nuclear@16 | 23 } |
nuclear@16 | 24 if(mbinf->flags & MB_CMDLINE) { |
nuclear@16 | 25 printf("kernel command line: %s\n", mbinf->cmdline); |
nuclear@16 | 26 } |
nuclear@16 | 27 |
nuclear@2 | 28 puts("kernel starting up"); |
nuclear@2 | 29 |
nuclear@7 | 30 init_segm(); |
nuclear@10 | 31 init_intr(); |
nuclear@7 | 32 |
nuclear@31 | 33 |
nuclear@26 | 34 /* initialize the physical memory manager */ |
nuclear@26 | 35 init_mem(mbinf); |
nuclear@26 | 36 /* initialize paging and the virtual memory manager */ |
nuclear@26 | 37 init_vm(); |
nuclear@19 | 38 |
nuclear@76 | 39 /* initialize ATA disks */ |
nuclear@76 | 40 init_ata(); |
nuclear@76 | 41 |
nuclear@40 | 42 /* initialize the timer and RTC */ |
nuclear@40 | 43 init_timer(); |
nuclear@40 | 44 init_rtc(); |
nuclear@40 | 45 |
nuclear@52 | 46 /* create the first process and switch to it */ |
nuclear@77 | 47 /*init_proc();*/ |
nuclear@47 | 48 |
nuclear@52 | 49 /* XXX unreachable */ |
nuclear@31 | 50 |
nuclear@2 | 51 for(;;) { |
nuclear@43 | 52 halt_cpu(); |
nuclear@2 | 53 } |
nuclear@0 | 54 } |