mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Kernel: Move PCI initialization x86-specific code to the arch directory
It seems more correct to let each platform to define its own sequence of initialization of the PCI bus, so let's remove the #if flags and just put the entire Initializer.cpp file in the appropriate code directory.
This commit is contained in:
parent
5576151e68
commit
e39086f2c6
Notes:
sideshowbarker
2024-07-17 06:47:46 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/e39086f2c6 Pull-request: https://github.com/SerenityOS/serenity/pull/15173 Reviewed-by: https://github.com/linusg
2 changed files with 1 additions and 5 deletions
|
@ -23,7 +23,6 @@ static bool test_pci_io();
|
|||
|
||||
UNMAP_AFTER_INIT static PCIAccessLevel detect_optimal_access_type()
|
||||
{
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
auto boot_determined = kernel_command_line().pci_access_level();
|
||||
if (!ACPI::is_enabled() || !ACPI::Parser::the()->find_table("MCFG"sv).has_value())
|
||||
return PCIAccessLevel::IOAddressing;
|
||||
|
@ -33,7 +32,6 @@ UNMAP_AFTER_INIT static PCIAccessLevel detect_optimal_access_type()
|
|||
|
||||
if (!g_pci_access_io_probe_failed)
|
||||
return PCIAccessLevel::IOAddressing;
|
||||
#endif
|
||||
|
||||
PANIC("No PCI bus access method detected!");
|
||||
}
|
||||
|
@ -54,13 +52,11 @@ UNMAP_AFTER_INIT void initialize()
|
|||
VERIFY(success);
|
||||
break;
|
||||
}
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
case PCIAccessLevel::IOAddressing: {
|
||||
auto success = Access::initialize_for_one_pci_domain();
|
||||
VERIFY(success);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
|
@ -25,7 +25,6 @@ set(KERNEL_SOURCES
|
|||
Bus/PCI/Access.cpp
|
||||
Bus/PCI/API.cpp
|
||||
Bus/PCI/Device.cpp
|
||||
Bus/PCI/Initializer.cpp
|
||||
Bus/USB/UHCI/UHCIController.cpp
|
||||
Bus/USB/UHCI/UHCIRootHub.cpp
|
||||
Bus/USB/USBConfiguration.cpp
|
||||
|
@ -341,6 +340,7 @@ if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
|
|||
Arch/x86/common/Shutdown.cpp
|
||||
|
||||
Arch/x86/PCI/Controller/HostBridge.cpp
|
||||
Arch/x86/PCI/Initializer.cpp
|
||||
)
|
||||
|
||||
set(KERNEL_SOURCES
|
||||
|
|
Loading…
Reference in a new issue