Xserver device I/O on Linux

Jesse Barnes <jbarnes-UzQTBcouhwxWk0Htik3J/[email protected]> Thu, 29 Apr 2004 15:02:21 -0700
Newsgroups gmane.comp.freedesktop.xserver
Message-ID <[email protected]>
In trying to port the X server to SGI ia64-based sn2 machines, I ran into a 
few problems, and I'm wondering what people think (if this discussion has 
happened before, please point it out to me--I've looked around a bit but 
haven't found much).

Device discovery:  all Linux ports that I'm aware of provide a PCI API that's 
accessable via /proc/bus/pci.  It seems like it would make sense to simplify 
some of the Linux code by assuming this was true.

Device I/O: some platforms (like sn2 and ppc) don't provide a way to do port 
I/O and mapping in the way that the server expects.  Would it make sense to 
have a per-device IO base address so that these platforms (and others like 
them) could simply use loads and stores to access the I/O ports they need?  
Mapping could also be done relatively simply if we assumed the presence of 
the /proc/bus/pci API.

Ideally, all of the Linux device access code would be unified, but I'm not 
sure if that's possible, so I'm willing to do this just for ia64 as long as 
people are ok with the non-platform specific bits.

Any thoughts?

Thanks,
Jesse