Subject: Re: PB2400 XFree86 16bpp
To: Martijn van Buul <pino@dohd.org>
From: Louis Guillaume <lguillaume@berklee.edu>
List: port-macppc
Date: 04/30/2002 14:28:15
... From previous dialogue on the port-macppc@netbsd.org mailing list. 
I'm copying this to the xpert@xfree86.org list since it is relevant 
there as well. Hopefully it's all legible.

Martijn van Buul writes:

> Louis Guillaume wrote:


>> Martijn van Buul writes: 


>>> Louis Guillaume wrote:  


>>>> When trying to compile the XFree86 4.2 sources I got some compile failures
>>>> and the thing just didn't work at all. Unfortunately I've lost the failure
>>>> messages, but I still have the installation logs with the errors on them.
>>>> The compile failures all had to do with "compile.h", I believe (would have
>>>> to look it up if anyone is interested.) 


>>> 
>>> 
>>> Did you use the XFree86 source in the NetBSD 'xsrc' package? There's a patch
>>> in the macppc section of the netbsd ftp site which you'll probably need
>>> to apply afterwards.
>>> 
>>> After applying that patch, please see
>>> 
>>> xfree/xc/programs/Xserver/hw/xfree86/os-support/bus/macppcPci.c
>>> 
>>> You will need to change it (in ppcPciInit), as it is currently hard-wired to
>>> use the UniNorth PCI bridge - while you will probably need the Bandit one.

 >>>

>>Martin,
>>
>>I am having trouble finding the patch on the NetBSD ftp server. I've 
>>looked in the /pub/NetBSD/NetBSD-1.5.2 and -current directories and find 
>>no patches. The closest thing I find is a file named ppcPci.c and it 
>>doesn't seem to have much reference to the UniNorth or Bandit bridges.
>>



> 
> You need
> 
> ftp://ftp.netbsd.org/pub/NetBSD/arch/macppc/X-4.2.0-current/xf42.diff.
> 
> This is a diff against the current 'xsrc' set. 
> 
> Take a look at the patch before you apply it; it should be pretty obvious
> what to change. See the patch, around line 196. (Esp. 201 and 202)
> 
> 


Thanks very much for your response. I hope you had a good vacation (or 
are still having!)

I checked out the xsrc set from /cvsroot and applied the patch. From 
what I could tell I fixed the appropriate lines in the macppcPci.c to 
use the Bandit pci bridge.

I had to fix a typo in one of the freetype2 headers, and then everything 
compiled and installed ok. Then...

$XFree86 -configure

...which produced an XF86Config.new. Then I ran XFree86 against that 
config file. Here's the output...
################################################################
################################################################

XFree86 Version 4.2.0 / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 23 January 2002
	If the server is older than 6-12 months, or if your card is
	newer than the above date, look for a newer version before
	reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: NetBSD/macppc 1.5ZC [ELF] The NetBSD Foundation, 
Inc.
Markers: (--) probed, (**) from config file, (==) default setting,
          (++) from command line, (!!) notice, (II) informational,
          (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Tue Apr 30 00:09:28 2002
(++) Using config file: "/root/XF86Config.new"
(==) ServerLayout "XFree86 Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(==) Keyboard: CustomKeycode disabled
(**) FontPath set to 
"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/"
(**) RgbPath set to "/usr/X11R6/lib/X11/rgb"
(--) Using wscons driver
(II) PCI: PCI scan (all values are in hex)
(II) PCI: 00:0b:0: chip 106b,0001 card 0000,0000 rev 03 class 06,00,00 
hdr 00
(II) PCI: 00:10:0: chip 106b,0007 card 0000,0000 rev 01 class ff,00,00 
hdr 00
(II) PCI: 00:11:0: chip 102c,00e0 card 0000,0000 rev 45 class 03,00,00 
hdr 00
(II) PCI: 00:13:0: chip 104c,ac12 card fffc,ffff rev 04 class 06,07,00 
hdr 82
(II) PCI: 00:13:1: chip 104c,ac12 card fffc,ffff rev 04 class 06,07,00 
hdr 82
(II) PCI: End of PCI scan
(II) Host-to-PCI bridge:
(II) Bus 0: bridge is at (0:11:0), (-1,0,0), BCTRL: 0x08 (VGA_EN is set)
(II) Bus 0 I/O range:
	[0] -1	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 0 non-prefetchable memory range:
	[0] -1	0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 0 prefetchable memory range:
	[0] -1	0x00000000 - 0xffffffff (0x0) MX[B]
(--) PCI:*(0:17:0) C&T 65550 rev 69, Mem @ 0x81000000/24, BIOS @ 
0x80840000/18
(II) Addressable bus resource ranges are
	[0] -1	0x00000000 - 0xffffffff (0x0) MX[B]
	[1] -1	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) OS-reported resource ranges:
	[0] -1	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0x00000000 - 0x00000000 (0x1) MX[B]
	[2] -1	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[3] -1	0x00000000 - 0x00000000 (0x1) IX[B]
