From owner-freebsd-ppc@FreeBSD.ORG Mon Apr 2 10:50:10 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33FAD106564A for ; Mon, 2 Apr 2012 10:50:10 +0000 (UTC) (envelope-from packages@amiga-hardware.com) Received: from mirkwood.electric-dreams.org (mirkwood.electric-dreams.org [IPv6:2a01:7e00::f03c:91ff:fe93:1cd]) by mx1.freebsd.org (Postfix) with ESMTP id B1B758FC0A for ; Mon, 2 Apr 2012 10:50:09 +0000 (UTC) Received: from nyx.homenet.lan (124-169-239-244.dyn.iinet.net.au [124.169.239.244]) (authenticated bits=0) by mirkwood.electric-dreams.org (8.14.5/8.14.4) with ESMTP id q32Ao2e5029196 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 2 Apr 2012 10:50:07 GMT Message-ID: <4F798459.4000301@amiga-hardware.com> Date: Mon, 02 Apr 2012 18:50:01 +0800 From: Ian Chapman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: freebsd-ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=10.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mirkwood.electric-dreams.org Subject: Newbie - Mac G5 Dual PPC 970 @ 2Ghz X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 10:50:10 -0000 Hi, I have FreeBSD 9.0 installed on a G5 mac using the PPC64 kernel. Initially when doing a portsnap fetch and extract it was taking hours to perform the verify phase. It didn't hang because I could see it decompressing each tarfile but it was taking a long time - I left it running for several hours and in the end I actually commented out the following in portsnap fetch_snapshot_verify() { #while read F; do # if [ "`gunzip -c snap/${F} | ${SHA256} -q`" != ${F} ]; then # echo "snapshot corrupt." # return 1 # fi #done return 0 } which at least allowed me to get ports going although it's not an ideal solution, but the system was running terribly slow. At least spawning processors was horrendously slow. I recompiled the kernel and disabled these options as they seemed to be enabled by default for the 64bit kernel but not the 32bit. #options KDB #Enable the kernel debugger #options DDB #Support DDB #options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones and it appears and feels much faster now. I was wondering if these debugging options are on for a reason or whether it was an oversight? Secondly I noticed the system always booted up with a processor speed of 1333mhz. I searched the archives and found that auto-booting FreeBSD from OF and not using either the OF prompt or the 'Alt' menu brought the system up at the full speed of 2Ghz. I guess that what's powerd doesn't work either - no dynamic frequency scaling for this mac. Anyway the real stumbling block is getting X to work. I did see a similar issue in the archives but wondered if anyone at resolve it. My graphics card is as follows: vgapci0@pci0:0:16:0: class=0x030000 card=0x41521002 chip=0x41521002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc' device = 'RV350 AR [Radeon 9600]' class = display subclass = VGA bar [10] = type Prefetchable Memory, range 32, base 0xb0000000, size 268435456, enabled bar [14] = type I/O Port, range 32, base 0x400, size 256, enabled bar [18] = type Memory, range 32, base 0xa0000000, size 65536, enabled cap 02[58] = AGP v3 8x 4x SBA disabled cap 01[50] = powerspec 2 supports D0 D1 D2 D3 current D0 When starting X with the radeon driver it always segfaults with the following: Caught signal 10 (Bus error: 10). Server aborting Curiously dmesg shows this: pid 17612 (Xorg), uid 0: exited on signal 6 (core dumped) I've tried just about every incarnation of xorg.conf with the radeon driver but the result is always the same. I also installed radeontool from ports and interesting when running it as follows: # radeontool regs RADEON_DAC_CNTL=ac160ff0a000000 Bus error (core dumped) I also downloaded the latest version of radeontool (1.6.3) and it does the following: # ./radeontool regs RADEON_DAC_CNTL ff60c10a RADEON_DAC_EXT_CNTL 00000000 RADEON_DAC_MACRO_CNTL 00000806 RADEON_DAC_CNTL2 00000000 RADEON_TV_DAC_CNTL 00000103 RADEON_DISP_OUTPUT_CNTL 00000000 RADEON_CONFIG_MEMSIZE 08000000 RADEON_AUX_SC_CNTL 00000000 RADEON_CRTC_EXT_CNTL 00000000 RADEON_CRTC_GEN_CNTL 03000200 RADEON_CRTC2_GEN_CNTL 02000200 Bus error (core dumped) So it gets further but the end result is the same. I guess reading a particular register on the graphics card is causing the bus error. I don't believe the hardware is faulty as the system runs perfectly stable in Leopard, no hangs, crashes or graphical artefacts etc. So where can I go from here? Any ideas how I could fix this? -- Ian Chapman.