summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-02-05 20:38:41 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-05 23:01:41 +0100
commitb5857ceaadd870390aff3a9daa3cf03bc3faa7e2 (patch)
tree05c18c3e4c08407cd29c4f157d8fd4126cc5b582
parentf2a087126c30c5c1525b8e6ba46af635e2fab2b4 (diff)
downloadserenity-b5857ceaadd870390aff3a9daa3cf03bc3faa7e2.zip
Kernel Commandline: Remove noacpi & noacpi_aml boot arguments
Instead of having boot arguments like noacpi & noacpi_aml, we have one boot argument - acpi='on|off|limited'.
-rw-r--r--Kernel/init.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index ac1679af38..6c5d50a5b2 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -399,15 +399,24 @@ extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
void setup_acpi()
{
- bool complete_acpi_disable = KParams::the().has("noacpi");
- bool dynamic_acpi_disable = KParams::the().has("noacpi_aml");
- if (complete_acpi_disable) {
+ if (!KParams::the().has("acpi")) {
+ ACPIDynamicParser::initialize_without_rsdp();
+ return;
+ }
+
+ auto acpi = KParams::the().get("acpi");
+ if (acpi == "off") {
ACPIParser::initialize_limited();
- } else {
- if (!dynamic_acpi_disable) {
- ACPIDynamicParser::initialize_without_rsdp();
- } else {
- ACPIStaticParser::initialize_without_rsdp();
- }
+ return;
+ }
+ if (acpi == "on") {
+ ACPIDynamicParser::initialize_without_rsdp();
+ return;
+ }
+ if (acpi == "limited") {
+ ACPIStaticParser::initialize_without_rsdp();
+ return;
}
+ kprintf("acpi boot argmuent has an invalid value.\n");
+ hang();
}