This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: PCI - address management
- From: Robin Farine <robin dot farine at acn-group dot ch>
- To: eCos patches ml <ecos-patches at sources dot redhat dot com>
- Date: 21 Feb 2003 19:45:43 +0100
- Subject: Re: PCI - address management
- References: <1045847626.2250.1798.camel@hermes.chez-thomas.org>
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.
> + 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.
--
rnf