About variable "IOPortBase"
macallan at netbsd.org
Thu Mar 27 05:52:03 PDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
On Mar 27, 2008, at 03:15, belcon zhao wrote:
> Finally, got this question fixed.
> It is very clear that compiled Xorg with MIPS, IOPortBase hasn't
> been initialized while it is used by outb() and inb(). Don't know why.
- - not all graphics controllers need IOPortBase, for instance pretty
much all ATI chips have everything you need in memory-mapped PCI
- - the address where you find your IO space isn't CPU-dependent at
all, it has absolutely nothing to do with MIPS, in fact we have the
same problem on PowerPC, ARM, to a lesser degree on SPARC and a bunch
of others. It depends on your PCI host bridge and in some cases on
your firmware, there is no generic way to find it. You need to know
your hardware and adapt Xorg.
On NetBSD we get around this by defining a magic offset you mmap
through /dev/tty* and let the kernel return the appropriate pages
( it knows which bus the graphics chips sits on and that way it also
knows which host bridge it's on and what IO range to return - nothing
keeps you from having more than one and then you have an IO range for
each ) so userland ( and therefore Xorg ) doesn't need to know where
it really is. Linux might have something similar.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
-----END PGP SIGNATURE-----
More information about the xorg