Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Mar 2009 19:04:41 +0300 (MSK)
From:      Aleksey V Fedorov <alexf@vsi.ru>
To:        Rafal Jaworowski <raj@semihalf.com>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: boot process
Message-ID:  <Pine.GSO.4.62.0903011830230.4870@serv1>
In-Reply-To: <3727B986-849F-48D4-9227-8D36E2A51BA0@semihalf.com>
References:  <Pine.GSO.4.62.0902212141241.25932@serv1> <49A2704F.4060703@semihalf.com> <Pine.GSO.4.62.0902241839390.12361@serv1> <49A42369.600@freebsd.org> <Pine.GSO.4.62.0902241944380.12361@serv1> <49A511E5.1010705@semihalf.com> <Pine.GSO.4.62.0902262112580.21452@serv1> <49A7DBD7.7010103@semihalf.com> <Pine.GSO.4.62.0902271806250.12296@serv1> <49A81358.3080309@semihalf.com> <Pine.GSO.4.62.0902281936490.28394@serv1> <3727B986-849F-48D4-9227-8D36E2A51BA0@semihalf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  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: <Non-standard ns8250 class UART with FIFOs> 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-Chip Peripherals bus> 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
<Non-standard ns8250 class UART with FIFOs> 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<EMCP>
real memory  =3D 520077312 (495 MB)
Physical memory chunk(s):
0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages)
avail memory =3D 508583936 (485 MB)
random: <entropy source, Software, Yarrow>
mem: <memory>
nfslock: pseudo-device
null: <null device, zero device>
nexus0: <MPC85xx Nexus device>
ocpbus0: <On-Chip Peripherals bus> 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<EMCP>
real memory  =3D 520077312 (495 MB)
Physical memory chunk(s):
0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages)
avail memory =3D 508583936 (485 MB)
random: <entropy source, Software, Yarrow>
mem: <memory>
nfslock: pseudo-device
null: <null device, zero device>
nexus0: <MPC85xx Nexus device>
ocpbus0: <On-Chip Peripherals bus> 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
<Non-standard ns8250 class UART with FIFOs> iomem 0xfef04600-0xfef0460f=20
irq 58 on ocpbus0
uart1: [FILTER]
uart1: fast interrupt
lbc0: <Freescale MPC85xx Local Bus Controller> iomem 0xfef05000-0xfef05fff=
=20
on ocpbus0
Wiring VA=3Df8000000 to PA=3Df8000000 (size=3D400000), using TLB1[2]
tsec0: <Enhanced Three-Speed Ethernet Controller> iomem=20
0xfef24000-0xfef24fff irq 45,46,50 on ocpbus0
miibus0: <MII bus> on tsec0
rgephy0: <RTL8169S/8110S/8211B media interface> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.62.0903011830230.4870>