_M procs start up at _start/hart_entry for vcore0
[akaros.git] / kern / src / init.c
index 2cd78d0..889974a 100644 (file)
@@ -4,8 +4,8 @@
 #pragma nosharc
 #endif
 
-#ifdef __BSD_ON_CORE_0__
-#include Everything For Free -- It just works!!
+#ifdef __CONFIG_BSD_ON_CORE0__
+#error "Yeah, it's not possible to build ROS with BSD on Core 0, sorry......"
 #else
 
 #include <arch/arch.h>
@@ -27,6 +27,9 @@
 #include <manager.h>
 #include <testing.h>
 #include <kmalloc.h>
+#include <hashtable.h>
+#include <mm.h>
+#include <frontend.h>
 
 #include <arch/init.h>
 #include <arch/bitmask.h>
@@ -62,17 +65,20 @@ void kernel_init(multiboot_info_t *mboot_info)
 
        multiboot_print_memory_map((multiboot_info_t*CT(1))KADDR((physaddr_t)mboot_info));
 
-       vm_init();
-
-       cache_init();
-       page_init();
-       kmem_cache_init();
+       vm_init();                      // Sets up pages tables, turns on paging
+       cache_init();                                   // Determine systems's cache properties
+       page_init();                                    // Initializes free page list, etc
+       kmem_cache_init();              // Sets up slab allocator
        kmalloc_init();
-       cache_color_alloc_init();
-       colored_page_alloc_init();
+       hashtable_init();
+       cache_color_alloc_init();       // Inits data structs
+       colored_page_alloc_init();      // Allocates colors for agnostic processes
+       mmap_init();
+       file_init();
        page_check();
 
        idt_init();
+       kernel_msg_init();
        sysenter_init();
        timer_init();
        
@@ -103,9 +109,6 @@ void _panic(const char *file, int line, const char *fmt,...)
        cprintf("\n");
        va_end(ap);
 
-       #ifndef __i386__
-               reboot();
-       #endif
 dead:
        /* break into the kernel monitor, if we're core 0 */
        if (core_id()) {