X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/1fe5f5eb5378a47bf0f3451762743c162e40faad..1375eb51603466b723ab7dd1ca4194ee5d662f75:/lunaix-os/kernel/proc0.c diff --git a/lunaix-os/kernel/proc0.c b/lunaix-os/kernel/proc0.c index 64dbcd9..31a100d 100644 --- a/lunaix-os/kernel/proc0.c +++ b/lunaix-os/kernel/proc0.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -11,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -20,10 +18,6 @@ #include -#include -#include -#include - #include LOG_MODULE("PROC0") @@ -38,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; } @@ -62,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; } @@ -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(); @@ -98,22 +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(); - /* we must start probing pci after all drivers are registered! */ - pci_load_devices(); - - // debugger - serial_init(); - sdbg_init(); - - // 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();