atapi 0xa8 command
Posted: Tue Mar 30, 2010 12:40 pm
hello, i have a very strange problem with my atapi driver.
my 0xa8 command packets are getting ignored when words 6-9 are not zero (transfer length). when they are zero, bochs detects this command properly and ofcourse says, that transfer length is zero.
i'm stucked, no idea whats wrong. here is code that setups that packet and send it.
thanks for any help.
my 0xa8 command packets are getting ignored when words 6-9 are not zero (transfer length). when they are zero, bochs detects this command properly and ofcourse says, that transfer length is zero.
i'm stucked, no idea whats wrong. here is code that setups that packet and send it.
Code: Select all
mov word [sig0], 0xA8
push ecx
shr ecx, 0x18
and ecx, 0xff
mov byte [sig2], cl
pop ecx
push ecx
shr ecx, 0x10
and ecx, 0xff
mov byte [sig3], cl
pop ecx
push ecx
shr ecx, 8
and ecx, 0xff
mov byte [sig4], cl
pop ecx
push ecx
and ecx, 0xff
mov byte [sig5], cl
pop ecx
call atapi_sendpacket
sig0 db 0
sig1 db 0
sig2 db 0
sig3 db 0
sig4 db 0
sig5 db 0
sig6 db 0
sig7 db 0
sig8 db 0
sig9 db 1
siga db 0
sigb db 0
atapi_sendpacket:
mov dx, ATA_DATA
mov esi, sig0
mov ecx, 6
cld
rep outsw
ret