[PATCH] Update NetBSD support in libpciaccess

Mark Kettenis mark.kettenis at xs4all.nl
Wed Dec 29 09:42:32 PST 2010


> From: Michael <macallan at netbsd.org>
> Date: Mon, 27 Dec 2010 16:23:40 -0500
> 
> Hello,
> 
> this patch is pulled straight from NetBSD -current, it does:
> - add support for multiple PCI host bridges
> - add sane support for reading ROMs
> - get rid of all /dev/mem use
> - all that in a machine independent manner, the same code runs on  
> sparc64, i386 etc.

Hi Michael,

Not sure if review is essential for pciaccess patches, but just in
case, here are my observations.

If I read this code correctly, you're putting each PCI bus in a
seperate domain.  That is not quite right!

On the other hand, XOrg is now largely PCI domain unaware.  I think
there are basically two places where domains still matter:

1. The xf86-video-intel driver does a look up of the host bridge in
   domain 0.  On NetBSD on i386/amd64 the host bridge probably always
   ends up in domain 0, since it lives on the first PCI bus in the
   system.  So you're probably safe here.

2. The BusID's used to select specific PCI devices in xorg.conf may
   include the domain.  I'm not quite sure what the impact of putting
   each PCI bus in its own domain is here.  It may mean that you'll
   need to specify the domain for devices that don't sit on PCI bus 0.

Anyway, just some stuff to keep in mind.  If you think this helps
NetBSD users, by all means go ahead.

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>


More information about the xorg-devel mailing list