Skip to content

Commit

Permalink
Kernel/Storage: Remove ATA IDE support
Browse files Browse the repository at this point in the history
Nobody uses this functionality. I used this code on my old 2007 ICH7
test machine about a year ago, but bare metal is a small aspect of the
project, so it's safe to assume that nobody really tests this piece of
code.
Therefore, let's drop this for good and focus on more modern hardware.
  • Loading branch information
supercomputer7 authored and ADKaster committed May 14, 2024
1 parent f474d0c commit 2cb86c1
Show file tree
Hide file tree
Showing 33 changed files with 314 additions and 2,029 deletions.
5 changes: 0 additions & 5 deletions Base/usr/share/man/man7/boot_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ List of options:
* **`boot_prof`** - If present on the command line, global system profiling will be enabled
as soon as possible during the boot sequence. Allowing you to profile startup of all applications.

* **`disable_ide`** - If present on the command line, the IDE controller will not be initialized
during the boot sequence. Leaving only the AHCI and Ram Disk controllers.

* **`disable_physical_storage`** - If present on the command line, neither AHCI, or IDE controllers will be initialized on boot.

* **`disable_ps2_mouse`** - If present on the command line, no PS2 mouse will be attached.
Expand All @@ -50,8 +47,6 @@ List of options:
* **`graphics_subsystem_mode`** - This parameter expects one of the following values. **`on`**- Boot into the graphical environment if possible (default). **`off`** - Boot into text mode, don't initialize any driver. **`limited`** - Boot into the pre-defined framebuffer that the bootloader
has set up before booting the Kernel, don't initialize any driver.

* **`force_pio`** - If present on the command line, the IDE controllers will be force into PIO mode when initialized IDE Channels on boot.

* **`hpet`** - This parameter expects one of the following values. **`periodic`** - The High Precision Event Timer should
be configured in a periodic mode. **`nonperiodic`** - The High Precision Event Timer should eb configure din non-periodic mode.

Expand Down
2 changes: 1 addition & 1 deletion Kernel/Arch/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void init_stage2(void*)
for (auto* init_function = driver_init_table_start; init_function != driver_init_table_end; init_function++)
(*init_function)();

StorageManagement::the().initialize(kernel_command_line().is_force_pio(), kernel_command_line().is_nvme_polling_enabled());
StorageManagement::the().initialize(kernel_command_line().is_nvme_polling_enabled());
for (int i = 0; i < 5; ++i) {
if (StorageManagement::the().determine_boot_device(kernel_command_line().root_device()))
break;
Expand Down
56 changes: 0 additions & 56 deletions Kernel/Arch/x86_64/ISABus/IDEController.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions Kernel/Arch/x86_64/ISABus/IDEController.h

This file was deleted.

167 changes: 0 additions & 167 deletions Kernel/Arch/x86_64/PCI/IDELegacyModeController.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions Kernel/Arch/x86_64/PCI/IDELegacyModeController.h

This file was deleted.

10 changes: 0 additions & 10 deletions Kernel/Boot/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ UNMAP_AFTER_INIT bool CommandLine::is_boot_profiling_enabled() const
return contains("boot_prof"sv);
}

UNMAP_AFTER_INIT bool CommandLine::is_ide_enabled() const
{
return !contains("disable_ide"sv);
}

UNMAP_AFTER_INIT bool CommandLine::is_smp_enabled() const
{
// Note: We can't enable SMP mode without enabling the IOAPIC.
Expand Down Expand Up @@ -195,11 +190,6 @@ bool CommandLine::is_pc_speaker_enabled() const
PANIC("Unknown pcspeaker setting: {}", value);
}

UNMAP_AFTER_INIT bool CommandLine::is_force_pio() const
{
return contains("force_pio"sv);
}

UNMAP_AFTER_INIT StringView CommandLine::root_device() const
{
return lookup("root"sv).value_or("lun0:0:0"sv);
Expand Down
2 changes: 0 additions & 2 deletions Kernel/Boot/CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class CommandLine {
[[nodiscard]] bool contains(StringView key) const;

[[nodiscard]] bool is_boot_profiling_enabled() const;
[[nodiscard]] bool is_ide_enabled() const;
[[nodiscard]] bool is_ioapic_enabled() const;
[[nodiscard]] bool is_smp_enabled_without_ioapic_enabled() const;
[[nodiscard]] bool is_smp_enabled() const;
Expand All @@ -85,7 +84,6 @@ class CommandLine {
[[nodiscard]] bool i8042_enable_first_port_translation() const;
[[nodiscard]] GraphicsSubsystemMode graphics_subsystem_mode() const;
[[nodiscard]] I8042PresenceMode i8042_presence_mode() const;
[[nodiscard]] bool is_force_pio() const;
[[nodiscard]] AcpiFeatureLevel acpi_feature_level() const;
[[nodiscard]] StringView system_mode() const;
[[nodiscard]] PanicMode panic_mode(Validate should_validate = Validate::No) const;
Expand Down
16 changes: 5 additions & 11 deletions Kernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,11 @@ set(KERNEL_SOURCES
Devices/GPU/VirtIO/GPU3DDevice.cpp
Devices/GPU/VirtIO/GraphicsAdapter.cpp
Devices/Loop/LoopDevice.cpp
Devices/Storage/ATA/AHCI/Controller.cpp
Devices/Storage/ATA/AHCI/Port.cpp
Devices/Storage/ATA/AHCI/InterruptHandler.cpp
Devices/Storage/ATA/GenericIDE/Controller.cpp
Devices/Storage/ATA/GenericIDE/Channel.cpp
Devices/Storage/ATA/ATAController.cpp
Devices/Storage/ATA/ATADevice.cpp
Devices/Storage/ATA/ATADiskDevice.cpp
Devices/Storage/ATA/ATAPort.cpp
Devices/Storage/AHCI/ATADevice.cpp
Devices/Storage/AHCI/ATADiskDevice.cpp
Devices/Storage/AHCI/Controller.cpp
Devices/Storage/AHCI/InterruptHandler.cpp
Devices/Storage/AHCI/Port.cpp
Devices/Storage/NVMe/NVMeController.cpp
Devices/Storage/NVMe/NVMeNameSpace.cpp
Devices/Storage/NVMe/NVMeInterruptQueue.cpp
Expand Down Expand Up @@ -419,10 +415,8 @@ if ("${SERENITY_ARCH}" STREQUAL "x86_64")

Arch/x86_64/ISABus/HID/VMWareMouseDevice.cpp
Arch/x86_64/ISABus/I8042Controller.cpp
Arch/x86_64/ISABus/IDEController.cpp
Arch/x86_64/ISABus/SerialDevice.cpp
Arch/x86_64/PCI/Controller/HostBridge.cpp
Arch/x86_64/PCI/IDELegacyModeController.cpp
Arch/x86_64/PCI/Initializer.cpp
Arch/x86_64/PCI/MSI.cpp

Expand Down
Loading

0 comments on commit 2cb86c1

Please sign in to comment.