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

Re: XFree86 4.1.0: call for help




Michel,

I looked into the situation and found out why its crashing on your
machine.  The vgaHW pointer is not setting the IOBase, so when it tries to
read that it crashes.  Do this in r128_driver.c:

after the hwrec is alloced (vgaHWGetHWRec())

{
	vgaHWPtr hwp;

	vgaHWGetIOBase(hwp);
}

(should probably add vgaHWGetIOBase to the loader symlist also)

This should probably solve your problem.


ani


On Thu, 14 Jun 2001, Michel [iso-8859-1] Dänzer wrote:

>
> Benjamin Herrenschmidt wrote:
> >
> > >
> > >That's the problem, it doesn't work on AGP. outb works but inb segfaults.
> > >
> > >The syscall should only return an iobase for known working busses IMHO.
> > At the
> > >very least, it shouldn't return any for busses known not to work.
> > >
> >
> > That's the case. I mean it should know all busses and does support all 3
> > uninorth busses. Is it called properly for the AGP bus (bus 0) by XFree ?
>
>
> >From current lnx_video.c:
>
>
> 	ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
>
> 	fd = open("/dev/mem", O_RDWR);
> 	if (ioBase == NULL) {
> 		ioBase = (volatile unsigned char *)mmap(0, 0x20000,
> 				PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> 				ioBase_phys);
> /* Should this be fatal or just a warning? */
> #if 0
> 		if (ioBase == MAP_FAILED) {
> 			FatalError(
> 			    "xf86EnableIOPorts: Failed to map iobase (%s)\n",
> 			    strerror(errno));
> 		}
> #endif
> 	}
> 	close(fd);
>
>
> How does that look?
>
>
> > My understanding was that XFree could only handle 1 IO base and so was
> > calling it only for the external PCI bus so that it can work with PCI-based
> > cards.
>
> It asks for bus 0 which is AGP on UniNorth. At least it is on my Pismo.
>
> And even if it did ask for the PCI bus, what would happen if the r128 driver
> tried to access the VGA registers of the Rage128 chip on the AGP bus?
>
>
> > The fact that outb seem to work and inb gives an error is normal, write
> > transactions rarely give an error as they are "posted" (buffered & delayed)
> > by the host bridge. That doesn't mean that your outb actually ended up to
> > the card.
>
> I imagined as much.
>
>
> --
> Earthling Michel Dänzer (MrCooper)    \   Debian GNU/Linux (powerpc) developer
> CS student, Free Software enthusiast   \        XFree86 and DRI project member
>
> ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
>



Reply to: