Embedded PC IDE Flash Questions

Chris Johns chrisj at rtems.org
Sat May 30 05:06:08 UTC 2009

Chris Johns wrote:
> 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.

To help I have added --ide-show to the PC386 BSP and it will show some 
low level probes during initialisation. Maybe this will help you find 
the problem. The code will also show the model number string from the 
devices found including ATAPI devices.

> 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 have fixed this so the master and slave devices are probed. The ATA 
driver still ignores ATAPI devices.

> 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 ?

Changed to number the buses from 0, ie --ide=0,1

> Regards
> Chris
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users

More information about the users mailing list