summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix stripping in cross-compiling modeHEADmasterMartin Mares2023-05-011-2/+2
| | | | Fixes 3d7466ef8545d37a4666e185a9f5d65ceb9c8af4.
* Released as v3.10.0.v3.10.0Martin Mares2023-05-013-4/+32
|
* Merge remote-tracking branch 'pali/ls-tree-multidomain'Martin Mares2023-05-013-18/+1606
|\
| * Add test case with multidomain Freescale P2020 PCIe hierarchyPali Rohár2023-04-291-0/+1548
| |
| * ls-tree: Print PCI domains in ascending orderPali Rohár2023-04-292-5/+7
| |
| * ls-tree: Fix parsing devices on multidomain PCI systemPali Rohár2023-04-291-10/+49
| | | | | | | | | | | | | | | | | | | | | | Represent each domain as domain bridge under the &host_bridge and put root bus of each domain under the domain bridge. With this change lspci in tree view does not show zero bus on domain 0 in the output if this bus does not exist at all. Root bus in PCIe hierarchy does not have to be zero and on Freescale PowerPC systems it is common. Also with this change are separate domain showed in the output separately.
| * ls-tree: Rename struct bridge member next to prevPali Rohár2023-04-292-5/+5
| | | | | | | | It refers to the previous value in linked-list, not to the next.
| * ls-tree: Do not read Primary Bus Number for PCI Bridges from PCI config spacePali Rohár2023-04-291-2/+1
| | | | | | | | | | | | | | | | | | | | For PCIe devices of PCI Bridge type is Primary Bus Number not used and the default value is 0. PCIe devices capture their Bus and Device numbers automatically from PCIe TLP packets. Instead of Primary Bus Number use Device Number because zero value confuse tree building algorithm. Existing code already expects that Device Number of PCI Bridge is already set to Primary Bus Number.
* | lspci: Allow longer name stringsMartin Mares2023-05-011-2/+2
| |
* | Merge pull request #137 from jiladahe1997/masterMartin Mareš2023-05-011-1/+2
|\ \ | | | | | | Makefile: change STRIP to '--strip-program' when cross-compile
| * | Makefile: change STRIP to '--strip-program' when cross-compilemingrui.ren2023-03-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compile, we should use specific strip instead of default /usr/bin/strip. reference:https://man7.org/linux/man-pages/man1/install.1.html Signed-off-by: mingrui.ren <mingrui.ren@bst.ai>
* | | Merge pull request #140 from pali/ls-treeMartin Mareš2023-05-011-28/+43
|\ \ \ | | |/ | |/| lspci: Fix bridge filter support in tree view
| * | lspci: Fix bridge filter support in tree viewPali Rohár2023-04-181-28/+43
|/ / | | | | | | | | Correctly show whole subtree of PCI-to-PCI bridge in tree view when filter (-s or -d option) was specified for PCI-to-PCI bridge device itself.
* | pci.ids updated to today's snapshot after a big cleanup of the DBMartin Mares2023-04-101-486/+841
|/
* Documented that pci_(read|write)_block are little-endianMartin Mares2023-03-051-3/+6
|
* Parameters: Keep the list sorted and remove duplicatesMartin Mares2023-03-051-4/+18
| | | | | | When multiple back-ends use the same option (e.g., "devmem.path"), they tend to define it each. This is not nice, but before we generalize these options properly, let us at least remove the duplicate definitions.
* libpci: Add PCIe ECAM access methodPali Rohár2023-03-057-5/+1166
| | | | | | | | | | This is a new direct hardware access method via PCIe ECAM (Enhanced Configuration Access Mechanism). It is available on all PCIe-compliant hardware. Requires root privileges and access to physical memory. ECAM mapping can be specified manually via a new ecam.addrs parameter or can be read from ACPI MCFG table. ACPI MCFG table can be located in the system or read from x86 BIOS memory.
* Fix bug in previous commitMartin Mares2023-03-041-1/+1
|
* win32-cfgmgr32: Clean up initializationMartin Mares2023-03-044-36/+40
|
* win32-cfgmgr32: Improve wording in manual pageMartin Mares2023-03-041-4/+4
|
* Merge remote-tracking branch 'pali/win32-cfgmgr32'Martin Mares2023-03-044-17/+140
|\
| * libpci: win32-cfgmgr32: Add support for accessing config space via other backendPali Rohár2023-01-044-17/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend win32-cfgmgr32 backend and add a new option win32.cfgmethod for specifying other backend for accessing PCI config space. There are more config space access methods available on Windows and each is working only sometimes (either requires special privileges or special setup). So by default try to choose the first working one via order defined in pci probe_sequence[] array. If none is available then emulate PCI config space like before this change. Function pci_init_v35() is extended and renamed to pci_init_internal() to optionally do not throw errors and allow to specify one access method which will be skipped in AUTO mode. This is used to prevent choosing win32-cfgmgr32 as config space access method for win32-cfgmgr32.
* | Use "command -v" instead of "which"Martin Mares2023-03-041-5/+5
| | | | | | | | | | | | | | | | | | | | Apparently, people started considering "which" obsolete. I still consider "which" rather useful and definitely more comfortable to type than "command -v". Still, "command -v" should be more portable, so let us use it. I wonder which of the ancient systems which we are still supporting will be broken by this change...
* | Merge remote-tracking branch 'pali/windows'Martin Mares2023-03-042-6/+157
|\ \
| * | libpci: windows: Define ERROR_NOT_FOUNDPali Rohár2022-11-211-0/+4
| | | | | | | | | | | | Fix compile issues with older toolchain which does not define ERROR_NOT_FOUND macro.
| * | libpci: windows: Handle long paths generated by GetModuleFileName()Pali Rohár2022-11-181-1/+8
| | | | | | | | | | | | | | | | | | | | | C function fopen() implemented by msvcrt.dll requires special prefix "\\\\?\\" for paths longer than 260 bytes. Because GetModuleFileName() returns absolute path, it may be longer than 260 bytes. Add fixup to handle long paths.
| * | libpci: windows: Fix path returned by GetModuleFileName()Pali Rohár2022-11-181-3/+36
| | | | | | | | | | | | | | | GetModuleFileName() on Windows 10 has bugs and returns bogus path. Implement fixups to make path usable for later fopen() call.
| * | libpci: djgpp: Allow to specify empty IDSDIR=Pali Rohár2022-11-181-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like for windows builds this will cause to load pci.ids file from the same directory where is stored application binary. Code is same as for Windows, just djgpp uses global symbol __dos_argv0 instead of _pgmptr. Tested with following compile command: make CROSS_COMPILE=i586-pc-msdosdjgpp- HOST=i586-djgpp ZLIB=no DNS=no IDSDIR=
| * | libpci: windows: Fix locating path to pci.ids file for DLL buildsPali Rohár2022-11-181-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using shared libpci DLL library, it is expected that pci.ids file is stored in directory where is also libpci DLL library and not in directory where is application executable. Based on the build mode and compile options, choose the appropriate function for retrieving path to the libpci DLL library or application executable. Also pass correct module argument to GetModuleFileName() call.
| * | libpci: windows: Fix usage of GetModuleFileName()Pali Rohár2022-11-181-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module file name can have arbitrary length despite all MS examples say about MAX_PATH upper limit. This limit does not apply for example when executable is running from network disk with very long UNC paths or when using "\\??\\" prefix for specifying executable binary path. So handle buffer truncatenation by retrying GetModuleFileName() call with larger buffer. Fixes loading of pci.ids file when lspci.exe binary is running from network drive with path longer than 260 bytes.
* | | Merge remote-tracking branch 'pali/mmio-ports'Martin Mares2023-03-041-4/+4
|\ \ \
| * | | libpci: mmio-ports: Fix support for 64-bit non-LLP64 systemsPali Rohár2023-01-291-4/+4
| | |/ | |/| | | | | | | | | | | | | On 64-bit non-LLP64 systems is type long 64-bit. On 32-bit and 64-bit LLP64 systems is type long only 32-bit. But readl() and writel() functions works with 32-bit PCI word. Fix it for non-LLP64 systems by using type u32.
* | | Filters: Allow leading "0x" for backward compatibilityMartin Mares2023-03-041-0/+5
| | |
* | | Fix versioned symbol aliases when used with link-time optimizationMartin Mares2022-12-281-2/+2
| | |
* | | README.Windows: Fix of $HOSTMartin Mares2022-11-211-1/+1
|/ / | | | | | | Suggested by Pali.
* | Released as 3.9.0v3.9.0Martin Mares2022-11-203-6/+8
| |
* | Updated pci.ids to today's snapshotMartin Mares2022-11-201-73/+818
|/ | | | | Worked around encoding issues in the database before we fix them for real.
* libpci: mmio-ports: Add Extended PCIe Intel Type 1 access methodPali Rohár2022-11-185-17/+100
| | | | | | | Extended method allows to access all PCIe registers, including extended registers starting at 0x100 offset. This method uses 4 reserved buts above bus bits for PCIe registers. On ARM platforms it is very common for PCIe controllers. Like standard method, it needs to be properly configured.
* Merge remote-tracking branch 'pali/intel-conf1-memio'Martin Mares2022-11-182-6/+19
|\
| * libpci: mmio-ports: Check for write access to /dev/mem in detect methodPali Rohár2022-11-181-2/+2
| |
| * libpci: mmio-ports: Add configure note messagesPali Rohár2022-11-181-3/+3
| |
| * libpci: mmio-ports: Bypass CPU cache and add barriers for read/writePali Rohár2022-11-181-1/+14
| | | | | | | | | | Between accessing address address and data I/O ports it is needed to issue barriers. Use explicit readl() for barrier and O_DSYNC to bypass CPU cache.
* | Draft ChangeLog for the next releaseMartin Mares2022-11-181-0/+27
| |
* | pcilib.man: Include information about win32-kldbgPali Rohár2022-11-181-0/+25
| |
* | libpci: Add new windows kldbgdrv.sys implementationPali Rohár2022-11-187-2/+813
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft Kernel Local Debugging Driver (kldbgdrv.sys) allow access for userspace processes to the PCI config space. It supports access up to 65536 domains and whole 4096 bytes long extended PCIe config space. Driver is signed by Microsoft and is available for both 32-bit and 64-bit systems. Driver is not part of Windows system and has to be installed via WinDbg installation package. Standalone installers for WinDbg 6.12.2.633 version: https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi This kldbgdrv.sys API is used by the !pci command of new WinDbg kernel debugger for displaying PCI config space. API of this driver is available only for processes with Debug privilege and only if system was booted with Debugging option.
* | Disable mmio-ports on platforms where it does not make much senseMartin Mares2022-11-181-8/+0
| | | | | | | | Feel free to re-enable it if you find it useful.
* | Merge remote-tracking branch 'pali/intel-conf1-memio'Martin Mares2022-11-1810-8/+450
|\ \ | |/
| * libpci: Add Intel Type 1 implementation for memory mapped systemsPali Rohár2022-11-057-1/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lot of non-x86 platforms also support Intel Type 1 mechanism. x86 IO ports CF8 and CFC are on these platforms mapped into standard memory space. Address mapping itself is platform or board specific and there is no default value. Lot of ARM boards with multiple PCIe controllers are multi-domain and each PCI domain has its own CF8/CFC (address/data) registers mapped into memory space. Add new mmio-conf1 backend which access CF8/CFC ports via MMIO and define new config option mmio-conf1.addrs which specify list of address/data register pairs in memory space for each PCI domain. Format of this option is: 0xaddr1/0xdata1,0xaddr2/0xdata2,...
| * libpci: Add auxiliary data member to struct pci_access for use by the back-endPali Rohár2022-11-051-0/+1
| |
| * libpci: Add new internal function pci_generic_scan_domain()Pali Rohár2022-11-054-7/+16
| | | | | | | | | | Function pci_generic_scan() scans PCI domain 0. This new function pci_generic_scan_domain() scans specified PCI domain number.