This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: PCI Address Mapping
- From: Michael Kelly <mike at cogcomp dot com>
- To: Jonathan Larmour <jlarmour at redhat dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 18 Jan 2002 14:05:35 -0500
- Subject: Re: [ECOS] PCI Address Mapping
- References: <5.1.0.14.2.20020118094641.00b3dcd8@mail.cedata.com>
Jonathan,
At 05:45 PM 1/18/2002 +0000, Jonathan Larmour wrote:
>Michael Kelly wrote:
> >
> > Hi,
> >
> > Well I found my answer, and it's a bit ugly!
> >
> > We have a hard coded window defined in the .mlt file as
> > pci_window. This insures that malloc won't take it. Then
> > for the 82559 driver, we simply use the following defines
> > in the .inl file:
> >
> > #define CYGHWR_INTEL_I82559_PCI_MEM_MAP_BASE 0x01F00000
> > #define CYGHWR_INTEL_I82559_PCI_MEM_MAP_SIZE 0x0010000
> >
> > This means that one driver eats up all of the local memory
> > space assigned for PCI accesses. If you have a second
> > PCI device you're out of luck. Unless you want to write your
> > own heap manager.
> >
> > Is the correct? Is their any chance of a real heap manager
> > for PCI bus mastering devices?
>
>We've been talking about this internally - there is certainly a need for
>it, and the allocator can be very simple (it never needs to free[1]). I
>don't believe anyone is working on it though.
As a small consolation, you can have multiple devices of the
same type since the 82559 driver implements a simple heap
manager as would any other generic device.
It is not horrible to simply create one larger pci_window and
give only part of it to each driver. Again, crude, but effective
if you have only a few bus mastering devices. I suspect
that for the majority of embedded systems, this is not
unreasonable.
Michael
Michael J. Kelly
VP Engineering/Marketing
Cogent Computer Systems, Inc.
1130 Ten Rod Road
Suite A-201
North Kingstown, RI 02852
tel:401-295-6505 fax:401-295-6507
www.cogcomp.com