Kernel: Add command line option to disable AML parsing

This can be handy if my broken AML parser crashes or hangs while parsing
AML :D
This commit is contained in:
Bananymous 2024-09-10 16:20:24 +03:00
parent eabe759ebf
commit 64a3893f6f
1 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,7 @@
struct ParsedCommandLine struct ParsedCommandLine
{ {
bool force_pic = false; bool force_pic = false;
bool disable_acpi = false;
bool disable_serial = false; bool disable_serial = false;
bool disable_smp = false; bool disable_smp = false;
bool disable_usb = false; bool disable_usb = false;
@ -82,6 +83,8 @@ static void parse_command_line()
cmdline.disable_smp = true; cmdline.disable_smp = true;
else if (argument == "nousb") else if (argument == "nousb")
cmdline.disable_usb = true; cmdline.disable_usb = true;
else if (argument == "noacpi")
cmdline.disable_acpi = true;
else if (argument == "nodebug") else if (argument == "nodebug")
g_disable_debug = true; g_disable_debug = true;
else if (argument.starts_with("ps2=")) else if (argument.starts_with("ps2="))
@ -220,7 +223,7 @@ static void init2(void*)
dprintln("USBManager initialized"); dprintln("USBManager initialized");
} }
if (ACPI::ACPI::get().enter_acpi_mode(InterruptController::get().is_using_apic()).is_error()) if (!cmdline.disable_acpi && ACPI::ACPI::get().enter_acpi_mode(InterruptController::get().is_using_apic()).is_error())
dprintln("Failed to enter ACPI mode"); dprintln("Failed to enter ACPI mode");
DevFileSystem::get().initialize_device_updater(); DevFileSystem::get().initialize_device_updater();