ATA PIO Mode: Difference between revisions
Jump to navigation
Jump to search
m
Fixed some grammar errors.
[unchecked revision] | [unchecked revision] |
(Added notes on forum article and conformancy.) |
m (Fixed some grammar errors.) |
||
Line 99:
All by all, it seems that a lot of ATA drives handle operations differently, as ~, one of our members, found out (see [http://forum.osdev.org/viewtopic.php?f=1&t=20690&hilit=ATA+Detection the forums]). The floating bus 0xFF value, for example, isn't always the value you would expect it to be. Different hard drives may also report different values for the Cylinder Low and Cylinder High values which you usually check when an error was returned in status byte after attempting to execute the IDENTIFY (0xEC) command.
One could also try to ignore whether the ATA IDENTIFY command returns an error or not, and simply immediately
<source lang="c">
// 'base' is e.g. 0x01F0.
outb(base + 2, 0x00); // Sector count
outb(base + 3, 0x00); // Sector number
outb(base + 4, 0x00); // Cylinder low
outb(base + 5, 0x00); // Cylinder high
</source>
|