PCI.DOC

(46 KB) Pobierz
	 PCI - The PCI System information & Exploration tool.


The following is a somewhat rambling text, from which you should be able to
extract everything you ever wanted to know about this program! Please excuse my
poor documentation style; I really hate writing the docs :-) So read
everything, the answer's probably there, somewhere.



 þ General

This code is Written by Craig Hart in 1996-2005 and is under constant
development. It is released as freeware; please use and modify at will. No
guarantees are made or implied. Commercial use is also specifically permitted,
without restriction. It's free, use it!

I'd appreciate credit if you find this code useful. I'd also be interested to
see any code you may develop or modifications you create to this code...
suggestions & bug fixes are _always_ welcomed.

I can be reached by email: chart@datafast.net.au

See my home page for the latest version of all my software releases,
programmers information, updates for PCIDEVS.TXT and much more:

http://members.datafast.net.au/dft0802

******** NOTE: NEW WEBSITE & EMAIL !!! ****************************************


NOTE: Wherever you see the term PCI in this document, you can substitute AGP
and/or CardBus, if appropriate, instead. PCI is the "root technology" upon
which AGP and Cardbus are built, and share a common saet of basic design
standards. AGP is pretty much just a new physical and electrical form of the
PCI bus; CardBus is the 32-bit "version" of PCMCIA; software-wise, they're
virtually identical. This also covers all the 'other' PCI variants, such as
SmallPCI, PCI-X, PCI Express, etc.



  þ Why create this program, anyhow? What use is it? What does it do?

PCI basically produces a report of the PCI, AGP & CardBus devices fitted to a
PC, including the system chipset. A plethoria of information is reported on,
including system resource useage (IRQs, Memory ranges, etc), capabilities
(busmastering, caching), setup data (device latencies, general capabilities,
features, subsystem info), and much, much more. A text-file PCIDEVS.TXT lists
thousands of known vendors, devices and subsystems, which PCI will refer to and
display the info from. PCI covers all PCI device derivitives, including PCI
64-bit & 66MHz options, AGP (all speeds to 8x), CompactPCI, CardBus and PCI-X.

PCIDEVS.TXT is a plain text file, so you can update it yourself, however it is
updated regularly (virtually daily) by the author, and the latest revision is
always available as a free download from the webpage (see general section).

This program was originally written purely for me to learn how to program the
PCI BIOS found in newer PC's. Since then, this program has proven to be vastly
more useful, especially in the hands of a technician, system builder, and also
in the hands of those about to purchase or upgrade a PC.

To a technician or system builder, PCI can act as a system information and
diagnostic tool. It lists the resources devices have been assigned (for
example, IRQ's, Memory regions, etc) so it is handy for finding conflicts.
Because PCI also identifies the devices fitted, it is handy in figuring out
_exactly_ what drivers are required when setting up a system.

PC buyers don't need to open a PC to see exactly what they're getting: your
vendor can't tell you fibs about the chipset, graphic-card, or whatever, and
since the PC doesn't need to be opened to check what you ordered is what you
got fitted, you aren't loosing any warranties.

Second hand parts hoarders can figure out what they have, just by plugging it
in and running PCI - no more scratching your head over a mystery card you just
stumbled across amongst your latest piles of aquired junk. As above, finding
drivers becomes much easier when you can say *exactly* what brand model, and
revision of card you have.

To a programmer, PCI is a learning tool, since it's full source code is
supplied, and the dump configuration-space feature will help a programmer
discover how a driver alters the hardware to activate special features or
generally work with a given device.



  þ Using PCI

Just run it. Read the output. Be happy!

You must place PCI.EXE and PCIDEVS.TXT together in the same directory. You must
be "in" that directory before running PCI; in other words, do NOT run PCI from
a path. This is because PCI only looks in the CURRENT directory for it's data
file.

PCI (as of version 0.41á) will pause at the end of each screenfull to allow you
to read the report; press any key for the next page. Pausing is disabled if you
are using I/O redirection.

PCI's output can be redirected (using MS-DOS pipes), for example to a text file
on disk or a printer. IE "C:\>PCI > LOG.TXT" will generate a file on disk
called LOG.TXT  This is handy if you want to keep a perminant record of the
system under test, print it out, email it, or whatever.

PCI will be slow to generate it's report if run from a plain DOS computer from
a floppy disk drive (due to reading the rather large pcidevs.txt file). For
best speed run from within windows and/or from a hard disk drive. This is
because the data file is more than 250k in size and is therefore not cached in
memory. To improve speed under DOS a little, put buffers=20 in your config.sys
file and reboot.

PCI does not function under Windows 2000 or NT or XP. 3.x/95/98/ME work OK, as
does OS/2 Warp.  See the bugs and OS/2 sections for more info.



Syntax: PCI [/H] [/D] [/S] [/T] [/B] [/P] [/I] [/?]           ([] = optional)


Commandline parameters:

  /H   Use direct-hardware access to retrieve the information. Normally, the
system BIOS is called on to retrieve the information, however there are some
BIOS's circa 1995 (Award v4.51 on Intel 430FX Chipset, early PCI Compaq's using
the Triflex Bridge chip) that incorrectly report some information. By bypassing
the BIOS, we can get the correct information. This only works if the BIOS uses
configuration mechanism 1. Mechanism 2 systems can use the BIOS method only.
Mechanism 2 systems are virtually non-existant as version 2.1 of the PCI
specifications insists on the use of mechanism 1 only... the number of
mechanism 2 chipsets is very small, and are now more than 7 years old.

  /D   Dump the PCI configuration space for each device. This option generates
