From owner-freebsd-ppc@FreeBSD.ORG Tue Sep 23 17:28:47 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E2A1065676 for ; Tue, 23 Sep 2008 17:28:47 +0000 (UTC) (envelope-from marcotrillo@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 196058FC1D for ; Tue, 23 Sep 2008 17:28:46 +0000 (UTC) (envelope-from marcotrillo@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so2247291wfg.7 for ; Tue, 23 Sep 2008 10:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=SDuwz0X+6lBc8ty8GyD3sj0FsoLdboyKxhFFoUJvdXQ=; b=BAGo76eXRpdTmc0L2i9lW5/WWVQId3ZXHyksEo2pvba3XGjhH98ONXBqAqBkKGdDVV rW87WYYf1ANmb91/jO9fVjT73T3NlhqvgCU77WU+rohUXGyHs1XmarnJD6EpU240bguw n8hoZdqvkBJRw1OJvu/Uewrkn7Rr1Ww1qB2gM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WhPqjJY0msKMAV+qqx/LqNYxflo00kWT0rc1PAvnO1BRN6ZgXOwhGUIJkzYX7J/pK4 DWUDrlFrN/our87JGe4xDk8SCTp5QuseTQqTB6CK0qODiPKNuoIKDFMz5IivIOYckRKT +1aTcMC4IOSTFJN+9jqldM5YGWT9GB9HvD4fQ= Received: by 10.142.164.10 with SMTP id m10mr2107689wfe.117.1222190926682; Tue, 23 Sep 2008 10:28:46 -0700 (PDT) Received: by 10.142.101.13 with HTTP; Tue, 23 Sep 2008 10:28:46 -0700 (PDT) Message-ID: Date: Tue, 23 Sep 2008 19:28:46 +0200 From: "Marco Trillo" To: freebsd-ppc@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: 8.0-current 200809 snapshot CD boot problem 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: Tue, 23 Sep 2008 17:28:47 -0000 Hi, On Tue, Sep 23, 2008 at 6:52 PM, Marco Trillo wrote: > On Tue, Sep 23, 2008 at 12:55 PM, Marco Trillo wrote: >> I tried booting the latest 200809 snapshot CD, from Sep 10, >> (8.0-CURRENT-200809-powerpc-bootonly.iso), on a eMac G4 "USB 2.0" >> (PowerMac6,4). It fails with an "invalid memory access": >> >> Booting [/boot/kernel/kernel] ... >> Kernel entry at 0x100100 ... >> >> Invalid memory access at %SRR0: 00100100 %SRR1: 10003030 >> >> ok >> 0> > > I compiled a -current kernel from the 7.1_BETA installation and tried > to boot it (from the hard disk), but the same error occurs. The > 7.1_BETA kernel always boots fine. Well, I finally have a working 8.0-current kernel! :-) But something weird is going on here: I noticed a difference in the kernel __start address between the working 7.0_BETA kernel (kernel.old) and the broken 8.0-current kernel (kernel): ./boot/kernel.old/kernel: file format elf32-powerpc Disassembly of section .text: 0013d3c0 <__start>: 13d3c0: 39 00 00 00 li r8,0 ./boot/kernel/kernel: file format elf32-powerpc Disassembly of section .text: 00100100 <__start>: 100100: 39 00 00 00 li r8,0 I noticed revision 1.8 of src/sys/conf/ldscript.powerpc was related to this, so I downgraded ldscript.powerpc to revision 1.7 and relinked the kernel. And it works! No more "invalid memory access"! I don't know if this is something weird of my setup. Should I file a PR? The full 8.0-current dmesg is below. Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #1: Tue Sep 23 17:05:10 UTC 2008 mtrillo@emac6:/usr/src/sys/powerpc/compile/GENERIC WARNING: WITNESS option enabled, expect reduced performance. cpu0: Motorola PowerPC 7447A revision 1.1, 1250.00 MHz cpu0: HID0 8450c0bc real memory = 793313280 (756 MB) avail memory = 762892288 (727 MB) kbd0 at kbdmux0 nexus0: unin0: on nexus0 unin0: Version 210 pcib0: on nexus0 pci0: on pcib0 vgapci0: port 0x400-0x4ff mem 0x98000000-0x9fffffff,0x90000000-0x9000ffff irq 48 at device 16.0 on pci0 pcib1: on nexus0 pci1: on pcib1 macio0: mem 0x80000000-0x8007ffff at device 23.0 on pci1 openpic0: mem 0x40000-0x7ffff on macio0 scc0: mem 0x13000-0x13fff,0x8400-0x84ff,0x8500-0x85ff,0x8600-0x86ff,0x8700-0x87ff irq 22,5,6,23,7,8 on macio0 scc0: [FILTER] scc0: [FILTER] uart0: on scc0 uart0: [FILTER] uart1: on scc0 uart1: [FILTER] ata0 mem 0x20000-0x20fff,0x8800-0x88ff irq 24,12 on macio0 ata0: [ITHREAD] ohci0: irq 0 at device 24.0 on pci1 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered ohci1: irq 0 at device 25.0 on pci1 ohci1: [GIANT-LOCKED] ohci1: [ITHREAD] usb1: OHCI version 1.0, legacy support usb1: on ohci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered ohci2: mem 0x80083000-0x80083fff irq 29 at device 26.0 on pci1 ohci2: [GIANT-LOCKED] ohci2: [ITHREAD] usb2: OHCI version 1.0, legacy support usb2: on ohci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered ohci3: mem 0x80082000-0x80082fff irq 63 at device 27.0 on pci1 ohci3: [GIANT-LOCKED] ohci3: [ITHREAD] usb3: OHCI version 1.0 usb3: on ohci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 3 ports with 3 removable, self powered ohci4: mem 0x80081000-0x80081fff irq 63 at device 27.1 on pci1 ohci4: [GIANT-LOCKED] ohci4: [ITHREAD] usb4: OHCI version 1.0 usb4: on ohci4 usb4: USB revision 1.0 uhub4: on usb4 uhub4: 2 ports with 2 removable, self powered ehci0: mem 0x80080000-0x800800ff irq 63 at device 27.2 on pci1 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb5: EHCI version 1.0 usb5: companion controllers, 3 ports each: usb3 usb4 usb5: on ehci0 usb5: USB revision 2.0 uhub5: on usb5 uhub5: 5 ports with 5 removable, self powered pcib2: on nexus0 pci2: on pcib2 ata1: mem 0xf5004000-0xf5007fff irq 39 at device 13.0 on pci2 ata1: [ITHREAD] fwohci0: mem 0xf5000000-0xf5000fff irq 40 at device 14.0 on pci2 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=0) fwohci0: No. of Isochronous channels is 8. fwohci0: EUI64 00:0d:93:ff:fe:57:39:60 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:0d:93:57:39:60 fwe0: Ethernet address: 02:0d:93:57:39:60 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=2, CYCLEMASTER mode gem0: mem 0xf5200000-0xf53fffff irq 41 at device 15.0 on pci2 miibus0: on gem0 bmtphy0: PHY 0 on miibus0 bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto gem0: 10kB RX FIFO, 4kB TX FIFO gem0: Ethernet address: 00:0d:93:57:39:60 gem0: [ITHREAD] sc0: on nexus0 sc0: Unknown <16 virtual consoles, flags=0x300> uhub6: on uhub3 uhub6: 3 ports with 2 removable, bus powered ums0: on uhub6 ums0: 1 buttons. ukbd0: on uhub6 kbd1 at ukbd0 uhid0: on uhub6 Timecounter "decrementer" frequency 41620997 Hz quality 0 Timecounters tick every 10.000 msec firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) acd0: DVDR at ata0-master BIOSPIO ad0: 38166MB at ata1-master BIOSPIO WARNING: WITNESS option enabled, expect reduced performance. acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00 GEOM_LABEL: Label for provider acd0 is iso9660/CDROM. acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00 acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00 acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00 Trying to mount root from ufs:/dev/ad0s4 lock order reversal: 1st 0xe3a000 vfslock (vfslock) @ kern/vfs_subr.c:372 2nd 0xdd9e2c devfs (devfs) @ kern/vfs_lookup.c:432 3rd 0xe39d48 vfslock (vfslock) @ kern/vfs_subr.c:372 KDB: stack backtrace: 0xdebaf848: at kdb_backtrace+0x4c 0xdebaf868: at _witness_debugger+0x3c 0xdebaf888: at witness_checkorder+0x878 0xdebaf8e8: at __lockmgr_args+0x23c 0xdebaf968: at vfs_busy+0x19c 0xdebaf998: at vfs_mount_alloc+0x80 0xdebaf9c8: at vfs_donmount+0xfe0 0xdebafb88: at kernel_mount+0x98 0xdebafbc8: at kernel_vmount+0xdc 0xdebafc18: at vfs_mountroot_try+0x120 0xdebafcd8: at vfs_mountroot+0x424 0xdebafd38: at start_init+0x88 0xdebafd98: at fork_exit+0xf0 0xdebafdc8: at fork_trampoline+0xc lock order reversal: 1st 0xdd99ec ufs (ufs) @ kern/vfs_subr.c:2051 2nd 0xe3a000 vfslock (vfslock) @ kern/vfs_subr.c:372 KDB: stack backtrace: 0xdebaf8c8: at kdb_backtrace+0x4c 0xdebaf8e8: at _witness_debugger+0x3c 0xdebaf908: at witness_checkorder+0x878 0xdebaf968: at __lockmgr_args+0x23c 0xdebaf9e8: at vfs_busy+0x19c 0xdebafa18: at lookup+0x86c 0xdebafaa8: at namei+0x4a8 0xdebafb38: at kern_unlinkat+0x98 0xdebafbf8: at kern_unlink+0x24 0xdebafc18: at vfs_mountroot_try+0x444 0xdebafcd8: at vfs_mountroot+0x424 0xdebafd38: at start_init+0x88 0xdebafd98: at fork_exit+0xf0 0xdebafdc8: at fork_trampoline+0xc lock order reversal: 1st 0xc41048 user map (user map) @ vm/vm_map.c:3115 2nd 0xdd97cc ufs (ufs) @ kern/vfs_subr.c:2051 KDB: stack backtrace: 0xdebaf930: at kdb_backtrace+0x4c 0xdebaf950: at _witness_debugger+0x3c 0xdebaf970: at witness_checkorder+0x878 0xdebaf9d0: at __lockmgr_args+0x23c 0xdebafa50: at ffs_lock+0x9c 0xdebafa80: at VOP_LOCK1_APV+0xec 0xdebafaa0: at _vn_lock+0x84 0xdebafaf0: at vget+0xdc 0xdebafb30: at vnode_pager_lock+0x20c 0xdebafb90: at vm_fault+0x218 0xdebafca0: at trap_pfault+0x128 0xdebafce0: at trap+0x1ac 0xdebafda0: at powerpc_interrupt+0x15c 0xdebafdd0: user ISI trap by 0x1815a04: srr1=0x4000d032 r1=0x7fffdee0 cr=0x24000048 xer=0 ctr=0 Thanks! Marco