Page 1 of 1

HDD answer with 0xFF

Posted: Wed Dec 01, 2010 2:50 am
by noro
Hi,

I am new here and I must tell that I am very impressed to see how many smart guys are here and writting
high quality posts! =D>. Congratulations also on moderators and the forum-creators!

Briefly, I'm writting a kernel (pmode 32bit, GRUB boot-loader) and I got a problem when writting a HDD-driver (PIO-Mode)

So, when I send the IDENTIFY DEVICE, some HDD answered with 0xFF and these cannot be identified.
In BIOS the SATA are emulated as IDE. On Bochs, Qemu, VirtualBox works. Work also on some PC (Intel).


What cann be? Can anyone help me?

Cheers,

Noro

Re: HDD answer with 0xFF

Posted: Wed Dec 01, 2010 12:51 pm
by bewing
0xff is a completely illegal status. But it's hard to tell exactly where the illegal thing is happening. If code works in an emulator (and on some PCs), but fails on other real hardware, then the problem is almost always timing. Try adding 400ns delays in many places. If you already have 400ns delays, try making them 1 or 2 microseconds instead. Make sure that you set all the IO ports (except DRIVE_SEL and CMD) to 0 before you do your identify. Make sure your test for STATUS=BSY has no bugs.

HDD answer with 0xFF - Solution

Posted: Wed Dec 01, 2010 2:33 pm
by noro
Hello,

Thank you very much for your rush answer. I found in BIOS an Option, Main->IDE Configuration->SATA Configuration. I turned this setting into 'Compatible' from
'Enhanced/Configure SATA as IDE' and... it works. Now I can see the serial of HDD, firmware, etc.

The problem PC has an ASUS P5B Motherboard with AMI BIOS and Intel ICH8, JMicron JMB363 PATA/SATA controllers.


Thank you again!

Cheers,

Noro