1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

Kernel: Change the indexing of storage devices in IDEController class

Previously, the indexing scheme was that 0 is Primary-Master, 1 is
Primary-Slave, 2 is Secondary-Master, 3 is Secondary-Slave.

Instead of merely matching between numbers to the channel & position,
the IDEController code will try to find all available drives connected to
the two channels, then it will create a Vector with nonnull RefPtr to
them. Then we take use the given index with this Vector.
This commit is contained in:
Liav A 2020-12-19 15:19:01 +02:00 committed by Andreas Kling
parent 6a691306b5
commit 78ae4b0530
2 changed files with 17 additions and 2 deletions

View file

@ -55,6 +55,7 @@ public:
private:
IDEController(PCI::Address address, bool force_pio);
RefPtr<StorageDevice> device_by_channel_and_position(u32 index) const;
void initialize(bool force_pio);
void detect_disks();