summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Try fopen(".../pci.ids", "re") on Solarish systems as wellHEADmasterAlan Coopersmith2023-03-251-2/+0
| | | | | | | | | | Oracle Solaris added support for "e" in the fopen() mode string in Solaris 11.4.0 (released August 2018). illumos (also covered under #ifdef __sun) added support for "e" in 2013 (https://www.illumos.org/issues/3687). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith2023-03-253-3/+3
| | | | | | Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* FreeBSD: Remove sparc64 codeEmmanuel Vadot2023-03-253-59/+7
| | | | | | FreeBSD stopped supporting sparc64 a while ago, no need to keep the code. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
* FreeBSD: Fallback to /usr/share/misc/pci_vendorsEmmanuel Vadot2023-03-241-0/+3
| | | | | | | | | FreeBSD already have a copy of the pci.ids file present in base. Continue to prefer the upstream pci.ids (which can be installed via the FreeBSD ports misc/pciids) but fallback on the one from base if it doesn't exists. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
* linux_sysfs: Use pwrite/pread instead of 64bit versionsKhem Raj2022-12-151-2/+2
| | | | | | | | | | | | | pread64/pwrite64 are aliased to pread/pwrite when largefile support is enabled e.g. using _FILE_OFFSET_BITS=64 macro This helps it compile on latest musl C library based systems where these functions are put under _LARGEFILE64_SOURCE which is to be removed once all packages start using 64bit off_t, it works with glibc becuase _GNU_SOURCE feature macro also defines _LARGEFILE64_SOURCE, thats not the case with musl Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libpciaccess 0.17libpciaccess-0.17Alan Coopersmith2022-10-172-3/+4
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* hurd: Fix pci_device_hurd_map_legacySamuel Thibault2022-08-233-14/+56
| | | | | | | | | | | | It was not passing a proper region number to pci_device_hurd_map_range, and that would not make sense anyway since the rom is not a region for instance, and the video memory, interrupt vector etc. aren't a region or the rom. So this uses pci_device_hurd_map_range for the rom, and pci_system_x86_map_dev_mem for non-rom. Unfortunately pci-arbiter currently cannot get the rom_base from libpciaccess, so we can only guess that we are trying to map a rom.
* Add pci_device_disable() functionMoritz Fischer2022-08-114-2/+25
| | | | | | | | | This implements a pci_device_disable() function, currently only for the linux_sysfs() backend. This mirrors the implementation for pci_device_enable() Signed-off-by: Moritz Fischer <moritzf@google.com>
* Delete redundant symbols ';'zhanghongtao2022-08-011-1/+1
| | | | Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
* Add header protection macro in linux_devmem.hzhanghongtao2022-08-011-0/+5
| | | | Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
* pci_sys set NULL after freezhanghongtao2022-08-012-0/+3
| | | | Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
* Add parentheses to the macro definitionzhanghongtao2022-08-011-3/+3
| | | | Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
* Add support for building on macOS w/o X11, using endian code from ↵Satadru Pramanik2022-06-211-0/+18
| | | | "portable_endian.h"...
* configure.ac: Use pkg-config to find zlib dependency infoAlan Coopersmith2022-04-071-6/+5
| | | | | | Matches what we already do in meson.build Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith2022-04-061-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Obtain correct value of is_64 and is_prefetchable PCI device fieldsChester Gillon2022-04-031-3/+3
| | | | | | | | | | | | | Correct setting of the is_64 and is_prefetchable pci_device fields in pci_device_linux_sysfs_probe(). The pci_device struct defines is_64 and is_prefetchable as single bits, but the previous code was attempting to store the result of a bit-masked field in a single bit which always resulted in is_64 and is_prefetchable being zero regardless of the actual capabilities of the PCI device. Fixes: #15 Signed-off-by: Chester Gillon <chester.gillon@metronet.co.uk>
* gitlab CI: add a basic build test for both autotools and mesonAlan Coopersmith2022-04-021-0/+180
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* meson: install man page in mandir/man1/, not mandir/1/Alan Coopersmith2022-04-021-2/+2
| | | | | | | But don't install it by default, since neither meson nor autotools installs the scanpci program by default Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix spelling/wording issuesAlan Coopersmith2022-04-025-6/+6
| | | | | | | Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Build xz tarballs instead of bzip2Alan Coopersmith2022-04-021-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Hurd: Fix initialization orderJoan Lledó2022-03-141-10/+12
| | | | | | | | This allows non-root programs to to rely on /servers/bus/pci Message-Id: <20220312182804.9318-2-jlledom@mailfence.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd: Don't necessarily look up _SERVERS_BUS_PCIDamien Zammit2022-02-151-6/+17
| | | | | | | | | | This allows the fallback mechanism in the hurd create method to be used in the map range method by reusing the mach port that corresponds to the root of the pci filesystem. Message-Id: <20220215064411.68671-1-damien@zamaudio.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd: Restore initialization orderSamuel Thibault2022-01-091-12/+14
| | | | | | | 3e0d1cde0187 ("hurd: Implement device memory mapping") was making root-running processes insist on using the pci device, and never try the fs-provided translator. This reverts back to trying the pci device first, but completely, and then revert to the fs-provided translator.
* hurd: Implement device memory mappingJoan Lledó2022-01-083-36/+148
| | | | | | | | | | | | | | | | | | | | | | * src/hurd_pci.c: * Implement device memory mapping functions * pci_device_hurd_map_range * pci_device_hurd_unmap_range * pci_device_hurd_map_legacy * pci_device_hurd_unmap_legacy * src/x86_pci.h: * Remove unused declarations * pci_device_x86_map_range() * pci_device_x86_unmap_range() * pci_device_x86_map_legacy() * pci_device_x86_unmap_legacy() * src/x86_pci.c: * Fix port leaks * Make mapping function static again * map_dev_mem(): use device_map() support for offsets Message-Id: <20220105120802.14008-2-jlledom@mailfence.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* x86: Sort devices by B/D/F due to recursive scanDamien Zammit2021-04-131-0/+27
|
* hurd: device_open(pci), /servers/bus/pci fallbackDamien Zammit2021-04-051-47/+74
| | | | Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* missed library installation in mesonPetr Ovtchenkov2020-12-021-2/+3
| | | | | Signed-off-by: Petr Ovtchenkov <ptr@void-ptr.info> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* autoconf: Add meson files to dist tarballDylan Baker2020-11-024-2/+12
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* Add a meson build systemDylan Baker2020-11-025-0/+295
| | | | | | | I believe this is correct and complete, but I could have missed something on non-linux OSes. Reviewed-by: Eric Anholt <eric@anholt.net>
* hurd: Fix map_dev_mem from non-zero addressSamuel Thibault2020-09-101-1/+2
| | | | | | device_map needs to create a big-enough object so it can then be mapped. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd: Fix letting map_dev_mem map anywhereSamuel Thibault2020-09-101-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd: Add missing round up size in map_dev_memSamuel Thibault2020-09-101-1/+6
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* x86: Remove probe during create, other backends don't do thisDamien Zammit2020-08-271-4/+0
|
* x86: Remove mapping of regions during probe - otherwise remapping later failsDamien Zammit2020-08-271-10/+3
|
* x86: Use gnumach device instead of /dev/mem on GNU systems && factorise ifdefsDamien Zammit2020-08-271-42/+87
|
* hurd_pci: Use __pci_conf_ variants of pci_conf_Damien Zammit2020-08-271-2/+2
|
* pciaccess.pc.in: add Libs.PrivateFabrice Fontaine2020-08-221-0/+1
| | | | | | | | Add Libs.Private in pciaccess.pc.in so applications that wants to link statically with pciaccess will know that they have to link with its dependencies such as -lz Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* Hurd: avoid using the deprecated RPC pci_get_ndevs()Joan Lledó2019-12-271-62/+91
|
* libpciaccess 0.16libpciaccess-0.16Adam Jackson2019-07-171-1/+1
|
* x86: Use MAP_SHARED for memory/rom region mmap && fix modeDamien Zammit2019-07-121-8/+6
|
* linux: Don't try to include <sys/io.h> on armAdam Jackson2019-07-111-1/+1
| | | | | It no longer exists in newer glibc, and didn't work like you'd have hoped on anything but strongarm anyway.
* libpciaccess 0.15libpciaccess-0.15Adam Jackson2019-07-111-1/+1
|
* Fix pci_device_get_bridge_info() for multifunction bridgesLichao Mu2019-07-111-1/+1
| | | | Fixes: xorg/lib/libpciaccess#9
* Use recursive scan busDamien Zammit2019-07-111-71/+11
| | | | | | Switch over to the new recursive scan bus routine for x86 Signed-off-by: Damien Zammit <damien@zamaudio.com>
* Add better probe cmds for non-VGA roms and regions on x86Damien Zammit2019-07-111-59/+285
| | | | | | Also add a recursive scan-bus routine that uses the new probe cmds. Signed-off-by: Damien Zammit <damien@zamaudio.com>
* New module for the HurdDamien Zammit2019-07-116-152/+813
| | | | | | | | | | | | | This new module uses Hurd's RPCs for accessing the PCI configuration space. Direct access as in {read_write}_{8,16,32} functions is done by the old x86 module. Some x86 function prototypes are now declared in a new header for the Hurd module to use them, in order to duplicate as little code as possible. Author: Joan Lledó <joanlluislledo@gmail.com> Also-by: Damien Zammit <damien@zamaudio.com> Signed-off-by: Damien Zammit <damien@zamaudio.com>
* freebsd_pci: remove old probe methodNiclas Zeising2019-07-101-163/+0
| | | | | | | | Remove the old probe method. The PCIOCGETBAR ioctl has been in FreeBSD since 8.0 release, if not earlier. Remove the old way of doing it. This is done using unifdef -DPCIOCGETBAR and cleaning up whitespace. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
* freebsd_pci: format freebsd_pci_methodsNiclas Zeising2019-07-101-0/+6
| | | | | | | | | Format freebsd_pci_methods a bit, adding some whitespace and assigning NULL to methods not implemented. This makes it easier to see the names of various methods, as well as which methods are not implemented. Idea from src/linux_sysfs.c Signed-off-by: Niclas Zeising <zeising@daemonic.se>
* freebsd_pci: Add has_kernel_driver functionNiclas Zeising2019-07-101-0/+19
| | | | | | | | | Add a has_kernel_driver function to the FreeBSD libpciaccess functions. This uses the PCIOCATTACHED ioctl to check if a driver is attached to a specific PCI device. Idea taken from the FreeBSD system utility pciconf. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
* freebsd_pci: Remove unused variableNiclas Zeising2019-07-101-1/+0
| | | | | | Remove unused variable, it's written to, but never used. Signed-off-by: Niclas Zeising <zeising@daemonic.se>