This is the mail archive of the ecos-discuss@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 Mapping


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?

Regards,
Michael


At 07:00 AM 1/18/2002 -0500, Michael Kelly wrote:
>Hi,
>
>I am writing a HAL for a PCI based development board and I have
>a question about mapping.  First let me say what I think I know.
>
>1.  HAL_PCI_ALLOC_BASE_xxx is the address in PCI space
>that we begin assigning space to each device found.  This
>indicates where in PCI space that device will reside, either
>IO or MEM.
>
>2. HAL_PCI_PHYSICAL_xxx_BASE is where in CPU space
>these devices will now be seen.  This implies a mapping from
>local space at HAL_PCI_PHYSICAL_xxx_BASE to PCI space
>at HAL_PCI_ALLOC_BASE_xxx that must be setup inside the
>PCI bridge device.
>
>Ok, assuming that what I think I know is correct, what I need to
>know is how to assign to a PCI master device an address that
>it can use to access local memory.  That is, if I have SDRAM
>at address x in local space, what address in PCI space do I
>tell the device to use?   Obviously it can't be the same as
>HAL_PCI_ALLOC_BASE_xxx since that would cause a clash.
>
>This is the info I need to setup the PCI to Local Mapping in the
>bridge device.  Also I need this in order to insure that I setup
>my MMU to disable caching for the correct local address
>
>Sorry this is so long, but any help would be most appreciated.
>Regards,
>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

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


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