1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:45:06 +00:00

Kernel/PCI: Don't use x86 initialization methods in non-x86 builds

Using the IO address space is only relevant for x86 machines, so let's
not compile instructions to access the PCI configuration space when we
don't target x86 platforms.
This commit is contained in:
Liav A 2022-09-02 10:02:16 +03:00 committed by Linus Groh
parent 4555cac639
commit 0a220a413f
3 changed files with 10 additions and 0 deletions

View file

@ -149,8 +149,10 @@ UNMAP_AFTER_INIT PCIAccessLevel CommandLine::pci_access_level() const
auto value = lookup("pci"sv).value_or("ecam"sv);
if (value == "ecam"sv)
return PCIAccessLevel::MemoryAddressing;
#if ARCH(I386) || ARCH(X86_64)
if (value == "io"sv)
return PCIAccessLevel::IOAddressing;
#endif
if (value == "none"sv)
return PCIAccessLevel::None;
PANIC("Unknown PCI ECAM setting: {}", value);