mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
Kernel: Don't compile ISA IDE controller code in non-x86 builds
The ISA IDE controller code makes sense to be compiled in a x86 build as it relies on access to the x86 IO space. For other architectures, we can just omit the code as there's no way we can use that code again. To ensure we can omit the code easily, we move it to the Arch/x86 directory.
This commit is contained in:
parent
bb6f61ee5d
commit
948be9674a
6 changed files with 14 additions and 3 deletions
|
@ -6,9 +6,13 @@
|
|||
*/
|
||||
|
||||
#include <AK/IterationDecision.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/UUID.h>
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86/ISABus/IDEController.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/Controller/VolumeManagementDevice.h>
|
||||
|
@ -19,7 +23,6 @@
|
|||
#include <Kernel/Panic.h>
|
||||
#include <Kernel/Storage/ATA/AHCI/Controller.h>
|
||||
#include <Kernel/Storage/ATA/GenericIDE/Controller.h>
|
||||
#include <Kernel/Storage/ATA/GenericIDE/ISAController.h>
|
||||
#include <Kernel/Storage/ATA/GenericIDE/PCIController.h>
|
||||
#include <Kernel/Storage/NVMe/NVMeController.h>
|
||||
#include <Kernel/Storage/Ramdisk/Controller.h>
|
||||
|
@ -429,9 +432,11 @@ UNMAP_AFTER_INIT void StorageManagement::initialize(StringView root_device, bool
|
|||
VERIFY(s_storage_device_minor_number == 0);
|
||||
m_boot_argument = root_device;
|
||||
if (PCI::Access::is_disabled()) {
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
// Note: If PCI is disabled, we assume that at least we have an ISA IDE controller
|
||||
// to probe and use
|
||||
m_controllers.append(ISAIDEController::initialize());
|
||||
#endif
|
||||
} else {
|
||||
enumerate_pci_controllers(force_pio, poll);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue