feat: standard vga support (mode switching, framebuffer remapping)
[lunaix-os.git] / lunaix-os / kernel / kinit.c
index 046054472f7b97d74005ca846c0efa5c41e30085..cb31ca1af1ea60ef4324b1c6f0d06ebfd70d8095 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <hal/acpi/acpi.h>
 #include <hal/intc.h>
 
 #include <hal/acpi/acpi.h>
 #include <hal/intc.h>
-#include <hal/pci.h>
 
 #include <sys/abi.h>
 #include <sys/interrupts.h>
 
 #include <sys/abi.h>
 #include <sys/interrupts.h>
@@ -53,6 +52,8 @@ kernel_bootstrap(struct boot_handoff* bhctx)
     /* Prepare stack trace environment */
     trace_modksyms_init(bhctx);
 
     /* Prepare stack trace environment */
     trace_modksyms_init(bhctx);
 
+    device_scan_drivers();
+
     // crt
     tty_init(ioremap(0xB8000, PG_SIZE));
     tty_set_theme(VGA_COLOR_WHITE, VGA_COLOR_BLACK);
     // crt
     tty_init(ioremap(0xB8000, PG_SIZE));
     tty_set_theme(VGA_COLOR_WHITE, VGA_COLOR_BLACK);
@@ -68,11 +69,15 @@ kernel_bootstrap(struct boot_handoff* bhctx)
     /* Get intc online, this is the cornerstone when initing devices */
     intc_init();
 
     /* Get intc online, this is the cornerstone when initing devices */
     intc_init();
 
+    input_init();
+    device_earlystage();
+
     /* System timing and clock support */
     clock_init();
     timer_init();
 
     /* System timing and clock support */
     clock_init();
     timer_init();
 
-    input_init();
+    device_timerstage();
+
     block_init();
 
     /* the bare metal are now happy, let's get software over with */
     block_init();
 
     /* the bare metal are now happy, let's get software over with */
@@ -88,9 +93,6 @@ kernel_bootstrap(struct boot_handoff* bhctx)
     vfs_mount("/sys", "twifs", NULL, MNT_RO);
     vfs_mount("/task", "taskfs", NULL, MNT_RO);
 
     vfs_mount("/sys", "twifs", NULL, MNT_RO);
     vfs_mount("/task", "taskfs", NULL, MNT_RO);
 
-    lxconsole_spawn_ttydev();
-    device_install_pseudo();
-
     /* Finish up bootstrapping sequence, we are ready to spawn the root process
      * and start geting into uspace
      */
     /* Finish up bootstrapping sequence, we are ready to spawn the root process
      * and start geting into uspace
      */