mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
Kernel: Change PCI access commandline option to also represent no access
This change allow the user to request the kernel to not use any PCI resources/devices at all. Also, don't try to initialize devices that rely on PCI if disabled.
This commit is contained in:
parent
6bf59cbb1b
commit
f6e635938f
5 changed files with 25 additions and 8 deletions
|
@ -142,14 +142,21 @@ UNMAP_AFTER_INIT bool CommandLine::is_vmmouse_enabled() const
|
|||
|
||||
UNMAP_AFTER_INIT PCIAccessLevel CommandLine::pci_access_level() const
|
||||
{
|
||||
auto value = lookup("pci_ecam"sv).value_or("on"sv);
|
||||
if (value == "on"sv)
|
||||
auto value = lookup("pci"sv).value_or("ecam"sv);
|
||||
if (value == "ecam"sv)
|
||||
return PCIAccessLevel::MemoryAddressing;
|
||||
if (value == "off"sv)
|
||||
if (value == "io"sv)
|
||||
return PCIAccessLevel::IOAddressing;
|
||||
if (value == "none"sv)
|
||||
return PCIAccessLevel::None;
|
||||
PANIC("Unknown PCI ECAM setting: {}", value);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::is_pci_disabled() const
|
||||
{
|
||||
return lookup("pci"sv).value_or("ecam"sv) == "none"sv;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::is_legacy_time_enabled() const
|
||||
{
|
||||
return lookup("time"sv).value_or("modern"sv) == "legacy"sv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue