Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PCI Configuration help for a novice

161 views
Skip to first unread message

kostizt

unread,
Aug 28, 2000, 3:00:00 AM8/28/00
to
Folks,

I must admit that I am new to the PCI bus and I am having a lot of
trouble getting a vendor supplied driver / serial device into my
system. The symptom is that (a) the BARs don't make a lot of sense to
me and (b) the device (serial), doesn't seem to be mapped (i/o simply
posting in memory with no interrupts).

I have a 2304 BSP. The vendor's documentation says "ensure that the BSP
itself performs configuration of all PCI devices supported by the PCI
HAL. This includes configuring the PCI base address registers (BARs)
and the interrupt line request register in the PCI configuration space
of each device."

I thought I would find the code that does this in the BSP and go from
there. The problem is that I can't find where any of this happens!

Does anyone know how the PCI devices get their configuration information
processed by the BSP?

If I invoke an xpciShow, it looks as follows:

-> xpciShow
Scanning function 0 of each PCI device on bus 0 of card 0
bus slot vendor dev IRQ Bar0 Bar1 Bar2 Bar3 Bar4
Bar5
0 00 1057 4801 00 00000001 fc000000 00000000 00000000 00000000
00000000
0 11 10ad 0565 00 00000000 00000000 00000000 00000000 00000000
00000000
0 13 10e3 0000 00 fd050000 00000001 00000000 00000000 00000000
00000000
0 14 1011 0009 00 00020001 00000000 00000000 00000000 00000000
00000000
0 17 124b 0001 00 00000000 00000000 00000000 00000000 00000000
00000000
value = 1 = 0x1

The information for bus/slot/vendor for slot 17 is the interesting
piece. The vendor info is the PCI device of interest. Does a BAR0 of 0
make sense?

Any help would be greatly appreciated.

Thanks in advance!

Tom Kostizak


James Marshall

unread,
Sep 12, 2000, 12:14:06 PM9/12/00
to
Use the PCI Auto Config Library (src/drv/pci/pciAutoConfigLib.c). Also get
WTN-49 from WindSurf under WindRiver Technical Notes. (See my response to Ezra
Koper's How to work with PCI).

For interpreting PCI Config registers, the PCICFG program might help though
you'll have to port it from its current DOS form. See
http://www.cs.cmu.edu/~ralf/pub-files/rbpci119.zip.

Tom Shanley's PCI System Architecture has a decent description of what PCI
configuration requires. You can also get some ideas from the Linux source.

James Marshall

John Fusco

unread,
Sep 13, 2000, 3:00:00 AM9/13/00
to
My version of the 2304 BSP does not do PCI autoconfig. I don't think
they have updated that BSP to do so. All the devices have drivers with
hard-coded base addresses. Updating the BSP to use the autoconfig
library is no small task.

A zero is what you would expect to see in a BAR that has not been
configured or is not implemented.

In article <39AABFBA...@res.raytheon.com>,


Sent via Deja.com http://www.deja.com/
Before you buy.

krh...@my-deja.com

unread,
Sep 15, 2000, 3:00:00 AM9/15/00
to kos...@res.raytheon.com
It looks like WindRiver has added some kind of a PCI bus "autoconfig"
to the Tornado 2 driver directories (at least for the MVME2604 BSP).

file:\c:\tornado20\target\h\drv\pci\pciAutoConfigLib.h
file:\c:\tornado20\target\src\drv\pci\pciAutoConfigLib.c

Note that our installation of Tornado 1 with the MVME2604 BSP
did not have these files present. Since I have been trying to get
something like this for the last couple of years (why would a vendor
support PCI without providing a "plug-n-play" capability?) it was a bit
disturbing to see the following in pciAutoConfigLib.c (i.e. the files
already existed):

/* Copyright 1997,1998,1999 Motorola, Inc. All Rights Reserved */
/* Copyright 1997-1999 Wind River Systems, Inc. All Rights Reserved */

The pciAutoConfigLib.c file contains a lot of documentation.
If anyone runs across any other documentation of the autoconfig
implementation please let me know (I haven't looked on "WindSurf" yet -
see WTN-49 reference below).

Kent

---------

Subject: Re: PCI Configuration help for a novice
Date: 09/12/2000
Author: James Marshall <james_m...@agilent.com>

Use the PCI Auto Config Library (src/drv/pci/pciAutoConfigLib.c).
Also get WTN-49 from WindSurf under WindRiver Technical Notes.
(See my response to Ezra Koper's How to work with PCI).

For interpreting PCI Config registers, the PCICFG program might help
though you'll have to port it from its current DOS form.
See http://www.cs.cmu.edu/~ralf/pub-files/rbpci119.zip.

Tom Shanley's PCI System Architecture has a decent description of what
PCI configuration requires.
You can also get some ideas from the Linux source.

James Marshall

----------

Subject: Re: PCI Configuration help for a novice
Date: Wed, 13 Sep 2000 18:21:01 GMT
From: John Fusco <john_...@my-deja.com>

My version of the 2304 BSP does not do PCI autoconfig. I don't think
they have updated that BSP to do so. All the devices have drivers with
hard-coded base addresses. Updating the BSP to use the autoconfig
library is no small task.

A zero is what you would expect to see in a BAR that has not been
configured or is not implemented.

----------

Subject: PCI Configuration help for a novice
Date: 08/28/2000
Author: kostizt <kos...@res.raytheon.com>

Folks,

I must admit that I am new to the PCI bus and I am having a lot of
trouble getting a vendor supplied driver / serial device into my system.
The symptom is that (a) the BARs don't make a lot of sense to me and (b)
the device (serial), doesn't seem to be mapped (i/o simply posting in
memory with no interrupts).

I have a 2304 BSP. The vendor's documentation says "ensure that the BSP
itself performs configuration of all PCI devices supported by the PCI
HAL. This includes configuring the PCI base address registers (BARs)
and the interrupt line request register in the PCI configuration space
of each device."

I thought I would find the code that does this in the BSP and go from
there. The problem is that I can't find where any of this happens!

Does anyone know how the PCI devices get their configuration information
processed by the BSP?

If I invoke an xpciShow, it looks as follows:

<SNIP>

0 new messages