Success using the IDE code

Thomas Doerfler Thomas.Doerfler at
Tue Sep 10 07:28:50 UTC 2002

Hello Joel, Hello Peter,

sorry for the late reply, but my wife was on holidays for one 
week and I was pretty busy with the kids. =:->

first of all: It's nice to hear, that the IDE driver and the 
whole FAT machinery is working fine on other boards aswell.

> > Joel Sherrill <joel.sherrill at> wrote:
> > 
> > >
> > > Hi,
> > >
> > > I am having a brain lapse this morning.  Where is the source code for
> > > the
> > > IDE driver in the source tree currently?  I can't seem to find it. :(

I got the same result when I looked for the code some time 
ago... So I think we intended to integrate the IDE driver as a 
specific driver for the MBX8xx BSP, but it has gone (or never 
been there?) in the CVS.

In the long run a location in libchip would be fine, but this 
will require great modifications of the code due to the 
different way to access registers. And at least one BSP 
specific base function will be required to initialize the IDE 
hardware and specify the base address. 

One problem with such a solution would be performance: I don't 
think it is ok to actually perform function calls to acess any 
register, because in PIO mode (the only one supported now) 
there are several register accesses for each byte transferred 
and it would really slow down throughput. On the other hand I 
don't think there is any IDE interface having gaps in the 
address map, so maybe performing direct accesses to the 
registers (at variable addresses, with variable Endianess) 
would be acceptable. What do you think, Joel?

A third solution would be to define a bunch of pointers, each 
pointing to one dedicated IDE register. These pointers would 
have to be initialized once, and then the code to access the 
registers could really be embedded into the IDE driver, not 
using function calls for each access.

Hm, having a closer look on what I have written right now this 
will not work, because it would only cover memory mapped 
peripherals, and not the I/O space of i386.

Is there some way to make the preprocessor handle the 
distinction? Joel, do you have any idea on that?

Still thinking about it....

	Thomas Doerfler.
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at
PGP public key available at: http://www.imd-

More information about the users mailing list