tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mmap() fails for V_RAM and V_BIOS

Hi! Martin,

From: Martin Husemann <>
Date: Sat, 8 Nov 2008 10:28:56 +0100

> On Sat, Nov 08, 2008 at 11:34:11AM +0900, KIYOHARA Takashi wrote:
> > I loaded libint10.o with s3_driver.o with the PowerPC machine (bebox).
> > libint10.o tries mmap() of V_RAM (0xa0000-0xbffff) and V_BIOS (0xc0000).
> > However, I do not think that it has this space on PowerPC.  Should this
> > allocate the space somewhere for compulsion?
> The V_RAM space is usually described by a memory BAR of your vga - no idea
> about the vga cards ROM though.

My S3's card (S3 Trio64) has a memory space.  It uses as frame buffer,
mapped on 0xc0000000 by BAR0 against from CPU.

By the way,

From: KIYOHARA Takashi <>
Date: Wed, 17 Sep 2008 03:06:01 +0900 (JST)

> From: Michael Lorenz <>
> Date: Thu, 11 Sep 2008 00:42:11 -0400
> > Then X tries to mmap the card's framebuffer aperture, apparently  
> > believing it's at 0xfc000000 but I see no such range reported in the  
> > PCI scan. Could you please post the card's pcictl dump output?
> > I suspect that the card either doesn't have a BAR for its aperture or  
> > the driver doesn't look at it and tries to get the aperture address  
> > from the graphics chip's IO registers which returns bogus since we  
> > failed to map IO space.
> > If the card doesn't use a BAR for its aperture we have a problem  
> > since drivers like genfb will only let you mmap ranges that are  
> > either known to belong to the graphics chip or PCI IO.

This mapped address (0xfc000000) is bug for Xserver...  When the value is
0, X tries fixup.  And, 0xfc000000 was set as a result.

I attached file (pcictl.dump.s3.log):

>   Type 0 ("normal" device) header:
>     0x10: 0x00000000 0x00000000 0x00000000 0x00000000
>     0x20: 0x00000000 0x00000000 0x00000000 0x00000000
>     0x30: 0x04100000 0x00000000 0x00000000 0x0000011c
>     Base address register at 0x10
>       not implemented(?)

PCI memory space mapped 0xc0000000.  However it remap 0x00000000 against
from PCI space.  In a word it is not a flat space.
My S3 Trio64 was mapped at 0x00000000 by BAR0.  pcictl(8) reports 'not
implemented(?)', if mapped 0x00000000.

> Are you going to run this via lbx86emu?



Home | Main Index | Thread Index | Old Index