You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an bug in the ATA/IDE Driver in combination with multiple harddrives: It seems that for new drives no PIO operation is possible (because no IRQ is fired). The problem is that each IDE channel (in our case (standard QEMU configuration) we have an primary and secondary IDE channel) supports 2 drives. But the crucial point is that each IDE channel has one IRQ (so for disk 0 and disk 1 in both cases IRQ 14 is fired , the same applies to disk 2 and disk 3 in which case IRQ 15 is fired). In the current Implementation every new device is handled like it would get an whole IDE channel for its own. The interrupts for the 3rd and 4th drive in SWEB (IRQ11 and IRQ9) would in reality be fired by the 3rd and 4th IDE channel which we simple doesn't have.
To partially fix this the ata_irqs array in IDEDriver would have to be changed to
uint8ata_irqs[4] =
{
14, 14, 15, 15
};
Now at least it's possible to use 1 drive on each channel (but it breaks the system if 2 drives on one channel are used), but that doesn't fix the whole problem because we create for each device an own ATADriver Object, instead for each ide channel (and therefore for 2 drives) a driver should be created, therefore the ATADriver class has to be changed because in there also the drive and sector numbers of the drive are stored (now 2 drives should be supported for each ATADriver).
I also thought there could be a problem now with distinguishing which drive is meant when an IRQ is fired, but apparently according to the standard at least until ATA3 all operation have to be serialized anyway. But that could become a problem with the currently deployed time out check when we wait for the busy flag to be cleared.......
There is an bug in the ATA/IDE Driver in combination with multiple harddrives: It seems that for new drives no PIO operation is possible (because no IRQ is fired). The problem is that each IDE channel (in our case (standard QEMU configuration) we have an primary and secondary IDE channel) supports 2 drives. But the crucial point is that each IDE channel has one IRQ (so for disk 0 and disk 1 in both cases IRQ 14 is fired , the same applies to disk 2 and disk 3 in which case IRQ 15 is fired). In the current Implementation every new device is handled like it would get an whole IDE channel for its own. The interrupts for the 3rd and 4th drive in SWEB (IRQ11 and IRQ9) would in reality be fired by the 3rd and 4th IDE channel which we simple doesn't have.
To partially fix this the
ata_irqs
array inIDEDriver
would have to be changed toNow at least it's possible to use 1 drive on each channel (but it breaks the system if 2 drives on one channel are used), but that doesn't fix the whole problem because we create for each device an own
ATADriver
Object, instead for each ide channel (and therefore for 2 drives) a driver should be created, therefore theATADriver
class has to be changed because in there also the drive and sector numbers of the drive are stored (now 2 drives should be supported for eachATADriver
).I also thought there could be a problem now with distinguishing which drive is meant when an IRQ is fired, but apparently according to the standard at least until ATA3 all operation have to be serialized anyway. But that could become a problem with the currently deployed time out check when we wait for the busy flag to be cleared.......
References
ATA Principles
ATA Standard
The text was updated successfully, but these errors were encountered: