Kernel: Add nvme_poll command line parameters

As we don't currently support MSI(X) interrupts, it could be an issue
to boot on some newer hardware. NVMe devices support polling mode
where the driver actively polls for completion instead of waiting for
an interrupt.
This commit is contained in:
Pankaj Raghav 2022-01-27 16:25:39 +05:30 committed by Andreas Kling
parent 19a2b32065
commit e5a6d12ff8
Notes: sideshowbarker 2024-07-17 19:52:59 +09:00
3 changed files with 9 additions and 1 deletions

View file

@ -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.

View file

@ -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);

View file

@ -87,6 +87,7 @@ public:
[[nodiscard]] StringView userspace_init() const;
[[nodiscard]] NonnullOwnPtrVector<KString> userspace_init_args() const;
[[nodiscard]] StringView root_device() const;
[[nodiscard]] bool is_nvme_polling_enabled() const;
[[nodiscard]] size_t switch_to_tty() const;
private: