[kernel] Revive the debugcon logger as a kernel thread

The debugcon logger is now separate from logger::output, and is instead
a kernel-internal thread that watches for logs and prints them to the
deubcon device.
This commit is contained in:
Justin C. Miller
2023-02-08 22:32:01 -08:00
parent 71069cb38b
commit f05a1d3310
11 changed files with 124 additions and 9 deletions

View File

@@ -8,6 +8,7 @@
#include "assert.h"
#include "capabilities.h"
#include "cpu.h"
#include "debugcon.h"
#include "device_manager.h"
#include "interrupts.h"
#include "logger.h"
@@ -50,7 +51,6 @@ kernel_main(bootproto::args *args)
disable_legacy_pic();
bsp_late_init();
using bootproto::boot_flags;
@@ -71,6 +71,10 @@ kernel_main(bootproto::args *args)
scheduler *sched = new scheduler {g_num_cpus};
smp::ready();
// Initialize the debug console logger (does nothing if not built
// in debug mode)
debugcon::init_logger();
// Load the init server
load_init_server(args->init, args->init_modules);