feat: serial device interfacing
[lunaix-os.git] / lunaix-os / kernel / proc0.c
index 64dbcd9a4520d9c713db77f671111057a748ff44..93cc0207ef4819c648908eb2337e7d746b0ccee3 100644 (file)
@@ -1,6 +1,5 @@
 #include <lunaix/block.h>
 #include <lunaix/boot_generic.h>
-#include <lunaix/common.h>
 #include <lunaix/exec.h>
 #include <lunaix/foptions.h>
 #include <lunaix/fs.h>
@@ -11,7 +10,6 @@
 #include <lunaix/mm/pmm.h>
 #include <lunaix/mm/valloc.h>
 #include <lunaix/mm/vmm.h>
-#include <lunaix/peripheral/ps2kbd.h>
 #include <lunaix/peripheral/serial.h>
 #include <lunaix/spike.h>
 #include <lunaix/syscall.h>
 
 #include <sdbg/protocol.h>
 
-#include <hal/acpi/acpi.h>
-#include <hal/ahci/ahci.h>
-#include <hal/pci.h>
-
 #include <klibc/string.h>
 
 LOG_MODULE("PROC0")
@@ -78,8 +72,8 @@ void
 __proc0()
 {
     /*
-     * We must defer boot code/data cleaning after we successfully escape that
-     * area
+     * We must defer boot code/data cleaning to here, after we successfully
+     * escape that area
      */
     boot_cleanup();
 
@@ -102,18 +96,12 @@ init_platform()
             __VERSION__,
             __TIME__);
 
-    twifs_register_plugins();
-
-    /* we must start probing pci after all drivers are registered! */
-    pci_load_devices();
+    device_poststage();
 
-    // debugger
-    serial_init();
-    sdbg_init();
+    twifs_register_plugins();
 
-    // FIXME ps2 kbd is x86 PC specific, not here.
-    // peripherals & chipset features
-    ps2_kbd_init();
+    // FIXME Re-design needed!!
+    // sdbg_init();
 
     // console
     console_start_flushing();