summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'jphaws/cxl-dvsec-decoded'Martin Mares2022-11-183-5/+560
|\ \
| * | lspci: Add test case for CXL deviceJaxon Haws2022-11-161-0/+258
| | | | | | | | | | | | | | | | | | Add requested config space dump of CXL device for testing Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | lspci: Add support for Non-CXL Function Map DVSECJaxon Haws2022-11-162-1/+41
| | | | | | | | | | | | | | | | | | | | | Add Non-CXL Function Map DVSEC Registers 0-7 decoding according to DVSEC Revision ID 0. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | lspci: Add support for CXL MLD DVSECJaxon Haws2022-11-162-1/+18
| | | | | | | | | | | | | | | | | | | | | Add MLD DVSEC decoding for CXL device accoring to DVSEC revision ID 0. Decode Number of Logical Devices Supported. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | lspci: Add support for CXL GPF Port DVSECJaxon Haws2022-11-162-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | Add Global Persistent Flush DVSEC decoding for CXL port according to DVSEC Revision ID 0. Decode GPF Phase 1 Control and GPF Phase 2 Control. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | lspci: Add support for CXL Flex Bus DVSECJaxon Haws2022-11-162-1/+106
| | | | | | | | | | | | | | | | | | | | | Add DVSEC Flex Bus Port for CXL devices according to DVSEC Revision ID 1, capability decoding, control decoding, and status decoding. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | lspci: Add support for CXL GPF Device DVSECJaxon Haws2022-11-022-1/+56
| |/ | | | | | | | | | | | | | | Add Global Persistent Flush DVSEC decoding for CXL device according to DVSEC Revision ID 0. Decode GPF Phase 2 Duration and GPF Phase 2 Power. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
* | Merge remote-tracking branch 'pali/i386-io-windows'Martin Mares2022-11-131-1/+2
|\ \
| * | libpci: i386-io-windows.h: Improve ProcessUserModeIOPL error messagePali Rohár2022-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Show error message from intel_setup_io() function into debug area instead of error area. This is what other backends do as intel_setup_io() is called during quite detect phase, which may fail. Also show human readable failure instead of magic code number.
* | | Merge remote-tracking branch 'pali/linux-ioperm'Martin Mares2022-11-131-2/+46
|\ \ \
| * | | i386-io-linux: Prefer usage of ioperm()Pali Rohár2022-11-061-2/+46
| | |/ | |/| | | | | | | | | | | | | | | | Since Linux 2.6.8, it is possible to use ioperm() syscall to gain access for all I/O ports. Because iopl() syscall before Linux 5.5 allowed userspace to disable interrupts, prefer usage of ioperm() syscall and ask for access only for PCI ports.
* | | Merge remote-tracking branch 'pali/win32-cfgmgr32'Martin Mares2022-11-131-4/+14
|\ \ \
| * | | libpci: win32-cfgmgr32: Fix typoPali Rohár2022-11-061-1/+1
| | | |
| * | | libpci: win32-cfgmgr32: Fix parsing paths in NT formatPali Rohár2022-11-061-3/+13
| |/ / | | | | | | | | | NT namespace separator may be single or double backslash.
* | | Merge remote-tracking branch 'pali/i386-ports'Martin Mares2022-11-131-8/+12
|\ \ \
| * | | i386-ports: Fix intel_io_lock usagePali Rohár2022-11-061-8/+12
| |/ / | | | | | | | | | | | | | | | Do not call pci_generic_block_read() and pci_generic_block_write() functions when io is locked. These functions call back same backend read/write function which tries to lock and unlock io again.
* | | windows: Codepage in resource file is 16-bit numberPali Rohár2022-11-091-1/+1
| | |
* | | windows: Put name and version information into lspci/setpci executablesPali Rohár2022-11-053-6/+27
|/ / | | | | | | | | Extend existing .in resource template file and generate resource objects also for lspci.exe and setpci.exe executables.
* | cxl: Fix Register Locator DVSEC decodingJaxon Haws2022-10-312-9/+4
|/ | | | | | | | Fix decoding of register blocks by introducing offset to position calculation (8.1.9 of CXL 3.0 spec) and removed unused defines for Register Locator DVSEC. Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
* Merge remote-tracking branch 'pali/win32-dll'Martin Mares2022-10-308-28/+200
|\
| * libpci: Put name and version information into DLL libraryPali Rohár2022-10-303-1/+46
| | | | | | | | | | | | | | | | | | Generate rc file from in template and fill DLL name and DLL version from Makefile. It looks like that the only possible way via GNU tools to specify version information for DLL library is via text rc file compiled as COFF object file via GNU windres and linked into the final DLL library via GNU ld.
| * libpci: Do not call unversioned symbols from libpci itselfPali Rohár2022-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Windows version of GNU LD has bugs which cause that linker would translate this unknown unversioned symbols to some random version. So change pci_fill_info() to pci_fill_info_v38() in lib/filter.c to ensure that last version of this function would be used also by Windows version of GNU LD linker. Before this change GNU LD translated this function call to symbol _pci_fill_info@LIBPCI_3.0. After this change GNU LD translate it to _pci_fill_info@LIBPCI_3.8.
| * libpci: Add support for building versioned shared Windows DLL library ↵Pali Rohár2022-10-306-4/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libpci3.dll PE/COFF format, used by DLL libraries, does not support version symbols like ELF format. Recommendation from Microsoft for DLL symbol versioning is to use DLL API sets. But DLL API sets scheme requires for every API change to generated a new slim forwarding DLL library, which is unsuitable for distribution which wants just one DLL library with all version symbols. So instead of Microsoft recommended scheme for DLL versioning, use new different versioning scheme: Symbol is composed by function name, at (@) character and version string (version is same as for ELF targets). Symbol name without version information is added only into the DLL DEF file as alias to symbol with higest version. So linker at application link time resolves "unversioned" symbol to the versioned one via this alias and puts "versioned" symbol into final executable. This works fine if GNU LD is linking application via import library libpci3.dll.a generated from that DLL DEF file libpci3.def. But does not work when linking directly to the DLL library because library itself does not contain aliases. Note that GNU LD does not support linking to DEF file (it is required to first generated import library from DEF file). Note that older GNU LD versions have bug which cause generation of corrupted DLL files if some symbol contains dot (.) character. Hopefully this bug was fixed in GNU LD 2.21. At the end application lspci.exe requires library libpci3.dll with symbols pci_alloc@LIBPCI_3.0, pci_init@LIBPCI_3.5, pci_fill_info@LIBPCI_3.8 and therefore libpci3.dll stays backward compatible with future changes. PE/COFF executables can reference symbols either via name or via its ordinal number. Because DLL DEF files are generated from libpci version script and generator ver2def.pl preserves order of symbols, it means that ordinal numbers stay backward compatible unless order of lines in version script is changed. WARNINGS: GCC an GNU LD for Windows target have some bugs which cause that -fvisibility=hidden switch and __attribute__((visibility("default"))) does not work. Seems that they are broken and ignored when building DLL library. So instead use -Wl,--exclude-all-symbols switch with explicit DLL DEF file for building DLL library, which seems to work. This switch is supported since GNU LD 2.21. GNU LD has also another bug which results in broken DLL library if input DLL DEF file which describes symbols for exports, contains also symbol aliases via == operator. So do not specify symbol aliases in input DLL DEF file for building DLL library. Instead construct separate DLL DEF file for building libpci3.dll without symbol aliases and separate DLL DEF file libpci3.def with symbol aliases for building import library libpci3.dll.a suitable for linking into target applications. Note that operator == for symbol aliases is supported since GNU dlltool 2.21. Generate those two DLL DEF files via new script ver2def.pl from libpci.ver version script. So exported functions and version symbols would be defined only at one place in file libpci.ver. Note that GNU LD for Windows targets has also broken support for version scripts, it exports nonsense data and completely ignores version information. So always use only DLL DEF files generated by ver2def.pl script and never pass original version script to GNU LD. Due to another bugs in GNU dlltool, ordinals for aliased symbols from DLL DEF file are calculated incorrectly when building import library. So calculate ordinals manually in ver2def.pl script and explicitly put then into generated libpci3.def DLL DEF file for every symbol, including aliases. And because aliases are stored only in libpci3.def file (and in import library libpci3.dll.a generated from that DEF file) and not in DLL library libpci3.dll itself, it is required to link all libpci applications via import library and not directly to libpci3.dll. This is limitation of PE/COFF format used by DLL libraries. So for building Windows DLL library libpci3.dll is needed to use GNU binutils 2.21 or new.
| * Makefile: Split variable for output shared library and import linking libraryPali Rohár2022-06-102-5/+13
| | | | | | | | | | | | | | | | Use new variable $(PCIIMPLIB) for storing name of the libpci import library for linking with shared library $(PCILIB). This would allow compilation of lspci and setpci applications on systems where linking needs to be done with import library.
| * Makefile: Define ABI_VERSION variable without leading dotPali Rohár2022-06-101-9/+9
| | | | | | | | | | This would simplify usage of ABI_VERSION variable for platforms which do not use leading dot in file names.
| * Makefile: Unify building of shared libpci libraryPali Rohár2022-06-102-7/+6
| | | | | | | | | | Move Darwin and Linux/ELF platform link switches to new PCILIB_LDFLAGS variable.
| * Makefile: Fix usage of empty IDSDIRPali Rohár2022-06-101-1/+9
| | | | | | | | | | When IDSDIR is empty then current lspci/setpci directory is assumed. So install PCI_IDS into SBINDIR in this case.
| * Makefile: Remove duplicate slash for $(DESTDIR) install targetPali Rohár2022-06-101-1/+1
| |
* | Merge remote-tracking branch 'pali/win32-readeflags'Martin Mares2022-10-301-6/+3
|\ \
| * | libpci: i386-io-windows.h: Do not define __readeflags() for GCC 4.9+Pali Rohár2022-06-201-6/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC header file <x86intrin.h> defines static inline function __readeflags() which calls correct __builtin_ia32_readeflags_XX() builtin. Header file <x86intrin.h> is included by MinGW-w64's <intrin.h> header file in new versions of MinGW-w64 and <intrin.h> may be included transitionally by some other header files automatically. Defining __readeflags() as both macro and static inline function cause compile errors. Fix this compile error by not defining __readeflags() macro and instead include GCC header file <x86intrin.h>.
* | Merge remote-tracking branch 'pali/setpci-register-checks'Martin Mares2022-10-301-124/+137
|\ \
| * | setpci: Check if standard register on device existPali Rohár2022-10-301-125/+137
| | | | | | | | | | | | | | | | | | | | | Some standard registers are available only on device with header type 0, some only on header type 1, some other only on header type 2 and some on header type 0 and 1. Add definitions which registers are available on which header type and add check to access only available registers.
| * | setpci: Define CAPABILITIES registerPali Rohár2022-06-141-0/+1
| |/
* | Merge remote-tracking branch 'thesamesam/which-hunt'Martin Mares2022-10-301-2/+2
|\ \
| * | lib/configure: respect $PKG_CONFIG completelySam James2022-06-191-1/+1
| | | | | | | | | | | | Signed-off-by: Sam James <sam@gentoo.org>
| * | lib/configure: drop usage of whichSam James2022-06-191-2/+2
| |/ | | | | | | | | | | | | | | | | | | 'which' is not required by POSIX and is an external command which may not be available, and 'command -v' does the job just fine. Debian and Gentoo at least are both making efforts to drop which from their base system package list. Signed-off-by: Sam James <sam@gentoo.org>
* | Merge remote-tracking branch 'pali/win32-sysdbg'Martin Mares2022-10-307-2/+326
|\ \
| * | pcilib.man: Include information about win32-sysdbgPali Rohár2022-04-181-0/+7
| | |
| * | libpci: Add new windows NT sysdbg implementationPali Rohár2022-04-186-2/+319
| |/ | | | | | | | | | | | | | | | | NT SysDbg interface allow access to the PCI config space. Only devices on the first domain are available and only first 256 bytes of the PCI config space can be accessed. Compared to intel-conf1 access, this API is race free as NT kernel serialize access to PCI I/O ports. This NT SysDbg API is used by the !pci command of 32-bit WinDbg kernel debugger for displaying PCI config space. Debug privilege is required to use this NT interface.
* | lspci: Fix Virtual Channel VC# Caps: MaxTimeSlotsMikhail Bratchikov2022-10-301-1/+1
| |
* | lib: Fix PCI_L1PM_SUBSTAT_CAP_L1PM_SUPPMikhail Bratchikov2022-10-301-1/+1
| |
* | lib: Fix PCI_HT_SEC_CMD_DNMikhail Bratchikov2022-10-301-1/+1
| |
* | Merge remote-tracking branch 'sthibaul/master'Martin Mares2022-10-301-8/+20
|\ \
| * | hurd: fix filling informationSamuel Thibault2022-08-191-8/+20
| | | | | | | | | | | | | | | The hurdish methods only implement the region and base information, the rest should be taken from the generic method.
* | | CXL: Code clean-upMartin Mares2022-10-301-71/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We now pass capability length and revision to functions instead of reading them from config space again and again. - Centralize fetching of the capability. - Add checks for overrunning capability length. - Avoid out-of-bounds reads from the array of register names. - Sort capability list by ID.
* | | Merge remote-tracking branch 'jphaws/cxl'Martin Mares2022-10-302-35/+252
|\ \ \
| * | | cxl: Add placeholder for undecoded DVSECsBen Widawsky2022-10-131-0/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | | cxl: Add DVSEC Register LocatorBen Widawsky2022-10-132-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Co-authored-by: Jaxon Haws <jaxon.haws@amd.com> Signed-off-by: Jaxon Haws <jaxon.haws@amd.com>
| * | | cxl: Add support for DVSEC port capBen Widawsky2022-10-132-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Co-authored-by: Jaxon Haws <jaxon.haws@amd.com> Signed-off-by: Jaxon Haws <jaxon.haws@amd.com> --- Add Viral Enable (Jonathan) Add missing tab (Jonathan) Add Alt Mem base/limit (Jonathan)
| * | | cxl: Implement more device DVSEC decodingBen Widawsky2022-09-302-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Co-authored-by: Jaxon Haws <jaxon.haws@amd.com> Signed-off-by: Jaxon Haws <jaxon.haws@amd.com> --- Fix ranges (Pali): https://github.com/pciutils/pciutils/pull/59#discussion_r806335631