Commit Graph

62 Commits

Author SHA1 Message Date
John Birrell
305274cee8 Include agpreg.h from it's new location. 2007-11-13 01:30:40 +00:00
Dmitry Morozovsky
6429fb5015 devinfo(8) manual page refers to pciconfr(8). Add back reference for
completeness.

MFC After:	2 weeks
2007-11-07 12:55:51 +00:00
John Baldwin
cbf964029b Update copyright attribution.
MFC after:	3 days
2007-10-31 16:14:30 +00:00
John Baldwin
4d6c5bef39 Missed in the previous commit to this file:
Actually support the new HT capability type from HT 2.00b.

MFC after:	3 days
2007-10-27 13:16:25 +00:00
Stefan Eßer
8818afb711 Make selector parsing accept the dot "." as an alternative selector
with identical meaning as the colon ":". This is to support a syntax
that is more similar to a PCI device specification in the device hints
file. The selector is not fully compatible with the specification in
the hints file, since entries in that file use a different prefix,
which needs to be added to the getsel() routine, if full support of
that syntax is found to be desirable.

Approved by:	re (Ken Smith)
2007-10-04 22:27:08 +00:00
Stefan Eßer
d23a84a0a8 Restore compatibility with version before introduction of PCI domains.
PCI selectors with 2 or 3 elements behave exactly as before (i.e. the
domain is 0 and in the 2 element case, the function is also 0).
The form with 4 selector elements works as in the previous revision
and provides the PCI domain number as the left-most selector element.

This change allows old scripts (which used the 2 or 3 selector element
formats) to be kept. Without this patch, the 3 element form was parsed
as starting with a domain number (and the function was assumed to be 0),
with this patch, the domain is assumed to be 0 (and the last value is
used as the function number).

The man page is updated to describe the new selector semantics.

Approved by:	re (Ken Smith)
2007-10-04 22:18:53 +00:00
Marius Strobl
55aaf894e8 Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by:	jhb
Reviewed by:	grehan, jhb, marcel
Approved by:	re (kensmith), jhb (PCI maintainer hat)
2007-09-30 11:05:18 +00:00
John Baldwin
d68b1825b7 - HT 2.00b added a new flag to the MSI mapping HT capability to indicate
that the MSI mapping window is fixed at 0xfee00000 and the capability
  does not include two more dwords used to program the address.  Supporting
  this mostly results in quieting spurious warnings during boot about
  non-default MSI mapping windows.
- HT 2.00b also added a new HT capability type, so support that in pciconf.

MFC after:	3 days
Tested by:	jmg
2007-04-25 14:45:46 +00:00
Ruslan Ermilov
6a290a48ca - Bump document date.
- Kill whitespace at EOL.
- Add missing markup bit.
2007-02-06 08:46:20 +00:00
John Baldwin
8866f04eb1 - Teach pciconf(8) to list the PCI capabilities supported by each device
via a new -c flag to be used with -l.  Some simple parsing code is
  present for the following capabilities: Power Management, AGP, VPD,
  MSI, PCI-X, HyperTransport, Vendor-specific, EHCI Debug Port, PCI-PCI
  bridge subvendor ID, PCI-express, and MSI-X.
- Fix a few warnings in pciconf.c.
- Update some cruft in pciconf(8):
  - PCI 2.1 is no longer a revolutionary standard, and subvendor ID's are
    fairly common at this point, so reflect that.
  - Header type 2 is used for PCI-CardBus bridges.
  - Describe the -v option for -l after completing the basic -l description
    instead of disrupting the flow in the middle.

Reviewed by:	imp (partially)
MFC after:	1 week
2007-02-02 19:54:17 +00:00
Dag-Erling Smørgrav
7df76a1312 Use larger buffers to read lines from the vendor list.
Trim trailing whitespace and comments before parsing, and skip empty lines.
Skip subvendor / subdevice entries (which start with two tab characters).
Change the scanf() format string to match any amount and type of whitespace
between the device ID and the description text.

MFC after:	3 weeks
2005-08-18 11:11:40 +00:00
Dag-Erling Smørgrav
5eaf9703df Whitespace cleanup. 2005-08-18 11:04:49 +00:00
John-Mark Gurney
4ea3b0e7e2 add some additional pci classes and sub-classes..
Reviewed by:	imp (almost 6 months ago)
2005-03-26 20:31:09 +00:00
Warner Losh
7694a98213 Revert unintended commit that came in with 3rd clause removal 2004-08-07 16:36:46 +00:00
Lukas Ertl
ea39d07d2a Fix syntax error introduced in the last commit.
Additionally, since this file is written in C and not in Perl,
we need 'continue' instead of 'next'.
2004-08-07 14:37:49 +00:00
Warner Losh
486c8cc4c6 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)
2004-08-07 04:28:56 +00:00
Robert Watson
9abf1c6ab8 Update pciconf man page to indicate that only some of the functions
in pciconf are limited to the superuser.

Requested by:	ru
2004-01-06 20:23:20 +00:00
Robert Watson
6c72866dff Only a read-only file descriptor is required to implement list_devs()
and list_verbose(), so don't open /dev/pci read-write.  This allows
pciconf -l[v] to work for non-root users, assuming the securelevel is
0 or -1.

