mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
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:
parent
19a2b32065
commit
e5a6d12ff8
Notes:
sideshowbarker
2024-07-17 19:52:59 +09:00
Author: https://github.com/Panky-codes Commit: https://github.com/SerenityOS/serenity/commit/e5a6d12ff80 Pull-request: https://github.com/SerenityOS/serenity/pull/12161 Reviewed-by: https://github.com/tomuta ✅
3 changed files with 9 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue