From owner-freebsd-ppc@FreeBSD.ORG Sun Mar 1 16:04:45 2009 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 6FD701065673 for ; Sun, 1 Mar 2009 16:04:45 +0000 (UTC) (envelope-from alexf@vsi.ru) Received: from serv4.vsi.ru (serv4.vsi.ru [80.82.32.19]) by mx1.freebsd.org (Postfix) with ESMTP id F030A8FC0A for ; Sun, 1 Mar 2009 16:04:44 +0000 (UTC) (envelope-from alexf@vsi.ru) Received: from serv1 (serv1.vsi.ru [80.82.32.12]) by serv4.vsi.ru (8.13.8+Sun/8.13.8) with ESMTP id n21G4fQB002740; Sun, 1 Mar 2009 19:04:41 +0300 (MSK) Date: Sun, 1 Mar 2009 19:04:41 +0300 (MSK) From: Aleksey V Fedorov X-X-Sender: alexf@serv1 To: Rafal Jaworowski In-Reply-To: <3727B986-849F-48D4-9227-8D36E2A51BA0@semihalf.com> Message-ID: References: <49A2704F.4060703@semihalf.com> <49A42369.600@freebsd.org> <49A511E5.1010705@semihalf.com> <49A7DBD7.7010103@semihalf.com> <49A81358.3080309@semihalf.com> <3727B986-849F-48D4-9227-8D36E2A51BA0@semihalf.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-758783491-1235923481=:4870" Cc: freebsd-ppc@freebsd.org Subject: Re: boot process 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: Sun, 01 Mar 2009 16:04:45 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-758783491-1235923481=:4870 Content-Type: TEXT/PLAIN; charset=KOI8-R; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi On Sun, 1 Mar 2009, Rafal Jaworowski wrote: > So did adjusting the LAW number help with the hang your previously report= ed,=20 > or was it something else? Yes, it help. With incorrect LAW number kernel hang on ocpbus0. >>>> Is it normal that "decrementer" frequency is 0 ? >>>=20 >>> This isn't good, are you sure a proper value is given to decr_config()? >>=20 >> Hmm. With decr_config(0) kernel is booted, but with actual CCB clock=20 >> 533000000 kernel silently hang somethere in kdb_init() or "data storage= =20 >> interrupt" occured. > > Please show the DSI trap details, preferrably with back trace from KDB (t= ype=20 > 'tr' if it breaks into the debugger prompt). Debugger not initialized at this point. > You shouldn't use CCB clock directly. In current setup the decrementer is= =20 > synchronized with Time Base, which is updated every 8 CCB ticks, hence: > > decr_config(bootinfo->bi_bus_clk / 8); Yes of course. I call decr_config with 66666000=3D(533328000/8) >> uart0: iomem=20 >> 0xfef04500-0xfef0450f irq 58 on ocpbus0 > > The uart type recognized seems bogus, it should be a regular 16550: > > uart0: <16550 or compatible> iomem 0xfef04500-0xfef0450f irq 58 on ocpbus= 0 > uart0: [FILTER] > uart1: <16550 or compatible> iomem 0xfef04600-0xfef0460f irq 58 on ocpbus= 0 > uart1: [FILTER] > uart1: console (115223,n,8,1) > >> uart0: [FILTER] >> uart0: fast interrupt >> uart0: console (9600,n,8,1) > > Is 9600 the real console speed? In your original Linux log there was 115k= =20 > value AFAIR. I change speed to 9600 because with 115200 I get some noise in output=20 during uart attach: ocpbus0: on nexus0 ocpbus0: PORDEVSR=3D82b9ea67, PORDEVSR2=3D8f000079 =80=80]X.=93=E2r=BD=B9=B5=CD=D1=85=B9=91=85=C9=91=81=B9=CD=E1=C9=D5=C1=81= =8D=B1=85=CD=CD=81UIQ=81=DD=A5=D1=A1=81%=3D=CD=F9=81=A5=BD=B5=95=B5=81=83= =C2=99=95=99=C1=D1=D5=C1=C1=B5=C1=E1=99=95=99=C1=D1=D5=C1=99=81=A5=C9=C5=81= =D5=E1=81=BD=B9=81=BD=8D=C1=89=D5=CD=C15)=AF=85=C9=D1=C1=E9=81m%1QIu5)W=85= =C9=D1=C1=E9=81=99=85=CD=D1=81=A5=B9=D1=95=C9=C9=D5=C1=D15)=D5=85=C9=D1=C1= =E9=81=8D=BD=B9=CD=BD=B1=95=81=A1=C5=D1=D1=C5=DD=B1=B9=B1=E1=B1=C5=A55)=FFu= art1:=20 iomem 0xfef04600-0xfef0460f=20 irq 58 on ocpbus0 uart1: [FILTER] uart1: fast interrupt > I tend to think the source of these problems is misconfigured=20 > decrementer/time base on your system: among other things, the delay routi= ne=20 > does not work properly and uart(4) probing and baud rate calculation code= =20 > gets confused (of course, there will also be other serious problems if ti= me=20 > counting does not work properly). With smaller values in decr_init() kernel boot process is longer. For example with 666660 I get only: setting up elf image... OK jumping to kernel code G With 66666: setting up elf image... OK jumping to kernel code GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb L1 D-cache enabled L1 I-cache enabled Copyright (c) 1992-2009 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 #33: Sun Mar 1 18:55:14 MSK 2009 root@servd.vsi.ru:/usr/obj/powerpc/usr/current/src/sys/MPC85XX WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Timecounter "decrementer" frequency 66666 Hz quality 0 cpu0: Freescale e500v2 core revision 2.0 cpu0: HID0 80000000 real memory =3D 520077312 (495 MB) Physical memory chunk(s): 0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages) avail memory =3D 508583936 (485 MB) random: mem: nfslock: pseudo-device null: nexus0: ocpbus0: on nexus0 ocpbus0: PORDEVSR=3D82b9ea67, PORDEVSR2=3D8f000079 With 6666: setting up elf image... OK jumping to kernel code GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb L1 D-cache enabled L1 I-cache enabled Copyright (c) 1992-2009 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 #35: Sun Mar 1 18:58:02 MSK 2009 root@servd.vsi.ru:/usr/obj/powerpc/usr/current/src/sys/MPC85XX WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Timecounter "decrementer" frequency 6666 Hz quality 0 cpu0: Freescale e500v2 core revision 2.0 cpu0: HID0 80000000 real memory =3D 520077312 (495 MB) Physical memory chunk(s): 0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages) avail memory =3D 508583936 (485 MB) random: mem: nfslock: pseudo-device null: nexus0: ocpbus0: on nexus0 ocpbus0: PORDEVSR=3D82b9ea67, PORDEVSR2=3D8f000079 =80=80]X.=93=E2r=BD=B9=B5=CD=D1=85=B9=91=85=C9=91=81=B9=CD=E1=C9=D5=C1=81= =8D=B1=85=CD=CD=81UIQ=81=DD=A5=D1=A1=81%=3D=CD=F9=81=A5=BD=B5=95=B5=81=83= =C2=99=95=99=C1=D1=D5=C1=C1=B5=C1=E1=99=95=99=C1=D1=D5=C1=99=81=A5=C9=C5=81= =D5=E1=81=BD=B9=81=BD=8D=C1=89=D5=CD=C15)=AF=85=C9=D1=C1=E9=81m%1QIu5)W=85= =C9=D1=C1=E9=81=99=85=CD=D1=81=A5=B9=D1=95=C9=C9=D5=C1=D15)=D5=85=C9=D1=C1= =E9=81=8D=BD=B9=CD=BD=B1=95=81=A1=C5=D1=D1=C5=DD=B1=B9=B1=E1=B1=C5=A55)=FFu= art1:=20 iomem 0xfef04600-0xfef0460f=20 irq 58 on ocpbus0 uart1: [FILTER] uart1: fast interrupt lbc0: iomem 0xfef05000-0xfef05fff= =20 on ocpbus0 Wiring VA=3Df8000000 to PA=3Df8000000 (size=3D400000), using TLB1[2] tsec0: iomem=20 0xfef24000-0xfef24fff irq 45,46,50 on ocpbus0 miibus0: on tsec0 rgephy0: PHY 0 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,=20 1000baseT-FDX, auto With zero kernel completely boots. DECAR filled in decr_init() called from cpu_e500_startup() Until DECAR is filled and decrementer interrupt not enabled decr_config()= =20 value is not significant? At which point cpu_e500_startup() called? Maybe loader(8) make some additional work? I do: - fill __sbss and _bss with zero - put bootinfo after kernel end and fill them - put environment after bootinfo - set boothowto=3DRB_VERBOSE|RB_SERIAL|RB_MULTIPLE The rest is unchanged. Is it OK? Or something else required? -- ---559023410-758783491-1235923481=:4870--