mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 18:47:41 +00:00
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'.
This commit is contained in:
parent
f2a087126c
commit
b5857ceaad
1 changed files with 19 additions and 10 deletions
|
@ -399,15 +399,24 @@ extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
|
||||||
|
|
||||||
void setup_acpi()
|
void setup_acpi()
|
||||||
{
|
{
|
||||||
bool complete_acpi_disable = KParams::the().has("noacpi");
|
if (!KParams::the().has("acpi")) {
|
||||||
bool dynamic_acpi_disable = KParams::the().has("noacpi_aml");
|
ACPIDynamicParser::initialize_without_rsdp();
|
||||||
if (complete_acpi_disable) {
|
return;
|
||||||
ACPIParser::initialize_limited();
|
|
||||||
} else {
|
|
||||||
if (!dynamic_acpi_disable) {
|
|
||||||
ACPIDynamicParser::initialize_without_rsdp();
|
|
||||||
} else {
|
|
||||||
ACPIStaticParser::initialize_without_rsdp();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto acpi = KParams::the().get("acpi");
|
||||||
|
if (acpi == "off") {
|
||||||
|
ACPIParser::initialize_limited();
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue