Kernel: Extended IDE interface to allow slave device usage (#283)

The IDE Disk Controller driver has been extended to allow the secondary device on the channel to be initialised and used. A test as to whether this is working (for anyone interested) is to modify `init.cpp:87` to `auto dev_hd0 = IDEDiskDevice::create(IdeDiskDevice::DeviceType::SLAVE);`. The kernel will fail to boot, as there is no disk attached to CHANNEL 1's slave. This was born out of the fact that my FAT driver can't be tested as easily without creating a partition on `hda`.
This commit is contained in:
Jesse 2019-07-08 06:16:52 +00:00 committed by Andreas Kling
commit ab90d2e251
Notes: sideshowbarker 2024-07-19 13:22:54 +09:00
3 changed files with 53 additions and 12 deletions

View file

@ -84,7 +84,7 @@ VFS* vfs;
hang();
}
auto dev_hd0 = IDEDiskDevice::create();
auto dev_hd0 = IDEDiskDevice::create(IDEDiskDevice::DriveType::MASTER);
NonnullRefPtr<DiskDevice> root_dev = dev_hd0.copy_ref();