Skip to content

clean up FreeBSD pci methods and incorporate local patches

Niclas Zeising requested to merge zeising/libpciaccess:zeising/freebsd into master

This is a fairly big merge request, that cleans up the FreeBSD libpciaccess methods, and incorporates local patches we've had in our ports tree for ages, as well as add some new functionality. I have tried to separate white space changes, since our local patches had a bunch of those, and incorporating those as well made it easier to push everything. Our local patches add support for legacy I/O methods for new architectures, using ioctl()s rather than inb/outb, and tries to fix things for sparc64.

New stuff not previously in the FreeBSD ports tree: I've cleaned up so that we no longer support old versions of FreeBSD, but a the same time, this makes the code easier to read through. This includes getting rid of the autoconf check for pci_io.pi_sel.pc_domain, pc_domain has been part of this struct for a long time. I also removed the old probe methods that didn't use the PCIOCGETBAR ioctl, which has been part of FreeBSD for 10 years. I've also added a new method for has_kernel_driver, using the PCIOCATTACHED ioctl().

This is a fairly big change, and perhaps should have been broken in several merge requests, however the changes build on each other, making it hard to separate.

Edited by Niclas Zeising

Merge request reports