This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCI - address management


On Fri, 2003-02-21 at 11:45, Robin Farine wrote:
> On Fri, 2003-02-21 at 18:13, Gary Thomas wrote:
> > This is a proposal - it works for me and I think it's safe in general.  
> > The problem is that I have a PCI device which powers up "dumb", i.e. it 
> > supports a number of PCI regions, but *only* after being initialized 
> > programmatically.  Once this initialization takes place, it acts 
> > normally.
> 
> You lost me here. I thought that any PCI device powers up "dumb" and
> remains in this state until a host/bridge configures and enables it.
> 

Indeed.  However, this device looks like it only has one PCI region
when it turns on, but after initialization, it has four!  The PCI
library scanning code will only set up the first one which is 
insufficient for my needs.

> > +                if ((bar < 0xFF000000) && (bar >= cyg_pci_io_base)) {
> > +                    // Assume that this device owns 512 'registers'
> > +                    cyg_pci_io_base = bar + 0x200;
> 
> Maybe I'm tired but this looks cryptic to me (same for the memory
> space). Ok, you add a hole of 0x200 to the PCI IO space, but what would
> happen if it actually needs 0x400 bytes?
> 
> In fact, I am sorry but I completely missed your point with this "dumb"
> device. Bah, never mind.

Truly, this is only a guess.  The problem is that the device can only
tell the library how big a given segment is by resizing it :-(  The code
has always just punted on this - note the comment which says something
like "device active, probed sizes are invalid". 

This really only matters if you need to enable a device which didn't
get configured the first time around - my very special case.  In all
other cases, this code will have no real effect.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]