About variable "IOPortBase"
belcon.zhao at siliconmotion.com.cn
Wed Mar 26 20:09:11 PDT 2008
I am working a Xorg graphic chip driver, but find some bugs(Xorg crashed
while switching between X windows and console). So I need a Xorg server
with debug info. That's why I want to compile Xorg.
The original Xorg which came with Debian got IOPortBase assigned
correctly which means that resource of my graphic chip is ok.
The problem is my driver used function outb() which was defined as :
static __inline__ void
outb(unsigned PORT_SIZE port, unsigned char val)
*(volatile unsigned char*)(((unsigned
PORT_SIZE)(port))+IOPortBase) = val;
Just found that IOPortBase wasn't set correctly.
As I found that IOPortBase was only set in the file arm_video.c, I think
that outb() shouldn't be as above. There are several different version
of outb(). So I just think that maybe I should do some extra work to let
Xorg find correct version of outb().
On Wed, 2008-03-26 at 22:28 -0400, Michael Lorenz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Mar 26, 2008, at 22:05, belcon zhao wrote:
> > Hi all,
> > I compiled Xorg server from source code. My linux distribution
> > is Debians and CPU is mipsel. I have tried source packages from
> > freedesktop and debians. But xorg crashed when I tried to make it
> > work. I just found it happened while graphic chip driver call outb
> > (), which is defined as below:
> You better figure out where your host bridge puts PCI IO space, mmap
> () it and set IOPortBase accordingly. The code you quoted from
> arm_video.c looks OpenBSDish though ( mmap()ing /dev/ttyC0 and such,
> it's probably bitrotted )
> have fun
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> -----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg