297500 |
02-Apr-2016 |
jhb |
Various updates to the PCI-express capability output.
- Group the output so that it follows the capability register set more closely. The first line now contains device information and the second line contains link information. As a result, ARI status is now output on the first line, and the link width is moved down to the second line of link information. - Only read the DEVICE_CAP2 register to check for ARI if the capability version is >= 2. - Don't output any link information if the link capability and status registers are zero. - Label the MSI interrupt index value as "MSI" instead of "IRQ".
|
291225 |
23-Nov-2015 |
jhb |
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.
Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4171
|
277856 |
28-Jan-2015 |
dim |
Fix the following clang 3.6.0 warnings in pciconf:
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.
|
273488 |
22-Oct-2014 |
markj |
Fix some buglets in the error-handling of getdevice(). In particular, report 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
|
240680 |
18-Sep-2012 |
gavin |
Align the PCI Express #defines with the style used for the PCI-X #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
|
212326 |
08-Sep-2010 |
jhb |
- 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. Adds more detailed parsing for AER, VC, and device serial numbers.
MFC after: 2 weeks
|
188018 |
02-Feb-2009 |
jhb |
- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a 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
|
172448 |
04-Oct-2007 |
se |
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)
|
172447 |
04-Oct-2007 |
se |
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)
|
172394 |
30-Sep-2007 |
marius |
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)
|
166435 |
02-Feb-2007 |
jhb |
- 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
|
54322 |
08-Dec-1999 |
ken |
[ 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
|
41103 |
12-Nov-1998 |
ken |
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.
|