diff --git a/Base/usr/share/man/man7/boot_parameters.md b/Base/usr/share/man/man7/boot_parameters.md index 517adafb94..2338a74675 100644 --- a/Base/usr/share/man/man7/boot_parameters.md +++ b/Base/usr/share/man/man7/boot_parameters.md @@ -66,7 +66,9 @@ List of options: enable available APs (application processors) and use them with the BSP (Bootstrap processor) to schedule and run threads. This parameter defaults to **`off`**. This parameter requires **`enable_ioapic`** to be enabled - and and a `MADT` (APIC) table to be available. + and a `MADT` (APIC) table to be available. + +* **`nvme_poll`** - This parameter configures the NVMe drive to use polling instead of interrupt driven completion. * **`system_mode`** - This parameter is not interpreted by the Kernel, and is made available at `/proc/system_mode`. SystemServer uses it to select the set of services that should be started. Common values are: - **`graphical`** (default) - Boots the system in the normal graphical mode. diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp index 00d74292b8..13e315d557 100644 --- a/Kernel/CommandLine.cpp +++ b/Kernel/CommandLine.cpp @@ -175,6 +175,11 @@ UNMAP_AFTER_INIT StringView CommandLine::root_device() const return lookup("root"sv).value_or("/dev/hda"sv); } +bool CommandLine::is_nvme_polling_enabled() const +{ + return contains("nvme_poll"sv); +} + UNMAP_AFTER_INIT AcpiFeatureLevel CommandLine::acpi_feature_level() const { auto value = kernel_command_line().lookup("acpi"sv).value_or("limited"sv); diff --git a/Kernel/CommandLine.h b/Kernel/CommandLine.h index 492650e781..ad94755222 100644 --- a/Kernel/CommandLine.h +++ b/Kernel/CommandLine.h @@ -87,6 +87,7 @@ public: [[nodiscard]] StringView userspace_init() const; [[nodiscard]] NonnullOwnPtrVector userspace_init_args() const; [[nodiscard]] StringView root_device() const; + [[nodiscard]] bool is_nvme_polling_enabled() const; [[nodiscard]] size_t switch_to_tty() const; private: