|
Revision tags: v3.14.0 |
|
| #
021d41cf |
| 28-Nov-2024 |
GuEe-GUI <[email protected]> |
Port to RT-Thread Smart DM PCI
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Revision tags: v3.13.0 |
|
| #
ef78f397 |
| 30-May-2024 |
Martin Mares <[email protected]> |
ABI version bump for pci_fill_info()
We have new flags and new fields in struct pci_dev.
|
|
Revision tags: v3.12.0, v3.11.1, v3.11.0 |
|
| #
0e48f9b7 |
| 24-Feb-2024 |
Pali Rohár <[email protected]> |
libpci: Define STATIC_ALIAS for DLL Windows builds
Windows builds for versioned symbols use inline asm .set directive which in some cases makes x86-64 LTO compiler to drop the referenced value. Defi
libpci: Define STATIC_ALIAS for DLL Windows builds
Windows builds for versioned symbols use inline asm .set directive which in some cases makes x86-64 LTO compiler to drop the referenced value. Define STATIC_ALIAS macro with VERSIONED_ABI (used) attribute which forces LTO compiler to not drop the symbol from the final DLL library.
show more ...
|
| #
d32e8a44 |
| 18-Feb-2024 |
Martin Mares <[email protected]> |
Library: pci_define_param() returns a pointer to the parameter
This will allow overriding pci_param->malloced.
|
| #
e5d1d2db |
| 17-Feb-2024 |
Martin Mares <[email protected]> |
MacOS: An attempt to appease compiler picky about attribute placement
|
| #
5b52ae79 |
| 22-Jan-2024 |
Agg242 <[email protected]> |
New back-end for AmigaOS on PowerPC
|
| #
61829219 |
| 18-Jun-2023 |
Martin Mares <[email protected]> |
Update license comments and added SPDX license identifiers
Previously, the only information about the specific version of GPL was present in the README and individual source files mentioned only GPL
Update license comments and added SPDX license identifiers
Previously, the only information about the specific version of GPL was present in the README and individual source files mentioned only GPL alone.
Let us update all copyright comments to explicitly say "GPL v2+" and also include the machine readable SPDX license identifier.
show more ...
|
|
Revision tags: v3.10.0 |
|
| #
2ba0f6f4 |
| 29-Jan-2023 |
Pali Rohár <[email protected]> |
libpci: Add PCIe ECAM access method
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
libpci: Add PCIe ECAM access method
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.
show more ...
|
| #
ea404c2a |
| 04-Mar-2023 |
Martin Mares <[email protected]> |
win32-cfgmgr32: Clean up initialization
|
| #
848123eb |
| 30-Dec-2022 |
Pali Rohár <[email protected]> |
libpci: win32-cfgmgr32: Add support for accessing config space via other backend
Extend win32-cfgmgr32 backend and add a new option win32.cfgmethod for specifying other backend for accessing PCI con
libpci: win32-cfgmgr32: Add support for accessing config space via other backend
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.
show more ...
|
| #
2d16e3a7 |
| 28-Dec-2022 |
Martin Mares <[email protected]> |
Fix versioned symbol aliases when used with link-time optimization
|
|
Revision tags: v3.9.0, v3.8.0 |
|
| #
e2d9340b |
| 02-Jan-2022 |
Pali Rohár <[email protected]> |
libpci: mmio-ports: Add Extended PCIe Intel Type 1 access method
Extended method allows to access all PCIe registers, including extended registers starting at 0x100 offset. This method uses 4 reserv
libpci: mmio-ports: Add Extended PCIe Intel Type 1 access method
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.
show more ...
|
| #
aa5a16ef |
| 04-Mar-2022 |
Pali Rohár <[email protected]> |
libpci: Add new windows kldbgdrv.sys implementation
Microsoft Kernel Local Debugging Driver (kldbgdrv.sys) allow access for userspace processes to the PCI config space. It supports access up to 6553
libpci: Add new windows kldbgdrv.sys implementation
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.
show more ...
|
| #
0a7350fb |
| 02-Jan-2022 |
Pali Rohár <[email protected]> |
libpci: Add Intel Type 1 implementation for memory mapped systems
Lot of non-x86 platforms also support Intel Type 1 mechanism. x86 IO ports CF8 and CFC are on these platforms mapped into standard m
libpci: Add Intel Type 1 implementation for memory mapped systems
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,...
show more ...
|
| #
8d750a8d |
| 02-Jan-2022 |
Pali Rohár <[email protected]> |
libpci: Add new internal function pci_generic_scan_domain()
Function pci_generic_scan() scans PCI domain 0. This new function pci_generic_scan_domain() scans specified PCI domain number.
|
| #
32934d5b |
| 08-May-2022 |
Pali Rohár <[email protected]> |
libpci: Add support for building versioned shared Windows DLL library libpci3.dll
PE/COFF format, used by DLL libraries, does not support version symbols like ELF format. Recommendation from Microso
libpci: Add support for building versioned shared Windows DLL library 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.
show more ...
|
| #
2d0af6fc |
| 02-Jan-2022 |
Pali Rohár <[email protected]> |
libpci: Add new windows NT sysdbg implementation
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 s
libpci: Add new windows NT sysdbg implementation
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.
show more ...
|
| #
26c8b543 |
| 31-Dec-2021 |
Pali Rohár <[email protected]> |
libpci: Add windows cfgmgr32 implementation
Access via cfgmgr32.dll library allows to list PCI devices and retrieve their basic properties and system resource configuration. Access is available to a
libpci: Add windows cfgmgr32 implementation
Access via cfgmgr32.dll library allows to list PCI devices and retrieve their basic properties and system resource configuration. Access is available to all users and should not require special privileges, access tokens, rights or permissions.
This cfgmgr32.dll library does not provide access to PCI config space.
show more ...
|
| #
08609192 |
| 02-Jan-2022 |
Pali Rohár <[email protected]> |
libpci: Implement virtual config space for provides without access to config space
Add a new pci_dev member no_config_access which signals that there is no access to config space for particular devi
libpci: Implement virtual config space for provides without access to config space
Add a new pci_dev member no_config_access which signals that there is no access to config space for particular device. Reading operation in this case should return data from emulated virtual config space. For provides there is a new helper function pci_generic_read() which emulates config spaces based on struct pci_dev members.
show more ...
|
| #
119c1376 |
| 20-Nov-2021 |
Pali Rohár <[email protected]> |
libpci: Add support for filling bridge resources
Extend libpci API and ABI to fill bridge resources from sysfs.
|
| #
8e9299e4 |
| 21-Jan-2022 |
Martin Mares <[email protected]> |
Simplified pci_fill_info() and friends
Previously, we kept track of which fields were already filled, which was quite brittle.
Now we keep only the set of already known fields in struct pci_dev. We
Simplified pci_fill_info() and friends
Previously, we kept track of which fields were already filled, which was quite brittle.
Now we keep only the set of already known fields in struct pci_dev. We check if the current field is needed against this information.
Not only this simplifies the whole thing, but it also enables future back-ends to call pci_fill_info() recursively as needed.
show more ...
|
|
Revision tags: v3.7.0 |
|
| #
82c06b47 |
| 25-May-2020 |
Martin Mares <[email protected]> |
Library: Big cleanup of pci_fill_info()
There was a lot of minor issues in the implementation of the fill_info call-back in various back-ends. Most importantly, semantics of pci_dev-> known_fields w
Library: Big cleanup of pci_fill_info()
There was a lot of minor issues in the implementation of the fill_info call-back in various back-ends. Most importantly, semantics of pci_dev-> known_fields was not formally defined and it was implemented inconsistently.
We now define known_fields as the set of fields which were already obtained during the lifetime of the pci_dev. We never consider known fields which are not supported by the back-end. All fields which are unsupported by either the back-end, the OS, or the particular device, are guaranteed to have sensible default values (0 or NULL). Also, bit masks are always unsigned except for the signature of pci_fill_info() which should be preferably kept stable.
All back-ends and the pci_generic_fill_info() function have been changed to follow this semantics.
In the sysfs back-end, we read as few attributes as possible during device initialization, so applications which use pci_get_dev() are not slowed down unnecessarily.
In the Hurd back-end, we also respect the buscentric mode.
show more ...
|
|
Revision tags: v3.6.4, v3.6.3 |
|
| #
0a913370 |
| 30-Nov-2019 |
Joan Lledó <[email protected]> |
New access method: Hurd via RPCs
A new module for the Hurd that accesses PCI bus using available RPCs.
|
|
Revision tags: v3.6.2, v3.6.1, v3.6.0 |
|
| #
c02d903c |
| 26-Jun-2018 |
Martin Mares <[email protected]> |
Created a generic interface for device properties
Introduction of device tree node properties broke library ABI.
I gave up on creating new symbol versions whenever we add a new device property, so
Created a generic interface for device properties
Introduction of device tree node properties broke library ABI.
I gave up on creating new symbol versions whenever we add a new device property, so I introduced a generic property interface with which new string properties can be added while keeping ABI compatibility.
show more ...
|
| #
83fd885b |
| 18-Mar-2018 |
Martin Mares <[email protected]> |
Sylixos port
Contributed by YuJian Gong.
|