summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf
Commit message (Collapse)AuthorAgeFilesLines
* Add a new -B flag for use with list mode (-l) that lists details aboutjhb2015-11-232-13/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | bridges. Currently this includes information about what resources a bridge decodes on the upstream side for use by downstream devices including bus numbers, I/O port resources, and memory resources. Windows and bus ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges. To simplify the implementation, all enumeration is done by reading the appropriate config space registers directly rather than querying the bridge driver in the kernel via new ioctls. This does result in a few limitations. First, an unimplemented window in a PCI-PCI bridge cannot be accurately detected as accurate detection requires writing to the window base register. That is not safe for pciconf(8). Instead, this assumes that any window where both the base and limit read as all zeroes is unimplemented. Second, the PCI-PCI bridge driver in a tree has a few quirks for PCI-PCI bridges that use subtractive decoding but do not indicate that via the progif config register. The list of quirks is duplicated in pciconf's source. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4171
* Note if relaxed ordering or no snoop is enabled for each PCI-express device.jhb2015-11-051-0/+4
| | | | MFC after: 1 week
* Prefer pciids database from ports if presentbapt2015-09-063-4/+10
| | | | | | | | | Given the pciids database on ports is updated more often than the one in base prefer this version if present, otherwise read the one from base. MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3391
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-274-45/+118
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-3/+3
| |\
| * \ Merge head from 7/28sjg2014-08-191-0/+1
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge headsjg2014-04-283-33/+227
| |\ \ \
| * \ \ \ Merge from headsjg2013-09-051-20/+50
| |\ \ \ \
| * \ \ \ \ sync from headsjg2013-04-121-1/+1
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| * | | | | | Sync with HEAD.obrien2013-02-082-13/+15
| |\ \ \ \ \ \
| | \ \ \ \ \ \
| | \ \ \ \ \ \
| *-. \ \ \ \ \ \ Sync from headsjg2012-11-043-37/+134
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | Reassign copyright statements on several files from Advancedjhb2015-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week
* | | | | | | | | Teach pciconf how to dump out SR-IOV capabilityrstone2015-03-013-42/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D1639 Reviewed by: jhb MFC after: 1 month Sponsored by: Sandvine Inc.
* | | | | | | | | Fix the following clang 3.6.0 warnings in pciconf:dim2015-01-281-2/+2
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? p->pd_name : ~~~^~~~~~~ ~~ usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? (int)p->pd_unit : ~~~^~~~~~~ ~~ The pd_name field of struct pci_conf is an array, so it can never be null. Remove the unnecessary check.
* | | | | | | | Fix some buglets in the error-handling of getdevice(). In particular, reportmarkj2014-10-221-3/+3
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an error if the argument to pciconf -a doesn't have a unit number, rather than triggering an assertion failure. PR: 194506 Reported by: Anthony Cornehl <accornehl@gmail.com> Sponsored by: EMC / Isilon Storage Division
* | | | | | | Add IOMMU PCI subclass, found on Tyan S8236 motherboard.mav2014-05-201-0/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks
* | | | | | Print status of ARI capability in pciconf -crstone2014-04-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach pciconf how to print out the status (enabled/disabled) of the ARI capability on PCI Root Complexes and Downstream Ports. MFC after: 2 months Sponsored by: Sandvine Inc.
* | | | | | Add support for displaying VPD for PCI devices via pciconf.jhb2014-01-202-8/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Store the length of each read-only VPD value since not all values are guaranteed to be ASCII values (though most are). - Add a new pciio ioctl to fetch VPD for a single PCI device. The values are returned as a list of variable length records, one for the device name and each keyword. - Add a new -V flag to pciconf's list mode which displays VPD data for each device. MFC after: 1 week
* | | | | | - Allow PCI devices that are attached to a driver to be identified by theirjhb2014-01-202-29/+130
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device name instead of just the selector. - Accept an optional device argument to -l to restrict the output to only listing details about a single device. This is mostly useful in conjunction with other flags like -e or -c to allow a user to query details about a single device. MFC after: 1 week
* | | | | Decode PCIe ASPM capability and status.jkim2013-07-181-20/+38
| | | | |
* | | | | Decode new HT 3.00 and 3.10 capabilities.kib2013-05-171-0/+12
| |_|_|/ |/| | | | | | | | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week
* | | | Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.neel2013-02-101-1/+1
| |_|/ |/| | | | | | | | This allows bar sizes greater than or equal to 4GB to be displayed correctly.
* | | Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headersjhb2013-02-051-2/+0
| | | | | | | | | | | | | | | | | | in /usr/include. MFC after: 2 weeks
* | | Display MSI-X table and PBA offsets when displaying information about MSI-Xneel2013-02-011-11/+15
| |/ |/| | | | | | | | | capability. Reviewed by: jhb, jimharris (initial version)
* | For PCI Express capability, if max link width is greater than zero, printjimharris2012-10-251-0/+26
| | | | | | | | | | | | | | | | the current and max link speed. Sponsored by: Intel Discussed with: jhb MFC after: 1 week
* | Indent ecaps the same way we indent caps.imp2012-10-191-1/+1
| | | | | | | | MFC after: 3 days
* | The correct generic term for PCIS_STORAGE_NVM is "NVM" not "NVM Express".gavin2012-09-201-1/+1
| | | | | | | | | | Submitted by: jimharris MFC after: 6 days
* | Recognise NVM Express devices and pretty-print their name.gavin2012-09-191-0/+1
| | | | | | | | MFC after: 1 week
* | Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-182-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #defines. This also has the advantage that it makes the names more compact, iand 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 When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers. Discussed with: jhb MFC after: 1 week
* | - Denote PCI-e endpoints that support FLR.jhb2012-09-132-4/+72
| | | | | | | | | | | | | | | | | | - 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. MFC after: 1 week
* | - If the PCIe "SLOT" flag is set, include this in the capability outputgavin2012-09-051-1/+3
|/ | | | | | - Fix printing of PCIe interrupt number, the shift was incorrect. MFC after: 1 week
* Add a new -e flag to pciconf(8)'s list mode to display PCI error details.jhb2012-06-016-11/+254
| | | | | | | | 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). MFC after: 1 week
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-1/+1
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Spelling fixes for usr.sbin/uqs2011-12-301-2/+2
|
* Only attempt to list extended capabilities for devices that have ajhb2010-09-161-1/+5
| | | | | | | | | PCI-express capabilities. Non-PCI-express PCI devices may simply ignore the upper bits in a config register address effectively aliasing the device ID register to 0x100 rather than returning 0xFFFFFFFF. Previously the code relied on these reads returning 0xFFFFFFFF. MFC after: 3 days
* Document the format of extended capabilities in the '-c' output.jhb2010-09-091-1/+13
|
* - Use 'sta' to hold the PCIR_STATUS register value instead of 'cmd' whenjhb2010-09-091-6/+6
| | | | | | | walking the capability list. - Use constants for PCI header types instead of magic numbers. MFC after: 1 week
* Simplify chkattached(). The PCIOCATTACHED ioctl only needs the pi_seljhb2010-09-081-7/+3
| | | | | | field populated, it ignores the rest of the 'pci_sel' structure. MFC after: 1 week
* - Add register definitions related to extended capability IDs injhb2010-09-081-0/+95
| | | | | | | | | | | 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. Adds more detailed parsing for AER, VC, and device serial numbers. MFC after: 2 weeks
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-1/+1
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-021-0/+2
|
* - Add a few more register defintions for the PCI express capabilityjhb2009-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
* Tune output to remove trailing space.mav2009-02-151-3/+3
| | | | Submitted by: Christoph Mallon
OpenPOWER on IntegriCloud