About variable "IOPortBase"
belcon zhao
belcon.zhao at siliconmotion.com.cn
Wed Mar 26 20:09:11 PDT 2008
Hi,
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
>
> Hello,
>
> 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
> Michael
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
>
> iQEVAwUBR+sGT8pnzkX8Yg2nAQJUxwf9Go+6LR06+OUyLX8emq17UvNmj6xRHAM2
> ACpMgKel23LHEMc53A1KpQB33lWMhPGnohgw+tB3+5oPb2vxjaAJDf6TrO9J+6V0
> utBmeVxMxRXYQqn7hhFdvll4C5477HdHA78e0x9NtCrVpQrzBavoUGRQG5N/A3vJ
> sU36XXVUz5GRX6N2qUl2thuIt1AG8PDhNh22PdWupOX2HxIwZGErxJVv2OIn72dt
> wg1p2Y2gKW9ihv/Mi1Tdi+4k9giFZxZsVz6X//dIpIAoiDkArFzhSUEkaKODc37x
> FIl2YdBhYjsnMQiOhRsxvgQA+MJDY7gUHzojywRcqxqm7ZG/92V/qQ==
> =5djY
> -----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20080327/2becea3d/attachment.html>
More information about the xorg
mailing list