Problem experienced by:	William Michael Grim <wgrim@siue.edu>
2003-12-31 19:38:29 +00:00
John-Mark Gurney
e07efa8aa5 make pciconf understand it's own output as stated in the manpage.
pciconf -r none8@pci1:12:2: 0x0
now works.

PR:		bin/10312
Submitted by:	Castor Fu
2003-06-20 23:59:25 +00:00
Ruslan Ermilov
b4ad5e27f4 Moved $FreeBSD$ tag to where it belongs.
Approved by:	re (blanket)
2003-05-22 11:55:26 +00:00
Tom Rhodes
50c4e962b4 Fix up some grammar.
Noticed by:	sheldonh
2003-01-09 04:35:38 +00:00
Tom Rhodes
e776060494 Markup fixes. Document more correctly.
PR:		43678
Submitted by:	ru
2002-12-14 18:07:13 +00:00
John Polstra
3915eeb59d Use consistent terminology in the usage message, the man page
synopsis, and the man page description ("selector" vs. "sel" and
"addr" vs. "reg").

Fix the usage message and man page synopsis to show that the "value"
argument is not optional.
2002-09-17 18:10:39 +00:00
Ruslan Ermilov
a654c53e16 mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Ruslan Ermilov
893ca9faea mdoc(7) police: make SYNOPSIS really match usage(). 2002-05-30 08:20:35 +00:00
Tom Rhodes
89408e839c pciconf(8) has an incorrect synopsis which argues the output from the
actual program.
2002-05-15 17:47:58 +00:00
Søren Schmidt
ca8ad94279 When asked to print bytes (-b option) do that and put 16 on a line. 2002-02-26 10:40:42 +00:00
Sheldon Hearn
393daa317e Add missing -v option to the SYNOPSIS. 2001-11-27 12:57:45 +00:00
Ruslan Ermilov
c5e7e03a14 Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Warner Losh
8d0421472a Support a range of registers to read.
eg	pciconf -r pci0:10:0 0:0xff
and keep the output of the old singleton the same.

Reviewed by: audit@, dd

MFC after: 10 days
2001-05-31 18:31:43 +00:00
Warner Losh
107054204b Minor style(9) tweak: if ( instead of if(. 2001-05-31 05:57:49 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Mike Smith
595b174add Update for new location of pcireg.h. 2000-12-09 00:07:46 +00:00
Mike Smith
a54bc9d028 Update to improve handling of verbose PCI vendor/device information.
- Read the database from /usr/share/misc (or wherever else we're pointed)
   rather than compiling it in.
 - Decode the class/subclass fields if requested.
 - Print things in a slightly longer but more readable format.
2000-12-07 10:52:59 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Mike Smith
d8134896e9 Add support for decoding the PCI vendor and device ID registers. Add a
database of about 1400 vendors and 2700 devices courtesy of
www.yourvote.com/pci.  We still need to add some more, but this is a good
start.
2000-11-13 12:08:29 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Kenneth D. Merry
64ae346b52 [ repository copy of sys/pci/pci_ioctl.h to sys/sys/pciio.h happened in the
background ]

Rename sys/pci/pci_ioctl.h to sys/sys/pciio.h to make it easier for
userland programs to use this interface.  Reformat the file, and add a
BSD-style copyright to it.

Add a new man page for pci(4).  The PCIOCGETCONF, PCIOCREAD, and PCIOCWRITE
ioctls are documented, but the PCIOCATTACHED ioctl is not documented
because it is not implemented.

Change includes of <pci/pci_ioctl.h> to <sys/pciio.h> or remove them
altogether.  In many cases, pci_ioctl.h was unused.

Reviewed by:	steve
1999-12-08 17:44:04 +00:00
Philippe Charnier
541c4ca06d .Fn -> .Xr
Do not start warn() message with uppercase.
1999-11-27 16:59:06 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Peter Wemm
7ccb2b3494 Fix a few problems on the Alpha, and fix -Wall while here.
Before:
isab0@pci0:8:0: class=0x060100 card=0x00000000 chip=0xffffffffc6931080 ...
After:
isab0@pci0:8:0: class=0x060100 card=0x00000000 chip=0xc6931080 ...
1999-08-23 12:59:03 +00:00
Guy Helmer
589228bd6a Replace LKM with KLD.
Submitted by:	Nathan Ahlstrom <nrahlstr@winternet.com>
1999-04-06 14:04:37 +00:00
Kenneth D. Merry
7f054c59a5 Modify pciconf(8) so that it will print out PCI devices that have no driver
configured in the kernel.  It gives them a device name of "none" and
monotonically incrementing unit numbers.  (starting at 0)  Before, pciconf
would just skip over unconfigured devices.  (unconfigured devices can be
detected because they have a null string for a device name)

Update the man page to reflect the new pciconf output.  Unfortunately, this
causes the sample 'pciconf -l' output lines to wrap, but I'm not sure what
to do about that really.

If anyone presents a reasonable case for printing out something other than
"none1" for unconfigured devices, I'm willing to listen.
1998-11-12 00:22:30 +00:00
Justin T. Gibbs
06915ea69a Revive PCIConf.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:21:13 +00:00