summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf
Commit message (Collapse)AuthorAgeFilesLines
* MFC r307731: Add names for some DASP devices.mav2016-10-281-0/+3
|
* MFC 291225:jhb2016-01-182-13/+241
| | | | | | | | | | | | | | | | | | | | | | | | Add a new -B flag for use with list mode (-l) that lists details about 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.
* MFC 290412:jhb2015-11-131-0/+4
| | | | Note if relaxed ordering or no snoop is enabled for each PCI-express device.
* MFC: r287522bapt2015-09-133-4/+10
| | | | | | | | | | Prefer pciids database from ports if present 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. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3391
* MFC 281887:jhb2015-06-021-1/+1
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC r264007,r264008,r264009,r264011,r264012,r264013rstone2015-03-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC support for PCI Alternate RID Interpretation. ARI is an optional PCIe feature that allows PCI devices to present up to 256 functions on a bus. This is effectively a prerequisite for PCI SR-IOV support. r264007: Add a method to get the PCI RID for a device. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264008: Re-implement the DMAR I/O MMU code in terms of PCI RIDs Under the hood the VT-d spec is really implemented in terms of PCI RIDs instead of bus/slot/function, even though the spec makes pains to convert back to bus/slot/function in examples. However working with bus/slot/function is not correct when PCI ARI is in use, so convert to using RIDs in most cases. bus/slot/function will only be used when reporting errors to a user. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264009: Re-write bhyve's I/O MMU handling in terms of PCI RID. Reviewed by: neel MFC after: 2 months Sponsored by: Sandvine Inc. r264011: Add support for PCIe ARI PCIe Alternate RID Interpretation (ARI) is an optional feature that allows devices to have up to 256 different functions. It is implemented by always setting the PCI slot number to 0 and re-purposing the 5 bits used to encode the slot number to instead contain the function number. Combined with the original 3 bits allocated for the function number, this allows for 256 functions. This is enabled by default, but it's expected to be a no-op on currently supported hardware. It's a prerequisite for supporting PCI SR-IOV, and I want the ARI support to go in early to help shake out any bugs in it. ARI can be disabled by setting the tunable hw.pci.enable_ari=0. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264012: Print status of ARI capability in pciconf -c 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. r264013: Add missing copyright date. MFC after: 2 months
* MFC r273488:markj2014-12-031-3/+3
| | | | | | Fix some bugs in the error handling of getdevice(). PR: 194506
* MFC r266468:mav2014-06-031-0/+1
| | | | | | Add IOMMU PCI subclass, found on Tyan S8236 motherboard. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC 260926:jhb2014-02-172-8/+95
| | | | | | | | | | | Add support for displaying VPD for PCI devices via pciconf. - 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 260910:jhb2014-01-282-29/+130
| | | | | | | | | - Allow PCI devices that are attached to a driver to be identified by their 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.
* 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
* Add SATA and PCI Advanced Features capabilities reporting.mav2009-02-151-0/+24
|
* - Add a new ioctl to /dev/pci to fetch details on an individual BAR of ajhb2009-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
* Add ADMA, SATA and SAS mass storage subclasses.mav2008-11-131-0/+3
|
* Add HDA multimedia subclass.mav2008-10-211-0/+1
|
* Add "SD host controller" subclass name.mav2008-10-211-0/+1
|
* style nit: indent continuation lines correctly, use style(9) styleimp2008-09-031-15/+16
| | | | if() statement.
* minor style(9) police: sort getopt options alphabetically. Theimp2008-09-031-9/+9
| | | | | semi-logical segregation of 'b' and 'h' doesn't seem to make sense and makes it harder to read.
* Include agpreg.h from it's new location.jb2007-11-131-1/+1
|
* devinfo(8) manual page refers to pciconfr(8). Add back reference formarck2007-11-071-1/+2
| | | | | | completeness. MFC After: 2 weeks
* Update copyright attribution.jhb2007-10-312-2/+4
| | | | MFC after: 3 days
* Missed in the previous commit to this file:jhb2007-10-271-0/+3
| | | | | | Actually support the new HT capability type from HT 2.00b. MFC after: 3 days
* Make selector parsing accept the dot "." as an alternative selectorse2007-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)
* Restore compatibility with version before introduction of PCI domains.se2007-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)
* Make the PCI code aware of PCI domains (aka PCI segments) so we canmarius2007-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)
* - HT 2.00b added a new flag to the MSI mapping HT capability to indicatejhb2007-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
* - Bump document date.ru2007-02-061-3/+3
| | | | | - Kill whitespace at EOL. - Add missing markup bit.
OpenPOWER on IntegriCloud