summaryrefslogtreecommitdiff
path: root/Kernel/CommandLine.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-04-03 13:29:07 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-03 19:34:52 +0200
commit441e3743964d6f5b12d402c7001b78e656676bd9 (patch)
tree7960109fb60146f29780f5a6f652720dd2674559 /Kernel/CommandLine.cpp
parentd09cd85b6cb4996610b66530615862a2fe5c7911 (diff)
downloadserenity-441e3743964d6f5b12d402c7001b78e656676bd9.zip
Kernel: Enable PCI ECAM method again if available
Apparently we don't enable PCI ECAM (MMIO access to the PCI configuration space) even if we can. This is a regression, as it was enabled in the past and in unknown time it was regressed. The CommandLine::is_mmio_enabled method was renamed to CommandLine::is_pci_ecam_enabled to better represent the meaning of this method and what it determines. Also, an UNMAP_AFTER_INIT macro was removed from a method in the MMIOAccess class as it halted the system when the kernel tried to access devices after the boot process.
Diffstat (limited to 'Kernel/CommandLine.cpp')
-rw-r--r--Kernel/CommandLine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp
index 4294b97c9c..007af0e706 100644
--- a/Kernel/CommandLine.cpp
+++ b/Kernel/CommandLine.cpp
@@ -108,9 +108,14 @@ UNMAP_AFTER_INIT bool CommandLine::is_vmmouse_enabled() const
return lookup("vmmouse").value_or("on") == "on";
}
-UNMAP_AFTER_INIT bool CommandLine::is_mmio_enabled() const
+UNMAP_AFTER_INIT bool CommandLine::is_pci_ecam_enabled() const
{
- return lookup("pci_mmio").value_or("off") == "on";
+ auto value = lookup("pci_ecam").value_or("on");
+ if (value == "on")
+ return true;
+ if (value == "off")
+ return false;
+ PANIC("Unknown PCI ECAM setting: {}", value);
}
UNMAP_AFTER_INIT bool CommandLine::is_legacy_time_enabled() const