(II) Active PCI resource ranges:
	[0] -1	0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
	[1] -1	0x80840000 - 0x8087ffff (0x40000) MX[B](B)
	[2] -1	0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
(II) Active PCI resource ranges after removing overlaps:
	[0] -1	0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
	[1] -1	0x80840000 - 0x8087ffff (0x40000) MX[B](B)
	[2] -1	0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
(II) OS-reported resource ranges after removing overlaps with PCI:
	[0] -1	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0x00000000 - 0x00000000 (0x1) MX[B]
	[2] -1	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[3] -1	0x00000000 - 0x00000000 (0x1) IX[B]
(II) All system resource ranges:
	[0] -1	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0x00000000 - 0x00000000 (0x1) MX[B]
	[2] -1	0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
	[3] -1	0x80840000 - 0x8087ffff (0x40000) MX[B](B)
	[4] -1	0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
	[5] -1	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[6] -1	0x00000000 - 0x00000000 (0x1) IX[B]
(II) ATI: ATI driver (version 6.4.8) for chipsets: ati
(II) R128: Driver for ATI Rage 128 chipsets: ATI Rage 128 RE (PCI),
	ATI Rage 128 RF (AGP), ATI Rage 128 RG (AGP), ATI Rage 128 RK (PCI),
	ATI Rage 128 RL (AGP), ATI Rage 128 SM (AGP),
	ATI Rage 128 Pro PD (PCI), ATI Rage 128 Pro PF (AGP),
	ATI Rage 128 Pro PP (PCI), ATI Rage 128 Pro PR (PCI),
	ATI Rage 128 Pro ULTRA TF (AGP), ATI Rage 128 Pro ULTRA TL (AGP),
	ATI Rage 128 Pro ULTRA TR (AGP), ATI Rage 128 Mobility LE (PCI),
	ATI Rage 128 Mobility LF (AGP), ATI Rage 128 Mobility MF (AGP),
	ATI Rage 128 Mobility ML (AGP)
(II) RADEON: Driver for ATI Radeon chipsets: ATI Radeon QD (AGP),
	ATI Radeon QE (AGP), ATI Radeon QF (AGP), ATI Radeon QG (AGP),
	ATI Radeon VE QY (AGP), ATI Radeon VE QZ (AGP),
	ATI Radeon Mobility LW (AGP), ATI Radeon Mobility LY (AGP),
	ATI Radeon Mobility LZ (AGP), ATI Radeon 8500 QL (AGP),
	ATI Radeon 8500 QN (AGP), ATI Radeon 8500 QO (AGP),
	ATI Radeon 8500 Ql (AGP), ATI Radeon 8500 BB (AGP),
	ATI Radeon 7500 QW (AGP)
(II) CIRRUS: driver for Cirrus chipsets: CLGD5430, CLGD5434-4, CLGD5434-8,
	CLGD5436, CLGD5446, CLGD5480, CL-GD5462, CL-GD5464, CL-GD5464BD,
	CL-GD5465, CL-GD7548
(II) MGA: driver for Matrox chipsets: mga2064w, mga1064sg, mga2164w,
	mga2164w AGP, mgag100, mgag100 PCI, mgag200, mgag200 PCI, mgag400,
	mgag550
(II) GLINT: driver for 3Dlabs chipsets: gamma, gamma2, ti_pm2, ti_pm, r4,
	pm4, pm3, pm2v, pm2, pm, 300sx, 500tx, mx, delta
