nuclear@1: #include nuclear@16: #include "mboot.h" nuclear@0: #include "vid.h" nuclear@1: #include "term.h" nuclear@16: #include "asmops.h" nuclear@7: #include "segm.h" nuclear@10: #include "intr.h" nuclear@76: #include "ata.h" nuclear@88: #include "fs.h" nuclear@36: #include "rtc.h" nuclear@33: #include "timer.h" nuclear@27: #include "mem.h" nuclear@16: #include "vm.h" nuclear@47: #include "proc.h" nuclear@16: nuclear@2: nuclear@16: void kmain(struct mboot_info *mbinf) nuclear@0: { nuclear@2: clear_scr(); nuclear@16: nuclear@16: /* pointless verbal diarrhea */ nuclear@16: if(mbinf->flags & MB_LDRNAME) { nuclear@16: printf("loaded by: %s\n", mbinf->boot_loader_name); nuclear@16: } nuclear@16: if(mbinf->flags & MB_CMDLINE) { nuclear@16: printf("kernel command line: %s\n", mbinf->cmdline); nuclear@16: } nuclear@16: nuclear@2: puts("kernel starting up"); nuclear@2: nuclear@7: init_segm(); nuclear@10: init_intr(); nuclear@7: nuclear@31: nuclear@26: /* initialize the physical memory manager */ nuclear@26: init_mem(mbinf); nuclear@26: /* initialize paging and the virtual memory manager */ nuclear@26: init_vm(); nuclear@19: nuclear@76: /* initialize ATA disks */ nuclear@76: init_ata(); nuclear@88: /* initialize the filesystem */ nuclear@88: init_fs(); nuclear@76: nuclear@40: /* initialize the timer and RTC */ nuclear@40: init_timer(); nuclear@40: init_rtc(); nuclear@40: nuclear@52: /* create the first process and switch to it */ nuclear@77: /*init_proc();*/ nuclear@47: nuclear@52: /* XXX unreachable */ nuclear@31: nuclear@2: for(;;) { nuclear@43: halt_cpu(); nuclear@2: } nuclear@0: }