This message is from the T13 list server.

Good fun, thanks for sharing, sorry I have no immediate full answer.

Mostly I do not see you deciding port x3F6 DeviceControl, so I wonder
what's there, especially nIEN.

>         __asm__ __volatile__("rep; ins" "w":"=D"(addr),
>                             "=c"(count):"d"(port), "0"(addr),

gcc x86 asm, yes?  I'm curious to know your toolchain.

>    Why isn't the DRQ is not being set to 1 ? 

Me, I'd start by trying to make op xEC or xA1 Identify work, rather than
x20 Read, so you could show us those results for context, e.g. what to
expect from ATAPI differs from what to expect from ATA.

Also I'd like to see you touch the INTRQ ports - I forget if they are
x20/21 or xA0/A1 or exactly what - so we can see you clear your own
INTRQ.  That exercise you can go thru with x00 Nop, no DRQ involved.

>         printf("%x", inb(0x1f7));
>         /* Prints 0x50 . So the below loops forever.
>          */

x50 says complete.

How have you ensured, for example, that no interrupt-driven BIOS is
acking the INTRQ you generate?

>         while ((inb(0x1f7) & 0x80) == 0x80
>                || (inb(0x1f7) & 0x08) != 0x08) ;

Polling x1F7 Status rather than x3F6 Alternate Status is arguably rude,
but should work, aye.

Pat LaVarre


Reply via email to