summaryrefslogtreecommitdiff
path: root/usr.sbin/pciconf
Commit message (Collapse)AuthorAgeFilesLines
* MFC 246367:John Baldwin2013-03-011-2/+0
| | | | | | | | Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers in /usr/include. Notes: svn path=/stable/8/; revision=247567
* MFC 240474:John Baldwin2013-02-272-4/+72
| | | | | | | | | | | - Denote PCI-e endpoints that support FLR. - Make parsing of PCI-e extended capabilities assume that future version numbers are backwards compatible. - Add new AER error descriptions. - Add descriptions for more PCI-e extended capabilities. Notes: svn path=/stable/8/; revision=247409
* MFC r242085:Jim Harris2012-11-011-0/+26
| | | | | | | | | | For PCI Express capability, if max link width is greater than zero, print the current and max link speed. Sponsored by: Intel Notes: svn path=/stable/8/; revision=242457
* Merge r240680 from head:Gavin Atkinson2012-10-252-33/+33
| | | | | | | | | | | | | | | | | | Align the PCI Express #defines with the style used for the PCI-X #defines. This has the advantage that it makes the names more compact, and also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g In this MFC, #defines have been added for the old names to assist merges and out-of-tree drivers. Notes: svn path=/stable/8/; revision=242081
* Merge the following from head:Gavin Atkinson2012-10-011-0/+1
| | | | | | | | | | | r240694 Add PCI subclass for NVM Express devices. r240699, r240739 Recognise NVM devices and pretty-print their name. Notes: svn path=/stable/8/; revision=241102
* Merge r240146 from head:Gavin Atkinson2012-09-161-1/+3
| | | | | | | | - If the PCIe "SLOT" flag is set, include this in the capability output - Fix printing of PCIe interrupt number, the shift was incorrect. Notes: svn path=/stable/8/; revision=240569
* MFC 228161,230774,230822,236415:John Baldwin2012-06-286-11/+254
| | | | | | | | | | Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER). Notes: svn path=/stable/8/; revision=237732
* MFC 209907,212326,212368,212749:John Baldwin2010-09-201-0/+99
| | | | | | | | | | | | | | | - Provide more defines for PCI-Express device ctrl. - Add register definitions related to extended capability IDs in PCI-express. I used PCIZ_* for ID constants (plain capability IDs use PCIY_*). - Add register definitions for the Advanced Error Reporting, Virtual Channels, and Device Serial Number extended capabilities. - Teach pciconf -c to list extended as well as plain capabilities for PCI-express devices. Adds more detailed parsing for AER, VC, and device serial numbers. Notes: svn path=/stable/8/; revision=212923
* MFC 212369:John Baldwin2010-09-201-6/+6
| | | | | | | | | - Use 'sta' to hold the PCIR_STATUS register value instead of 'cmd' when walking the capability list. - Use constants for PCI header types instead of magic numbers. Notes: svn path=/stable/8/; revision=212921
* MFC 212329:John Baldwin2010-09-201-7/+3
| | | | | | | | Simplify chkattached(). The PCIOCATTACHED ioctl only needs the pi_sel field populated, it ignores the rest of the 'pci_io' structure. Notes: svn path=/stable/8/; revision=212918
* - Add a few more register defintions for the PCI express capabilityJohn Baldwin2009-04-171-3/+26
| | | | | | | | | | | | | registers. - Cleanup PCI-X capability printf to not leave a dangling "supports" for some PCI-X bridges. - Display additional PCI express details including the negotiated and max link width and the actual and maximum supported max payload. MFC after: 1 month Notes: svn path=/head/; revision=191222
* Tune output to remove trailing space.Alexander Motin2009-02-151-3/+3
| | | | | | | Submitted by: Christoph Mallon Notes: svn path=/head/; revision=188641
* Add SATA and PCI Advanced Features capabilities reporting.Alexander Motin2009-02-151-0/+24
| | | | Notes: svn path=/head/; revision=188640
* - Add a new ioctl to /dev/pci to fetch details on an individual BAR of aJohn Baldwin2009-02-022-7/+96
| | | | | | | | | | | | | | | | | device. The details include the current value of the BAR (including all the flag bits and the current base address), its length, and whether or not it is enabled. Since this operation is not invasive, non-root users are allowed to use it (unlike manual config register access which requires root). The intention is that userland apps (such as Xorg) will use this interface rather than dangerously frobbing the BARs from userland to obtain this information. - Add a new sub-mode to the 'list' mode of pciconf. The -b flag when used with -l will now list all the active BARs for each device. MFC after: 1 month Notes: svn path=/head/; revision=188018
* Add ADMA, SATA and SAS mass storage subclasses.Alexander Motin2008-11-131-0/+3
| | | | Notes: svn path=/head/; revision=184936
* Add HDA multimedia subclass.Alexander Motin2008-10-211-0/+1
| | | | Notes: svn path=/head/; revision=184142
* Add "SD host controller" subclass name.Alexander Motin2008-10-211-0/+1
| | | | Notes: svn path=/head/; revision=184140
* style nit: indent continuation lines correctly, use style(9) styleWarner Losh2008-09-031-15/+16
| | | | | | | if() statement. Notes: svn path=/head/; revision=182708
* minor style(9) police: sort getopt options alphabetically. TheWarner Losh2008-09-031-9/+9
| | | | | | | | semi-logical segregation of 'b' and 'h' doesn't seem to make sense and makes it harder to read. Notes: svn path=/head/; revision=182707
* Include agpreg.h from it's new location.John Birrell2007-11-131-1/+1
| | | | Notes: svn path=/head/; revision=173576
* devinfo(8) manual page refers to pciconfr(8). Add back reference forDmitry Morozovsky2007-11-071-1/+2
| | | | | | | | | completeness. MFC After: 2 weeks Notes: svn path=/head/; revision=173415
* Update copyright attribution.John Baldwin2007-10-312-2/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=173228
* Missed in the previous commit to this file:John Baldwin2007-10-271-0/+3
| | | | | | | | | Actually support the new HT capability type from HT 2.00b. MFC after: 3 days Notes: svn path=/head/; revision=173059
* Make selector parsing accept the dot "." as an alternative selectorStefan Eßer2007-10-041-1/+1
| | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=172448
* Restore compatibility with version before introduction of PCI domains.Stefan Eßer2007-10-042-18/+22
| | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=172447
* Make the PCI code aware of PCI domains (aka PCI segments) so we canMarius Strobl2007-09-302-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=172394
* - HT 2.00b added a new flag to the MSI mapping HT capability to indicateJohn Baldwin2007-04-251-7/+12
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=169037
* - Bump document date.Ruslan Ermilov2007-02-061-3/+3
| | | | | | | | - Kill whitespace at EOL. - Add missing markup bit. Notes: svn path=/head/; revision=166528
* - Teach pciconf(8) to list the PCI capabilities supported by each deviceJohn Baldwin2007-02-025-46/+593
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=166435
* Use larger buffers to read lines from the vendor list.Dag-Erling Smørgrav2005-08-181-3/+16
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=149225
* Whitespace cleanup.Dag-Erling Smørgrav2005-08-181-13/+13
| | | | Notes: svn path=/head/; revision=149223
* add some additional pci classes and sub-classes..John-Mark Gurney2005-03-261-1/+25
| | | | | | | Reviewed by: imp (almost 6 months ago) Notes: svn path=/head/; revision=144156
* Revert unintended commit that came in with 3rd clause removalWarner Losh2004-08-071-67/+12
| | | | Notes: svn path=/head/; revision=133271
* Fix syntax error introduced in the last commit.Lukas Ertl2004-08-071-2/+2
| | | | | | | | Additionally, since this file is written in C and not in Perl, we need 'continue' instead of 'next'. Notes: svn path=/head/; revision=133268
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived softwareWarner Losh2004-08-071-12/+67
| | | | | | | (with permission of addtional copyright holders where appropriate) Notes: svn path=/head/; revision=133249
* Update pciconf man page to indicate that only some of the functionsRobert Watson2004-01-061-1/+2
| | | | | | | | | in pciconf are limited to the superuser. Requested by: ru Notes: svn path=/head/; revision=124192
* Only a read-only file descriptor is required to implement list_devs()Robert Watson2003-12-311-1/+1
| | | | | | | | | | | 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> Notes: svn path=/head/; revision=124031
* make pciconf understand it's own output as stated in the manpage.John-Mark Gurney2003-06-201-5/+13
| | | | | | | | | | | pciconf -r none8@pci1:12:2: 0x0 now works. PR: bin/10312 Submitted by: Castor Fu Notes: svn path=/head/; revision=116640
* Moved $FreeBSD$ tag to where it belongs.Ruslan Ermilov2003-05-221-1/+2
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=115223
* Fix up some grammar.Tom Rhodes2003-01-091-2/+2
| | | | | | | Noticed by: sheldonh Notes: svn path=/head/; revision=108987
* Markup fixes. Document more correctly.Tom Rhodes2002-12-141-8/+14
| | | | | | | | PR: 43678 Submitted by: ru Notes: svn path=/head/; revision=107871
* Use consistent terminology in the usage message, the man pageJohn Polstra2002-09-172-10/+10
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=103499
* mdoc(7) police: Removed redundant .Ns calls.Ruslan Ermilov2002-08-131-1/+1
| | | | Notes: svn path=/head/; revision=101828
* The .Nm utilityPhilippe Charnier2002-07-141-4/+4
| | | | Notes: svn path=/head/; revision=99968
* mdoc(7) police: make SYNOPSIS really match usage().Ruslan Ermilov2002-05-301-7/+3
| | | | Notes: svn path=/head/; revision=97562
* pciconf(8) has an incorrect synopsis which argues the output from theTom Rhodes2002-05-151-2/+2
| | | | | | | actual program. Notes: svn path=/head/; revision=96678
* When asked to print bytes (-b option) do that and put 16 on a line.Søren Schmidt2002-02-261-3/+4
| | | | Notes: svn path=/head/; revision=91299
* Add missing -v option to the SYNOPSIS.Sheldon Hearn2001-11-271-1/+1
| | | | Notes: svn path=/head/; revision=86966
* Spell "FreeBSD" with "F" and "BSD" in uppercase.Ruslan Ermilov2001-08-131-1/+1
| | | | Notes: svn path=/head/; revision=81588
* Perform a major cleanup of the usr.sbin Makefiles.David E. O'Brien2001-07-201-0/+1
| | | | | | | | 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. Notes: svn path=/head/; revision=80029