summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-05install headerobsdMatthieu Herrb
2024-05-05Fix running totally unprivileged with startx(1).Matthieu Herrb
2024-05-05fix small leaks in openbsd_pci.cMatthieu Herrb
2024-05-05Replace <sys/param.h>Matthieu Herrb
2024-05-05Add simple make-based build systemMatthieu Herrb
2024-05-05Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2024-04-17vgaarb: Check snprintf return valueHEADmasterJosé Expósito
snprintf() might return a negative value if an error occurs. Check its return value before using it in vgaarb_write(). Signed-off-by: José Expósito <jexposit@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/35>
2024-03-30white space fixesMatthieu Herrb
2024-03-30use C99 initializers for struct pci_system_methodsMatthieu Herrb
2024-03-30Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2024-03-23libpciaccess 0.18.1libpciaccess-0.18.1Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-03-14meson: allow building static library, not just sharedAlan Coopersmith
Lets builders specify -Ddefault_library={shared,static,both} to control which types of libpciaccess library are built Closes: #20 Reported-by: Maxime Gauduin (@alucryd) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-25Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2024-02-04libpciaccess 0.18libpciaccess-0.18Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-29Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2023-10-17Remove autotools buildAlan Coopersmith
It's been a year since we released 0.17 with meson support and asked people to report if they had any problems with it - no one has reported any, so lets drop the old build tools now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-07-31Fix compilation warnings when building against hurd-amd64.Flavio Cruz
Passes mach_msg_type_number_t instead of size_t which have different sizes. Example warning: /hurd_pci.c:101:53: warning: passing argument 3 of 'pci_get_dev_regions' from incompatible pointer type [-Wincompatible-pointer-types] 101 | err = pci_get_dev_regions(d->device_port, &buf, &size); | ^~~~~ | | | size_t * {aka long unsigned int *}
2023-06-21gitlab-ci: remove unnecessary call to `meson configure`Dylan Baker
2023-06-21gitlab-ci: don't bother to configure meson for the version checkDylan Baker
meson introspect can get some information from an unconfigured meson.build file. In this case the version info is available without configuring.
2023-06-21gitlab-ci: use `meson setup`Dylan Baker
Meson without the `setup` verb is deprecated as ambiguous.
2023-06-15Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2023-03-25Try fopen(".../pci.ids", "re") on Solarish systems as wellAlan Coopersmith
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>
2023-03-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-25FreeBSD: Remove sparc64 codeEmmanuel Vadot
FreeBSD stopped supporting sparc64 a while ago, no need to keep the code. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
2023-03-24FreeBSD: Fallback to /usr/share/misc/pci_vendorsEmmanuel Vadot
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>
2022-12-15linux_sysfs: Use pwrite/pread instead of 64bit versionsKhem Raj
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>
2022-12-04Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2022-10-17libpciaccess 0.17libpciaccess-0.17Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-23hurd: Fix pci_device_hurd_map_legacySamuel Thibault
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.
2022-08-11Add pci_device_disable() functionMoritz Fischer
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>
2022-08-01Delete redundant symbols ';'zhanghongtao
Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
2022-08-01Add header protection macro in linux_devmem.hzhanghongtao
Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
2022-08-01pci_sys set NULL after freezhanghongtao
Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
2022-08-01Add parentheses to the macro definitionzhanghongtao
Signed-off-by: zhanghongtao <zhanghongtao22@huawei.com>
2022-07-01Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2022-06-21Add support for building on macOS w/o X11, using endian code from ↵Satadru Pramanik
"portable_endian.h"...
2022-05-01Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2022-04-07configure.ac: Use pkg-config to find zlib dependency infoAlan Coopersmith
Matches what we already do in meson.build Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-06gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03Obtain correct value of is_64 and is_prefetchable PCI device fieldsChester Gillon
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>
2022-04-02gitlab CI: add a basic build test for both autotools and mesonAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-02meson: install man page in mandir/man1/, not mandir/1/Alan Coopersmith
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>
2022-04-02Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-02Build xz tarballs instead of bzip2Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-03-14Hurd: Fix initialization orderJoan Lledó
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>
2022-02-15hurd: Don't necessarily look up _SERVERS_BUS_PCIDamien Zammit
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>
2022-01-09hurd: Restore initialization orderSamuel Thibault
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.
2022-01-08hurd: Implement device memory mappingJoan Lledó
* 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>
2021-05-22Merge remote-tracking branch 'origin/master' into obsdMatthieu Herrb
2021-04-13x86: Sort devices by B/D/F due to recursive scanDamien Zammit