diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-21 18:11:26 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-02-21 18:11:26 +0200 |
commit | b1322ac720b4a04175dae0e60e627e81e19f1cb9 (patch) | |
tree | 57be1038c2a5e9a5fdc9d16064408b52c0ef8d33 /src | |
parent | Call global constructors (diff) | |
download | kernel.cpp-b1322ac720b4a04175dae0e60e627e81e19f1cb9.tar.xz |
Kconfig
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/kernel.cc b/src/kernel.cc index 37773e1..ff95d16 100644 --- a/src/kernel.cc +++ b/src/kernel.cc @@ -15,8 +15,7 @@ #include "idt.h" #include "serial.h" -SerialPort serial0; -CGA video0; +#include "hardware.h" typedef void (*constructor)(); @@ -32,9 +31,13 @@ void dump_multiboot(uint32_t mb_magic, uint32_t mb_addr); void dump_gdt(); void kernel_main([[maybe_unused]] uint32_t mb_magic, [[maybe_unused]] uint32_t mb_addr) { +#ifdef HAS_SERIAL0 if (serial0.self_check()) Console::set(&serial0); +#endif +#ifdef HAS_VIDEO0 Console::set(&video0); +#endif printk("Hello, kernel World!\n"); |