From 298aaf63f15350e6248d5a96e8c6a63b0ec93e0f Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 20 May 2021 20:41:24 +0200 Subject: Major restructuring --- kernel/features/bus.c | 2 +- kernel/features/fs.c | 6 +++--- kernel/features/io.c | 30 +++++++++++++++++++++++------- kernel/features/load.c | 2 +- kernel/features/logger.c | 4 ++-- kernel/features/mm.c | 4 ++-- kernel/features/net.c | 8 ++++---- kernel/features/proc.c | 6 +++--- kernel/features/syscall.c | 6 +++--- 9 files changed, 42 insertions(+), 26 deletions(-) (limited to 'kernel/features') diff --git a/kernel/features/bus.c b/kernel/features/bus.c index 4a09fc0..d58cee3 100644 --- a/kernel/features/bus.c +++ b/kernel/features/bus.c @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/kernel/features/fs.c b/kernel/features/fs.c index 7d62c61..c5ebfcd 100644 --- a/kernel/features/fs.c +++ b/kernel/features/fs.c @@ -1,13 +1,13 @@ // MIT License, Copyright (c) 2020 Marvin Borner #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/kernel/features/io.c b/kernel/features/io.c index bc7977a..4bbc4e0 100644 --- a/kernel/features/io.c +++ b/kernel/features/io.c @@ -2,22 +2,23 @@ #include #include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include -#include #include #include #include -#include -#include struct io_listener { u32 group; @@ -211,6 +212,10 @@ CLEAR void io_install(void) for (u32 i = 0; i < IO_MAX; i++) io_listeners[i] = list_new(); + /** + * Keyboard & mouse detection + */ + ps2_detect(); u8 ps2_keyboard = ps2_keyboard_detect(); @@ -226,8 +231,19 @@ CLEAR void io_install(void) ps2_mouse_install(ps2_mouse); } + /** + * Framebuffer detection + */ + + u32 vbe = multiboot_vbe(); + if (vbe) + vbe_install(vbe); + + /** + * Other devices + */ + timer_install(); logger_install(); - fb_install(); bus_install(); } diff --git a/kernel/features/load.c b/kernel/features/load.c index 645c4d2..1059240 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -1,6 +1,6 @@ // MIT License, Copyright (c) 2020 Marvin Borner -#include +#include #include #include #include diff --git a/kernel/features/logger.c b/kernel/features/logger.c index 7db9a82..23efa93 100644 --- a/kernel/features/logger.c +++ b/kernel/features/logger.c @@ -1,13 +1,13 @@ // MIT License, Copyright (c) 2021 Marvin Borner -#include +#include #include #include #include #include #include #include -#include +#include static res logger_write(const void *buf, u32 offset, u32 count) { diff --git a/kernel/features/mm.c b/kernel/features/mm.c index 0f80fda..81645af 100644 --- a/kernel/features/mm.c +++ b/kernel/features/mm.c @@ -2,10 +2,10 @@ // MIT License, Copyright (c) 2021 Marvin Borner #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/kernel/features/net.c b/kernel/features/net.c index 530837b..9e40ea6 100644 --- a/kernel/features/net.c +++ b/kernel/features/net.c @@ -1,18 +1,18 @@ // MIT License, Copyright (c) 2020 Marvin Borner #include -#include +#include #include #include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include static u32 current_ip_addr = 0; static u32 gateway_addr = 0; diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 4dd90c8..019b0ed 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -1,10 +1,10 @@ // MIT License, Copyright (c) 2020 Marvin Borner #include -#include +#include #include #include -#include +#include #include #include #include @@ -12,7 +12,7 @@ #include #include #include -#include +#include #define PROC(node) ((struct proc *)node->data) diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index b66cd2e..b376a13 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -1,9 +1,9 @@ // MIT License, Copyright (c) 2020 Marvin Borner -#include +#include #include #include -#include +#include #include #include #include @@ -14,7 +14,7 @@ #include #include #include -#include +#include static void syscall_handler(struct regs *r) { -- cgit v1.2.3