summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-09-20linux: support 32 bit PCI domains (v3)Stephen Hemminger
The PCI domain may be larger than 16 bits on Microsoft Azure and other virtual environments. PCI busses reported by ACPI are limited to 16 bits, but in Azure the domain value for pass through devices is intentionally larger than 16 bits to avoid clashing with local devices. This is needed to support pass through of GPU devices. v3: (ajax) Update FreeBSD and Solaris backends to preserve the full 32-bit domain number, since on those OSes it stands a chance of working already. Update NetBSD and OpenBSD backends to initialize domain_16 compatibly with older libpciaccess; neither backend appears to support more than a handful of domains to begin with though. Trivially update the generic x86 backend for source compatibility, though it still only supports one domain and will never be better. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101744 Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-05-31Enable use of __attribute__((deprecated)) with Solaris Studio 12.4 compilerAlan Coopersmith
Support for this attribute is added in the 12.4 beta release. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-24Define PCI_MATCH_ANY as an unsigned intAlan Coopersmith
Clears a bunch of clang warnings of the forms: common_device_name.c:345:23: warning: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare] if ( m->vendor_id == PCI_MATCH_ANY ) { ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ common_device_name.c:498:19: warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion] m.device_id = PCI_MATCH_ANY; ~ ^~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-07Add map_legacy interfaceAdam Jackson
This allows platforms to hand back mmaps of the low 1M (ISA) address space on a per-domain basis. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-16Strip trailing whitespaceAlan Coopersmith
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-03include: add a Makefile to install and distribute header fileGaetan Nadon
Makefiles are simpler when they only handle what is in their directory. Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-12-09I/O port access routinesAdam Jackson
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-12-02Add pci_device_get_parent_bridge()Adam Jackson
Copied from linuxPci.c in the X server. Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-08-03vgaarb: add vga count + resource accessorDave Airlie
2009-07-31vgaarb: change API to target taking a device + lock/unlock not taking oneDave Airlie
working on the target device - a target device of NULL reselects the target that existed when we started. this is mainly to allow a udev posting tool to return to the state of what happened before it ran.
2009-07-20vgaarb: fixup api for new count reporting + decodes interface was wrong.Dave Airlie
decodes is a information setting interface so it takes new decodes and sends them to the kernel
2009-07-16add support for finding if something has a kernel driverDave Airlie
2009-06-05vgaarb: fixup api and decode rsrc.Dave Airlie
This fixes up the API and stores the vga arb fd in the sys_pci structure, instead of hiding it in a random dev struct. It also reads back after setting the target and works out the decodes. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-05-14Reorganize the code.Tiago Vignatti
2009-05-14Delete vga_arb_rec.Tiago Vignatti
2009-05-13vgaarb: a bunch of clean ups to fit in libpciaccess style.Tiago Vignatti
2009-05-13Import libvgaaccess (VGA Arbiter) implementation from C3SL repository:Tiago Vignatti
http://git.c3sl.ufpr.br/
2009-05-01pciaccess: provide a method to detect if a device is boot VGADave Airlie
When the linux kernel exposes this information, we can use this interface in the X server to detect whether the kernel believes the device we are looking at is the boot VGA device. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-05-21linux: add pci_device_enable entrypoint and sysfs support for itDave Airlie
2008-03-28Fix function prototypes for C++Danny van Dyk
2008-03-12OpenBSD support for libpciaccess.Mark Kettenis
xserver and libpciaccess both need to open /dev/xf86, which can only be opened once. I implemented pci_system_init_dev_mem() like Ian suggested. This requires some minor changes to the BSD-specific os-support code. Since pci_system_init_dev_mem() is a no-op on FreeBSD this should be no problem.
2007-10-23Bit-fields have to have type _Bool, signed int, or unsigned int.Matthias Hopf
ISO/IEC 9899:1999 (E), 6.7.2.1 Structure and union specifiers, (4). _Bool is only supported for C99 and up, and 1-bit signed types don't make sense -> unsigned int.
2007-08-31Update / add comments in struct pci_mem_region.Ian Romanick
2007-08-30New interfaces to map memory with MTRR (or similar) support.Ian Romanick
Added new functions pci_device_map_range and pci_device_unmap_range to handle mapping of PCI device BARs. These new interfaces allow the possiblity of MTRRs on platforms that support them. These additional APIs necessitated changing some internal interfaces. The code for FreeBSD and Solaris has been updated but has not been compiled or tested. Old interfaces are marked deprecated and will eventually be removed.
2007-03-27Whitespace police.Ian Romanick
2007-01-15Convert pci_device_write_u* funtions to take a value instead of a pointer.Ian Romanick
At anholt's request, the pci_device_write_u* functions have been converted to take the value to be written as a parameter instead of a pointer to the value. Bump the version to 0.8.0.
2007-01-11Add interfaces to map / unmap specific memory ranges, bump lib version to 0.7.0.Ian Romanick
Add pci_device_map_memory_range and pci_device_unmap_memory_range to map and unmap specific memory ranges. The unmap bit is still a bit hinkey (unmaps the whole BAR). Works so far for initial conversion of VESA driver. Will need to be revisited.
2006-07-25Add pci_device_get_bridge_buses, bump API version to 0.5.0.Ian Romanick
2006-07-06Files missed (for reasons I still don't understand) on the previousIan Romanick
commit. REALLY add support for querying bridge information. Bump to version 0.5.0.
2006-04-12Bump to version 0.4.0.Ian Romanick
Add multiple-inclusion protection. Add new function to write masked bits to PCI config space. This mirrors functionality currently available in X.org that is slated to be removed. Gut old regex based search mechanism with a new mechanism that is modeled after the Linux kernel. In addition to searching for devices by device / vendor ID, it is possible to search for devices by their domain / bus / slot / function. Fix serious bus in the reading of ROMs and in the unmapping of regions. The main point is that the map routine depens on the pci_mem_region::memory pointer being non-NULL only when the region is mapped. Therefore, the unmap routine should set it to NULL after unmapping. Update to use new search API.
2006-03-27Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c.XORG-7_0_99_901Ian Romanick
Bump version to 0.3.0. Replace pci_get_name with pci_get_strings. This function matches the functionality provided by the Xorg scanpci module almost identically.
2006-03-18Initial import of libpciaccess.Ian Romanick