diff --git a/kernel/arch/aarch64/Makefile b/kernel/arch/aarch64/Makefile index f9815e0..0cd5424 100644 --- a/kernel/arch/aarch64/Makefile +++ b/kernel/arch/aarch64/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_ENABLE_STACKPROTECTOR) += stackprotector.ocpp obj-d += drivers -obj-y += generic/cpu.ocpp generic/devices.ocpp generic/memory.ocpp generic/textoutput.ocpp +obj-y += generic/cpu.ocpp generic/devices.ocpp generic/memory.ocpp obj-y += archinit.ocpp memmap.ocpp exceptions.ocpp sched.ocpp sched.oS diff --git a/kernel/arch/aarch64/generic/textoutput.cpp b/kernel/arch/aarch64/generic/textoutput.cpp deleted file mode 100644 index d2d0045..0000000 --- a/kernel/arch/aarch64/generic/textoutput.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -void arch::generic::textoutput::puts(const char *str, color foreground, color background) { - while (*str) { - drivers::uart::putc(*str++); - } -} diff --git a/kernel/arch/aarch64/include/arch/generic/textoutput.h b/kernel/arch/aarch64/include/arch/generic/textoutput.h deleted file mode 100644 index b98801f..0000000 --- a/kernel/arch/aarch64/include/arch/generic/textoutput.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define ARCH_FEATURE_TEXTOUTPUT_COLOR - -namespace arch::generic::textoutput { - enum class color { - COLOR_GREY, - COLOR_BLACK, - COLOR_WHITE, - COLOR_RED, - COLOR_LIGHT_RED, - COLOR_GREEN, - COLOR_LIGHT_GREEN, - COLOR_BLUE, - COLOR_LIGHT_BLUE - }; - - void puts(const char *str, color foreground = color::COLOR_GREY, color background = color::COLOR_BLACK); -} diff --git a/kernel/arch/m68k/Makefile b/kernel/arch/m68k/Makefile index 2527cb1..1b03217 100644 --- a/kernel/arch/m68k/Makefile +++ b/kernel/arch/m68k/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_ENABLE_STACKPROTECTOR) += stackprotector.ocpp -obj-y += generic/cpu.ocpp generic/devices.ocpp generic/textoutput.ocpp +obj-y += generic/cpu.ocpp generic/devices.ocpp obj-y += archinit.ocpp except.ocpp except.oS sched.oS sched.ocpp obj-$(CONFIG_PLAIN_BINARY) += startup.oS diff --git a/kernel/arch/m68k/generic/textoutput.cpp b/kernel/arch/m68k/generic/textoutput.cpp deleted file mode 100644 index f424f62..0000000 --- a/kernel/arch/m68k/generic/textoutput.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void arch::generic::textoutput::puts(const char *str, color foreground, color background) {} diff --git a/kernel/arch/m68k/include/arch/generic/textoutput.h b/kernel/arch/m68k/include/arch/generic/textoutput.h deleted file mode 100644 index b98801f..0000000 --- a/kernel/arch/m68k/include/arch/generic/textoutput.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define ARCH_FEATURE_TEXTOUTPUT_COLOR - -namespace arch::generic::textoutput { - enum class color { - COLOR_GREY, - COLOR_BLACK, - COLOR_WHITE, - COLOR_RED, - COLOR_LIGHT_RED, - COLOR_GREEN, - COLOR_LIGHT_GREEN, - COLOR_BLUE, - COLOR_LIGHT_BLUE - }; - - void puts(const char *str, color foreground = color::COLOR_GREY, color background = color::COLOR_BLACK); -} diff --git a/kernel/arch/x86/Makefile b/kernel/arch/x86/Makefile index 90a7fe9..b5488a1 100644 --- a/kernel/arch/x86/Makefile +++ b/kernel/arch/x86/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_ENABLE_FTRACE) += trace.ocpp obj-$(CONFIG_ENABLE_STACKPROTECTOR) += stackprotector.ocpp obj-y += drivers/ps2.ocpp drivers/pci.ocpp drivers/pic_8259.ocpp drivers/rtc.ocpp drivers/serial.ocpp -obj-y += generic/cpu.ocpp generic/devices.ocpp generic/textoutput.ocpp +obj-y += generic/cpu.ocpp generic/devices.ocpp obj-y += cpubasics.ocpp cpuid.ocpp elf.ocpp gdt.ocpp modelf.ocpp multitasking.ocpp sched.ocpp multitasking.oS simd.ocpp tss.ocpp obj-$(CONFIG_ENABLE_KERNEL_32) += drivers/text80x25.ocpp diff --git a/kernel/arch/x86/generic/textoutput.cpp b/kernel/arch/x86/generic/textoutput.cpp deleted file mode 100644 index b688a3a..0000000 --- a/kernel/arch/x86/generic/textoutput.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include - -static inline drivers::textmode::text80x25::color translatecolor(arch::generic::textoutput::color in) { - switch (in) { - case arch::generic::textoutput::color::COLOR_GREY: - return drivers::textmode::text80x25::COLOR_GREY; - case arch::generic::textoutput::color::COLOR_BLACK: - return drivers::textmode::text80x25::COLOR_BLACK; - case arch::generic::textoutput::color::COLOR_WHITE: - return drivers::textmode::text80x25::COLOR_WHITE; - case arch::generic::textoutput::color::COLOR_RED: - return drivers::textmode::text80x25::COLOR_RED; - case arch::generic::textoutput::color::COLOR_LIGHT_RED: - return drivers::textmode::text80x25::COLOR_LIGHT_RED; - case arch::generic::textoutput::color::COLOR_GREEN: - return drivers::textmode::text80x25::COLOR_GREEN; - case arch::generic::textoutput::color::COLOR_LIGHT_GREEN: - return drivers::textmode::text80x25::COLOR_LIGHT_GREEN; - case arch::generic::textoutput::color::COLOR_BLUE: - return drivers::textmode::text80x25::COLOR_BLUE; - case arch::generic::textoutput::color::COLOR_LIGHT_BLUE: - return drivers::textmode::text80x25::COLOR_LIGHT_BLUE; - } - return drivers::textmode::text80x25::COLOR_RED; -} - -void arch::generic::textoutput::puts(const char *str, color foreground, color background) { - // oh god fuck horibel - drivers::textmode::text80x25::color foreground_txt = translatecolor(foreground); - drivers::textmode::text80x25::color background_txt = translatecolor(background); - - while (*str) { - drivers::textmode::text80x25::putc(*str, foreground_txt, background_txt); - drivers::serial::putc(*str); - str++; - } -} diff --git a/kernel/arch/x86/include/arch/generic/textoutput.h b/kernel/arch/x86/include/arch/generic/textoutput.h deleted file mode 100644 index b98801f..0000000 --- a/kernel/arch/x86/include/arch/generic/textoutput.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define ARCH_FEATURE_TEXTOUTPUT_COLOR - -namespace arch::generic::textoutput { - enum class color { - COLOR_GREY, - COLOR_BLACK, - COLOR_WHITE, - COLOR_RED, - COLOR_LIGHT_RED, - COLOR_GREEN, - COLOR_LIGHT_GREEN, - COLOR_BLUE, - COLOR_LIGHT_BLUE - }; - - void puts(const char *str, color foreground = color::COLOR_GREY, color background = color::COLOR_BLACK); -} diff --git a/kernel/arch/xtensa/Makefile b/kernel/arch/xtensa/Makefile index b063f02..8787f4e 100644 --- a/kernel/arch/xtensa/Makefile +++ b/kernel/arch/xtensa/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_ENABLE_STACKPROTECTOR) += stackprotector.ocpp -obj-y += generic/cpu.ocpp generic/devices.ocpp generic/textoutput.ocpp +obj-y += generic/cpu.ocpp generic/devices.ocpp obj-y += archinit.ocpp sched.oS sched.ocpp obj-y += libgcc.ocpp diff --git a/kernel/arch/xtensa/generic/textoutput.cpp b/kernel/arch/xtensa/generic/textoutput.cpp deleted file mode 100644 index f424f62..0000000 --- a/kernel/arch/xtensa/generic/textoutput.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void arch::generic::textoutput::puts(const char *str, color foreground, color background) {} diff --git a/kernel/arch/xtensa/include/arch/generic/textoutput.h b/kernel/arch/xtensa/include/arch/generic/textoutput.h deleted file mode 100644 index b98801f..0000000 --- a/kernel/arch/xtensa/include/arch/generic/textoutput.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define ARCH_FEATURE_TEXTOUTPUT_COLOR - -namespace arch::generic::textoutput { - enum class color { - COLOR_GREY, - COLOR_BLACK, - COLOR_WHITE, - COLOR_RED, - COLOR_LIGHT_RED, - COLOR_GREEN, - COLOR_LIGHT_GREEN, - COLOR_BLUE, - COLOR_LIGHT_BLUE - }; - - void puts(const char *str, color foreground = color::COLOR_GREY, color background = color::COLOR_BLACK); -} diff --git a/kernel/include/framebuffer.h b/kernel/include/framebuffer.h index d7aeaa9..c54fd32 100644 --- a/kernel/include/framebuffer.h +++ b/kernel/include/framebuffer.h @@ -1,5 +1,4 @@ #pragma once -#include #include #include #include