summaryrefslogtreecommitdiff
path: root/Kernel/CommandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/CommandLine.cpp')
-rw-r--r--Kernel/CommandLine.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp
index fdb09c4d41..4294b97c9c 100644
--- a/Kernel/CommandLine.cpp
+++ b/Kernel/CommandLine.cpp
@@ -148,6 +148,19 @@ UNMAP_AFTER_INIT HPETMode CommandLine::hpet_mode() const
PANIC("Unknown HPETMode: {}", hpet_mode);
}
+UNMAP_AFTER_INIT AHCIResetMode CommandLine::ahci_reset_mode() const
+{
+ const auto ahci_reset_mode = lookup("ahci_reset_mode").value_or("controller");
+ if (ahci_reset_mode == "controller") {
+ return AHCIResetMode::ControllerOnly;
+ } else if (ahci_reset_mode == "none") {
+ return AHCIResetMode::None;
+ } else if (ahci_reset_mode == "complete") {
+ return AHCIResetMode::Complete;
+ }
+ PANIC("Unknown AHCIResetMode: {}", ahci_reset_mode);
+}
+
UNMAP_AFTER_INIT BootMode CommandLine::boot_mode() const
{
const auto boot_mode = lookup("boot_mode").value_or("graphical");