This file contains procedures for managing ATA (harddrive) operations.
| ATA Driver.asm | This file contains procedures for managing ATA (harddrive) operations. |
| Functions | |
| IntIDE0 | This interrupt handles completed ATA operations on IDE0. |
| IntIDE1 | This interrupt handles completed ATA operations on IDE1. |
| ATAReadSectors | This procedure handles calling of ATAReadSectors28 or ATAReadSectors48 depending on device capabilities. |
| ATAReadSectors28 | Manages I/O with ATA device to read sectors in 28-bit mode. |
| ATAReadSectors48 | Manages I/O with ATA device to read sectors in 48-bit mode. |
| ATAReadSectorsDMA | Manages I/O with ATA device via DMA to read sectors. |
| ATAIsValidDevice | Checks the ATADEVICEINFO of the specified device to see if it is a valid, supported device. |
This procedure handles calling of ATAReadSectors28 or ATAReadSectors48 depending on device capabilities.
TODO: Determine whether the 28-bit and 48-bit maximum # of sectors numbers are big-endian, little-endian, or some mix.
TODO: Determine whether they are actually 1 more than the maximum quantity, or 1 more than the maximum LBA (reference says both, so maybe LBA starts @ 1, not 0)
| pDest | address of destination memory |
| Drive0To3 | index from 0 to 3 selecting the drive |
| SectorNumLow | low 32 bits of sector number from which to read |
| SectorNumHigh | high 32 bits of sector number from which to read |
| nSectors | number of sectors to read |
Manages I/O with ATA device to read sectors in 28-bit mode. This shouldn’t be called from outside: call ATAReadSectors.
| pDest | address of destination memory |
| DriveNum | ATA-relevant device number |
| SectorNum | sector number from which to read |
| nSectors | number of sectors to read |
Manages I/O with ATA device to read sectors in 48-bit mode. This shouldn’t be called from outside: call ATAReadSectors.
| pDest | address of destination memory |
| DriveNum | ATA-relevant device number |
| SectorNumLow | low 32 bits of sector number from which to read |
| SectorNumHigh | high 32 bits of sector number from which to read |
| nSectors | number of sectors to read |
Manages I/O with ATA device via DMA to read sectors. This shouldn’t be called from outside: call ATAReadSectors.
| pDest | address of destination memory |
| DriveNum | ATA-relevant device number |
| SectorNumLow | low 32 bits of sector number from which to read |
| SectorNumHigh | high 32 bits of sector number from which to read |
| nSectors | number of sectors to read |
Checks the ATADEVICEINFO of the specified device to see if it is a valid, supported device.
| Drive0To3 | ATA device index, from 0 to 3 |
| eax | the address of the corresponding ATADEVICEINFO if valid, otherwise 0 |
| ecx | nSectorsLow if valid |
| edx | nSectorsHigh if valid |