About variable "IOPortBase"
Michael Lorenz
macallan at netbsd.org
Thu Mar 27 05:52:03 PDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On Mar 27, 2008, at 03:15, belcon zhao wrote:
> Finally, got this question fixed.
Good :)
> 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.
Several reasons:
- - not all graphics controllers need IOPortBase, for instance pretty
much all ATI chips have everything you need in memory-mapped PCI
resources
- - 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.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQEVAwUBR+uYdMpnzkX8Yg2nAQIOXQf/UEFEG9PAdcQPM+oS/OQ5KIagrFnYSgl7
qMbVK9J2oFwXPFca5zdelzSRLUK7N2LZy0VwAB/2aE741CEzCcG1GjcmuMv5W8SL
BzBU3LrIotOiF4WS749vGWi0opq2osO0SySzTaBhkr0s4c/moTAREmo29BxH4iR9
Kl9TQwikqebEceQqCBopfRVA0ddLqAaiD2pt+0nl8IVRKgJ2vYzfokBtTqVj3iPS
QTDwRtU8FvfBMwAFtwvmEwNvC6NPtSuo9Ki1sZSJmagp04MU2aC5sFsAYV3jkSLw
/35KUUcuCVoKDgCMHNVRi1dni9d3gyhisv4oDWjvcRv8s9M1c07oOQ==
=75G7
-----END PGP SIGNATURE-----
More information about the xorg
mailing list