Kernel: Make TTY a class

This commit is contained in:
2022-12-23 15:55:45 +02:00
parent 3f7a61a4d2
commit d8fd6afd12
11 changed files with 408 additions and 405 deletions

View File

@@ -14,7 +14,7 @@
#include <kernel/RTC.h>
#include <kernel/Serial.h>
#include <kernel/Shell.h>
#include <kernel/tty.h>
#include <kernel/TTY.h>
#include <kernel/VESA.h>
#define DISABLE_INTERRUPTS() asm volatile("cli")
@@ -52,16 +52,14 @@ extern "C" void kernel_main(multiboot_info_t* mbi, uint32_t magic)
s_multiboot_info = mbi;
if (!VESA::PreInitialize())
if (!VESA::Initialize())
{
dprintln("Could not initialize VESA");
return;
}
TTY::initialize();
kmalloc_initialize();
VESA::Initialize();
TTY* tty1 = new TTY;
ParsedCommandLine cmdline;
if (mbi->flags & 0x02)
@@ -80,7 +78,7 @@ extern "C" void kernel_main(multiboot_info_t* mbi, uint32_t magic)
kprintln("Hello from the kernel!");
auto& shell = Kernel::Shell::Get();
shell.SetTTY(tty1);
shell.Run();
for (;;)