a 256 byte hex-dump of the PCI configuration space for each detected device.
This is handy for people trying to learn to program a device, for those looking
to discover any 'extra' undocumented registers in a device, observe the changes
made by setup or driver software, and also to fault-find this program :-)

  /S   Produce summary report only. Lists vendors, devices, subsystem ID's
and IRQ's only. Usefull for when you need a "quick glance" and don't want to
wade through mountains of technical info. Still displays subsystem and IRQ
info, as these are typically the most-used features of PCI.

 /T    Disble the BIOS IRQ Routing table tests. May be usefull if PCI crashes
during this test, or you don't want to clutter up a device report with this
'extra' info.

 /B    List Bus, Device and Function info for each device. The bus number
tells you which PCI bus the device resides on (look at the PCI bridges to see
which bus number is 'created' by which bridge). The Device number is the PCI
device identifier for that device on that bus (there can be 32 devices on each
bus, and device numbers are generally non-contiguous). The function number is
the internal sub-funtion of that PCI CHIP (many devices are single-function and
only have a valid function 0, whilst others are multi-function and contain
several sub-functions; each device may have as many as 8 sub-functions).

 /P    Read and display PCI IRQ-router information. The IRQ router is the
device that connects the PCI slots INTA-INTD lines to the sytem's 16 IRQ lines.

The first part of this option shows what IRQ's are *potentially* available for
the BIOS to connect each PCI slot. If you see Slot 00, it's an integrated
(built on the motherboard) device, not a physical slot. You can work out which
slot is which by using the /B command line parameter to display the Device &
Bus info for each card, and then match this info up by looking physically at
which card is in which slot.  Typically slots of the same bus are physically
laid out in numeric order, either left to right, or right to left; different
busses may be ordered differently to each other. Typically, all slots of a
given bus are physically next to each other rather than bieng randomly
distributed.

The second part of this option displays a table of slots and INTA-D link
values. To interpret this table, first note that a non-zero link value under
INTx means that that INTx pin on that PCI socket is wired to the IRQ router's
<number xx> input. A 00 means that INT line is not connected *at all*.

Let's look at a typical table:

   SLOT BUS DEV   INTA INTB INTC INTD
    01   0  17     01   02   03   05
    02   0  18     02   03   05   01
    03   0  19     03   05   01   02
    04   0  20     05   01   02   03
    00   0   1     01   02   03   05

What this table tells us is that Slot 01 and Slot 00 share the SAME link
values, whilst the other 3 sockets each have different link values (under each
INT line). How is this important? Each *link value* is mapped to a system IRQ,
(but only if the PCI card signals that it requires an IRQ).

If Slot 00 and slot 01 are both populated (with cards that request an IRQ on
the same INT line), they will both be assigned the SAME IRQ! similarly, if a
card using INTD in Slot 2 and a card using INTB in slot 4 both require IRQ's,
they will each be configured to the same...
Zgłoś jeśli naruszono regulamin