MACH64: Caught signal 11 (Segmentation fault)
agd5f at yahoo.com
Tue Apr 18 21:06:54 UTC 2023
Make sure the PCI register BAR is properly mapped in the ddx. Those old ddxes required direct access to the hardware in the X server.
On Monday, April 17, 2023 at 04:18:16 PM EDT, Morgan Wesström <xorg at xn--wesstrm-f1a.se> wrote:
This is a small hobby project of mine so it's no big deal if it can't be resolved but I don't mind digging a little deeper into it myself if I can only get a few pointers.
I've been a Gentoo Linux user for 15+ years so I'm fairly confident in compiling things in various ways but I'm no C programmer and definitely don't have the deep technical knowledge needed to create device drivers.
With that said, I needed a challenge and went on to install Gentoo on the oldest machine still in my possession - a 22 year old laptop with a 32-bit Pentium III Celeron. It's quite restricted hardware wise (maxed out RAM is 196MB) but I got it running. I even made Xorg run with the generic fbdev driver but was hoping to unlock at least some 2D acceleration.
The video card is an ATI Rage Mobility AGP 2x Series (1002:4c4d) and after some digging I understood that this was a mach64 card. Driver is included and activated in my kernel (atyfb, Linux 6.1.19) but I also needed xf86-video-mach64 for Xorg. Unfortunately that driver seems to have been ripped out of the main tree around 2010 or so but apparently it's still maintained and version 6.9.7 was released last year.
I downloaded it from https://gitlab.freedesktop.org/xorg/driver/xf86-video-mach64.git, compiled and installed it but X segfaults with a signal 11 when I try to use it. I've compiled it with debug symbols so I can get a proper backtrace but after that I'm stuck. I don't know what the driver is doing or what it's supposed to do at this point.
Here's some info from the debugger:
Program received signal SIGSEGV, Segmentation fault.
ATIMach64Detect (Chip=77, ChipType=19533, pATI=0x1c74110) at atiprobe.c:143
143 bus_cntl = inr(BUS_CNTL);
#0 ATIMach64Detect (Chip=77, ChipType=19533, pATI=0x1c74110) at atiprobe.c:143
#1 ATIMach64Probe (Chip=77, pVideo=0x1c7dbe0, pATI=0x1c74110) at atiprobe.c:278
#2 ATIMach64ProbeIO (pVideo=0x1c7dbe0, pATI=0x1c74110) at atiprobe.c:454
#3 0xb75639c7 in ATIPreInit (pScreenInfo=0x1c83940, flags=0) at atipreinit.c:644
#4 0x00607ab7 in InitOutput (pScreenInfo=pScreenInfo at entry=0x707300 <screenInfo>, argc=argc at entry=1, argv=argv at entry=0xbfa90e44) at ../xorg-server-21.1.8/hw/xfree86/common/xf86Init.c:478
#5 0x004fd765 in dix_main (argc=<optimized out>, argc at entry=1, argv=<optimized out>, argv at entry=0xbfa90e44, envp=<optimized out>, envp at entry=0xbfa90e4c) at ../xorg-server-21.1.8/dix/main.c:190
#6 0x004ba84e in main (argc=1, argv=0xbfa90e44, envp=0xbfa90e4c) at ../xorg-server-21.1.8/dix/stubmain.c:34
140 #endif /* AVOID_CPIO */
142 /* Make sure any Mach64 is not in some weird state */
143 bus_cntl = inr(BUS_CNTL);
144 if (Chip < ATI_CHIP_264VTB)
146 (bus_cntl & ~(BUS_HOST_ERR_INT_EN | BUS_FIFO_ERR_INT_EN)) |
147 (BUS_HOST_ERR_INT | BUS_FIFO_ERR_INT));
Can anything be deduced from this? What other information is of interest? Any suggestions are welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg-driver-ati