forked from AbleOS/ableos
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
// $ATA_PRIMARY_DATA := @intcast(0x1F0)
|
|
// $ATA_PRIMARY_ERR := @intcast(0x1F1)
|
|
// $ATA_PRIMARY_SECCOUNT := @intcast(0x1F2)
|
|
// $ATA_PRIMARY_LBA_LO := @intcast(0x1F3)
|
|
// $ATA_PRIMARY_LBA_MID := @intcast(0x1F4)
|
|
// $ATA_PRIMARY_LBA_HI := @intcast(0x1F5)
|
|
// $ATA_PRIMARY_DRIVE_HEAD := @intcast(0x1F6)
|
|
// $ATA_PRIMARY_COMM_REGSTAT := @intcast(0x1F7)
|
|
// $ATA_PRIMARY_ALTSTAT_DCR := @intcast(0x3F6)
|
|
|
|
$ATA_PRIMARY_IO := @intcast(0x1F0)
|
|
|
|
$ATA_PRIMARY_DEVCTL := @intcast(0x3F6)
|
|
$ATA_SECONDARY_DEVCTL := @intcast(0x3F6)
|
|
|
|
$ATA_REG_STAT := @intcast(0x7)
|
|
|
|
// // Indicates an error occurred. Send a new command to clear it
|
|
// STAT_ERR := 1 << 0
|
|
// // Set when the drive has PIO data to transfer, or is ready to accept PIO data.
|
|
// STAT_DRQ := 1 << 3
|
|
// // Overlapped Mode Service Request.
|
|
// STAT_SRV := 1 << 4
|
|
// // Drive Fault Error (does not set ERR).
|
|
// STAT_DF := 1 << 5
|
|
// // Bit is clear when drive is spun down, or after an error. Set otherwise.
|
|
// STAT_RDY := 1 << 6
|
|
// // Indicates the drive is preparing to send/receive data (wait for it to clear).
|
|
// // In case of 'hang' (it never clears), do a software reset.
|
|
// STAT_BSY := 1 << 7
|
|
|
|
$ATA_SR_BSY := 0x80
|
|
$ATA_SR_DF := 0x20
|
|
$ATA_SR_DRQ := 0x8
|
|
$ATA_SR_ERR := 0x1 |