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
Notes: sideshowbarker 2024-07-18 03:20:18 +09:00
3 changed files with 11 additions and 20 deletions

View File

@ -148,26 +148,6 @@ READONLY_AFTER_INIT u8 multiboot_framebuffer_bpp;
READONLY_AFTER_INIT u8 multiboot_framebuffer_type;
}
namespace Kernel {
// KString.cpp
ErrorOr<NonnullOwnPtr<KString>> KString::try_create_uninitialized(size_t, char*&)
{
VERIFY_NOT_REACHED();
return ENOMEM;
}
ErrorOr<NonnullOwnPtr<KString>> KString::try_create(StringView)
{
VERIFY_NOT_REACHED();
return ENOMEM;
}
void KString::operator delete(void*)
{
VERIFY_NOT_REACHED();
}
}
extern "C" {
FlatPtr kernel_mapping_base;
}

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();

View File

@ -468,6 +468,8 @@ else()
Arch/aarch64/vector_table.S
# Files from base Kernel
CommandLine.cpp
KString.cpp
KSyms.cpp
MiniStdLib.cpp
UBSanitizer.cpp