mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Kernel: Allow disabling of IDE controllers with disable_ide
The kernel doesn't like the IDE controllers on an Asus A7N8X-E Deluxe motherboard, so add an option to disable them.
This commit is contained in:
parent
7eaefa5aa6
commit
4d755725bf
Notes:
sideshowbarker
2024-07-18 22:53:30 +09:00
Author: https://github.com/boricj Commit: https://github.com/SerenityOS/serenity/commit/4d755725bf1 Pull-request: https://github.com/SerenityOS/serenity/pull/5095
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include <AK/UUID.h>
|
||||
#include <Kernel/CommandLine.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Ext2FileSystem.h>
|
||||
#include <Kernel/PCI/Access.h>
|
||||
@ -60,11 +61,13 @@ bool StorageManagement::boot_argument_contains_partition_uuid()
|
||||
NonnullRefPtrVector<StorageController> StorageManagement::enumerate_controllers(bool force_pio) const
|
||||
{
|
||||
NonnullRefPtrVector<StorageController> controllers;
|
||||
PCI::enumerate([&](const PCI::Address& address, PCI::ID) {
|
||||
if (PCI::get_class(address) == 0x1 && PCI::get_subclass(address) == 0x1) {
|
||||
controllers.append(IDEController::initialize(address, force_pio));
|
||||
}
|
||||
});
|
||||
if (!kernel_command_line().contains("disable_ide")) {
|
||||
PCI::enumerate([&](const PCI::Address& address, PCI::ID) {
|
||||
if (PCI::get_class(address) == 0x1 && PCI::get_subclass(address) == 0x1) {
|
||||
controllers.append(IDEController::initialize(address, force_pio));
|
||||
}
|
||||
});
|
||||
}
|
||||
controllers.append(RamdiskController::initialize());
|
||||
return controllers;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user