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>

index | next in thread | previous in thread | raw e-mail


Hi

On Sun, 1 Mar 2009, Rafal Jaworowski wrote:
> So did adjusting the LAW number help with the hang your previously reported, 
> or was it something else?

Yes, it help. With incorrect LAW number kernel hang on ocpbus0.

>>>> Is it normal that "decrementer" frequency is 0 ?
>>> 
>>> This isn't good, are you sure a proper value is given to decr_config()?
>> 
>> Hmm. With decr_config(0) kernel is booted, but with actual CCB clock 
>> 533000000 kernel silently hang somethere in kdb_init() or "data storage 
>> interrupt" occured.
>
> Please show the DSI trap details, preferrably with back trace from KDB (type 
> '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 
> 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=(533328000/8)

>> uart0: <Non-standard ns8250 class UART with FIFOs> iomem 
>> 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 ocpbus0
> uart0: [FILTER]
> uart1: <16550 or compatible> iomem 0xfef04600-0xfef0460f irq 58 on ocpbus0
> 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 
> value AFAIR.

I change speed to 9600 because with 115200 I get some noise in output 
during uart attach:

ocpbus0: <On-Chip Peripherals bus> on nexus0
ocpbus0: PORDEVSR=82b9ea67, PORDEVSR2=8f000079
]X.rхɑ́UIQݥѡ%=™ᙕŁၽ5)m%1QIu5)W遙сѕ5)Յ遍ͽݱť5)uart1: 
<Non-standard ns8250 class UART with FIFOs> iomem 0xfef04600-0xfef0460f 
irq 58 on ocpbus0
uart1: [FILTER]
uart1: fast interrupt

> I tend to think the source of these problems is misconfigured 
> decrementer/time base on your system: among other things, the delay routine 
> does not work properly and uart(4) probing and baud rate calculation code 
> gets confused (of course, there will also be other serious problems if time 
> 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  = 520077312 (495 MB)
Physical memory chunk(s):
0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages)
avail memory = 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=82b9ea67, PORDEVSR2=8f000079


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  = 520077312 (495 MB)
Physical memory chunk(s):
0x01000000 - 0x1f713fff, 510738432 bytes (124692 pages)
avail memory = 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=82b9ea67, PORDEVSR2=8f000079
]X.rхɑ́UIQݥѡ%=™ᙕŁၽ5)m%1QIu5)W遙сѕ5)Յ遍ͽݱť5)uart1: 
<Non-standard ns8250 class UART with FIFOs> iomem 0xfef04600-0xfef0460f 
irq 58 on ocpbus0
uart1: [FILTER]
uart1: fast interrupt
lbc0: <Freescale MPC85xx Local Bus Controller> iomem 0xfef05000-0xfef05fff 
on ocpbus0
Wiring VA=f8000000 to PA=f8000000 (size=400000), using TLB1[2]
tsec0: <Enhanced Three-Speed Ethernet Controller> iomem 
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, 
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() 
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=RB_VERBOSE|RB_SERIAL|RB_MULTIPLE
The rest is unchanged. Is it OK? Or something else required?


--
home | help

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