1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

Kernel: Include CommandLine as a part of aarch64

This commit is contained in:
Filiph Sandström 2022-08-06 19:49:19 +02:00 committed by Linus Groh
parent fcd1cf4e1b
commit 3b331a83e2
3 changed files with 11 additions and 20 deletions

View file

@ -22,6 +22,7 @@
#include <Kernel/Arch/aarch64/RPi/UART.h>
#include <Kernel/Arch/aarch64/Registers.h>
#include <Kernel/Arch/aarch64/TrapFrame.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Graphics/Console/BootFramebufferConsole.h>
#include <Kernel/KSyms.h>
@ -68,6 +69,8 @@ void __stack_chk_fail()
Kernel::Processor::halt();
}
READONLY_AFTER_INIT bool g_in_early_boot;
namespace Kernel {
static void draw_logo();
@ -86,11 +89,15 @@ Atomic<Graphics::Console*> g_boot_console;
extern "C" [[noreturn]] void init()
{
g_in_early_boot = true;
dbgln("Welcome to Serenity OS!");
dbgln("Imagine this being your ideal operating system.");
dbgln("Observed deviations from that ideal are shortcomings of your imagination.");
dbgln();
CommandLine::early_initialize("");
new (&bootstrap_processor()) Processor();
bootstrap_processor().initialize(0);
@ -103,6 +110,8 @@ extern "C" [[noreturn]] void init()
load_kernel_symbol_table();
CommandLine::initialize();
auto& framebuffer = RPi::Framebuffer::the();
if (framebuffer.initialized()) {
g_boot_console = &try_make_lock_ref_counted<Graphics::BootFramebufferConsole>(framebuffer.gpu_buffer(), framebuffer.width(), framebuffer.width(), framebuffer.pitch()).value().leak_ref();