(II) S3: driver (version 0.3.5 for S3 chipset: 964-0, 964-1, 968,
	Trio32/64, Aurora64V+
(II) S3VIRGE: driver (version 1.8.3) for S3 ViRGE chipsets: virge, 86C325,
	virge vx, 86C988, virge dx, virge gx, 86C375, 86C385, virge gx2,
	86C357, virge mx, 86C260, virge mx+, 86C280, trio 3d, 86C365,
	trio 3d/2x, 86C362, 86C368
(II) SIS: driver for SiS chipsets: SIS5597, SIS530, SIS6326, SIS300,
	SIS630, SIS540
(II) SAVAGE: driver (version 1.1.20) for S3 Savage chipsets: Savage4,
	Savage3D, Savage3D-MV, Savage2000, Savage/MX-MV, Savage/MX,
	Savage/IX-MV, Savage/IX, ProSavage PM133, ProSavage KM133,
	ProSavage PN133, ProSavage KN133, SuperSavage/MX 128,
	SuperSavage/MX 64, SuperSavage/MX 64C, SuperSavage/IX 128,
	SuperSavage/IX 128, SuperSavage/IX 64, SuperSavage/IX 64,
	SuperSavage/IXC 64, SuperSavage/IXC 64
(II) TRIDENT: driver for Trident chipsets: tvga9000, tvga9000i, tvga8900c,
	tvga8900d, tvga9200cxr, tgui9400cxi, cyber9320, cyber9388, cyber9397,
	cyber9397dvd, cyber9520, cyber9525dvd, cyberblade/e4, tgui9420dgi,
	tgui9440agi, tgui9660, tgui9680, providia9682, providia9685,
	cyber9382, cyber9385, 3dimage975, 3dimage985, blade3d, cyberbladei7,
	cyberbladei7d, cyberbladei1, cyberbladei1d, cyberbladeAi1,
	cyberbladeAi1d, cyberbladeXPm/8, cyberbladeXPm/16, cyberbladeXPAi1
(II) CHIPS: Driver for Chips and Technologies chipsets: ct65520, ct65525,
	ct65530, ct65535, ct65540, ct65545, ct65546, ct65548, ct65550,
	ct65554, ct65555, ct68554, ct69000, ct69030, ct64200, ct64300
(II) TDFX: Driver for 3dfx Banshee/Voodoo3 chipsets: 3dfx Banshee,
	3dfx Voodoo3, 3dfx Voodoo5
(II) FBDEV: driver for framebuffer: fbdev, afb
(II) VGA: Generic VGA driver (version 4.0) for chipsets: generic
(II) Primary Device is: PCI 00:11:0
(--) Chipset ct65550 found
(II) resource ranges after xf86ClaimFixedResources() call:
	[0] -1	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0x00000000 - 0x00000000 (0x1) MX[B]
	[2] -1	0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
	[3] -1	0x80840000 - 0x8087ffff (0x40000) MX[B](B)
	[4] -1	0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
	[5] -1	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[6] -1	0x00000000 - 0x00000000 (0x1) IX[B]
(II) resource ranges after probing:
	[0] -1	0xffffffff - 0xffffffff (0x1) MX[B]
	[1] -1	0x00000000 - 0x00000000 (0x1) MX[B]
	[2] -1	0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
	[3] -1	0x80840000 - 0x8087ffff (0x40000) MX[B](B)
	[4] -1	0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
	[5] 0	0x000a0000 - 0x000affff (0x10000) MS[B]
	[6] 0	0x000b0000 - 0x000b7fff (0x8000) MS[B]
	[7] 0	0x000b8000 - 0x000bffff (0x8000) MS[B]
	[8] -1	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[9] -1	0x00000000 - 0x00000000 (0x1) IX[B]
	[10] 0	0x000003b0 - 0x000003bb (0xc) IS[B]
	[11] 0	0x000003c0 - 0x000003df (0x20) IS[B]
(II) Setting vga for screen 0.
(II) CHIPS(0): initializing int10

Fatal server error:
xf86MapVidMem: could not mmap screen [s=20000,a=a0000] (Invalid argument)


When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file "/var/log/XFree86.0.log".
Please report problems to xfree86@xfree86.org.

################################################################
################################################################

Please help me out if you can. I'd love to get this working and submit 
any changes I made back into the list. Thanks,

Louis