refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git] / lunaix-os / kernel / proc0.c
index c7501af0e733c0769a23cd95fd2267d0dbfe9bd5..31a100df9c33333749a12e9378e5b79b48573ea4 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <sdbg/protocol.h>
 
-#include <hal/pci.h>
-
 #include <klibc/string.h>
 
 LOG_MODULE("PROC0")
@@ -34,12 +32,12 @@ mount_bootmedium()
     int errno = 0;
     struct device* dev = probe_boot_medium();
     if (!dev) {
-        kprintf(KERROR "fail to acquire device. (%d)", errno);
+        ERROR("fail to acquire device. (%d)", errno);
         return 0;
     }
 
     if ((errno = vfs_mount("/mnt/lunaix-os", "iso9660", dev, 0))) {
-        kprintf(KERROR "fail to mount boot medium. (%d)", errno);
+        ERROR("fail to mount boot medium. (%d)", errno);
         return 0;
     }
 
@@ -58,7 +56,7 @@ exec_initd()
     fail("should not reach");
 
 fail:
-    kprintf(KERROR "fail to load initd. (%d)", errno);
+    ERROR("fail to load initd. (%d)", errno);
     return 0;
 }
 
@@ -94,21 +92,12 @@ __proc0()
 void
 init_platform()
 {
-    kprintf(KINFO "\033[11;0mLunaixOS (gcc v%s, %s)\033[39;49m\n",
-            __VERSION__,
-            __TIME__);
+    device_postboot_load();
 
     twifs_register_plugins();
 
-    /*
-     * all device registering and loading must defered to here!
-     * due to limited stack size and partial scheduling context
-     */
-    pci_load_devices();
-
-    // debugger
-    serial_init();
-    sdbg_init();
+    // FIXME Re-design needed!!
+    // sdbg_init();
 
     // console
     console_start_flushing();