Embedded PC IDE Flash Questions
Chris Johns
chrisj at rtems.org
Fri May 29 02:18:51 UTC 2009
Joel Sherrill wrote:
> Chris Johns wrote:
>>
>> Is the device on the IDE bus set as the primary or second device ?
>>
>> I have found with testing that I have a primary and secondary disk
>> configured with qemu but only the primary disk is being detected yet I
>> can read both identities. I am looking into this.
>>
>>
> I have no idea. I posted the link to the manual for the
> board and it has ROM-DOS on it so I can check things.
>
Yes you did and I have had a look and jumper J8 looks like it controls
the master/slave setting for the CFlash. The CFlash is on IDE1. The
manual states a jumper on 1-2 of J8 should make it a master and I
suspect this is the default. If it was a slave I would have suspected
the ATA issue I have found. So I am not sure what is happening here. In
the manual the Main Menu Screen for the BIOS shows the CFlash as the
Secondary Master.
On to the ATA issue I have found. I hacked out the ATA DIAG command
which is run during initialisation to get qemu to run and if effected
the slave device detection on a bus. Looking at the DIAG command a
little more I do not like it. That could be my lack of understanding,
but it means you need a master installed to detect a slave device. Maybe
this is an electrical constraint but it seems silly if you do not. I
took a look at the ATA module support in the latest grub sources and it
does a simple port check, a reset then an identify. This makes sense to
me. I have added a reset to the pc386 IDE driver.
I also found adding an identify command before the diag command caused
the diag command to work on qemu so I tend to think it is not a common
operation for boot loaders or qemu would have fixed it before now.
The IDE1 (second) interface still does not work on qemu. I have
something connected which I think is a CDROM or an ATAPI device. This
device does not complete the identify command so I am wondering if ATAPI
does something else. Maybe we should have code to detect an ATAPI device
and ignore it.
Finally I made the i386 BSP option number the IDE buses 1,2 etc. Should
this be 0,1 etc ?
Regards
Chris
More information about the users
mailing list