Booting FreeBSD on MPC8540 eval board

Jacques Fourie jacques.fourie at gmail.com
Thu Mar 13 08:38:44 UTC 2008


On Wed, Mar 12, 2008 at 5:43 PM, Rafal Jaworowski <raj at semihalf.com> wrote:
>
> Jacques Fourie wrote:
>  >
>  > I'm trying to get FreeBSD current (checked out the sources yesterday)
>  > to boot on a Freescale MPC8540 evaluation board. After installing a
>  > u-boot snapshot that has the u-boot API used by FreeBSD's ubldr I can
>  > load a FreeBSD kernel but the last message I see on the console is
>  > "Kernel entry at 0x1000100 ...". I have used the default MPC85XX
>  > kernel configuration file when compiling the FreeBSD kernel. For
>  > u-boot I added CONFIG_API and CFG_CMD_ELF to
>  > include/configs/MPC8540EVAL.h
>  >
>  > Unfortunately my debugging setup is not as complete as I would like it
>  > to be - struggling to get the CodeWarrior USB Tap working - so
>  > debugging this problem is a bit difficult at the moment. Is the kernel
>  > console support working for this platform?
>  >
>
>  Before booting the kernel you need to set your console address in FreeBSD
>  loader. I'm not sure which UART port is actually used on the MC8540EVAL, but
>  one of the following should work:
>
>  set hw.uart.console=mm:0xfef04500
>  set hw.uart.console=mm:0xfef04600
>
>  Rafal
>
Thanks - 'set hw.uart.console=mm:0xfef04500' fixed the console output for me.
>From the console output I can see that miibus_probe() is failing for
all three ethernet devices.

Here is the console output :

Kernel entry at 0x1000100 ...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
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 #3: Wed Mar 12 14:47:16 SAST 2008
    jacques at jf70.test.com:/usr/obj/powerpc/usr/home/jacques/fbsd8_src/usr/src/sys/MPC85XX
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "decrementer" frequency 33000000 Hz quality 0
cpu0: Freescale e500v1 core revision 2.0
cpu0: HID0 80004000<EMCP,TBEN>
real memory  = 251658240 (240 MB)
avail memory = 245501952 (234 MB)
nexus0: <MPC85xx Nexus device>
ocpbus0: <On-Chip Peripherals bus> on nexus0
uart0: <16550 or compatible> iomem 0xfef04500-0xfef0450f irq 58 on ocpbus0
uart0: [FILTER]
uart0: console (115384,n,8,1)
uart1: <16550 or compatible> iomem 0xfef04600-0xfef0460f irq 58 on ocpbus0
uart1: [FILTER]
tsec0: <Three-Speed Ethernet Controller> iomem 0xfef24000-0xfef24fff
irq 45,46,50 on ocpbus0
tsec0: MII failed to find PHY!
device_attach: tsec0 attach returned 6
tsec1: <Three-Speed Ethernet Controller> iomem 0xfef25000-0xfef25fff
irq 51,52,56 on ocpbus0
tsec1: MII failed to find PHY!
device_attach: tsec1 attach returned 6
tsec2: <Three-Speed Ethernet Controller> iomem 0xfef26000-0xfef26fff
irq 47,48,49 on ocpbus0
tsec2: MII failed to find PHY!
device_attach: tsec2 attach returned 6
openpic0: <OpenPIC Interrupt Controller> iomem 0xfef40000-0xfef600b3 on ocpbus0
Timecounters tick every 10.000 msec
bootpc_init: wired to interface 'tsec1'
panic: bootpc_init: Could not find interface specified by BOOTP_WIRED_TO: tsec1

Here is some output obtained from uboot :

MPC8540EVAL=> mii device
MII devices: 'TSEC0' 'TSEC1' 'FEC'
Current device: 'TSEC0'
MPC8540EVAL=> mii info
PHY 0x02: OUI = 0x04DE, Model = 0x0E, Rev = 0x02,  10baseT, HDX
PHY 0x04: OUI = 0x5043, Model = 0x06, Rev = 0x02, 100baseT, FDX
PHY 0x07: OUI = 0x5043, Model = 0x06, Rev = 0x02,  10baseT, HDX
PHY 0x1F: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
MPC8540EVAL=>
PHY 0x02: OUI = 0x04DE, Model = 0x0E, Rev = 0x02,  10baseT, HDX
PHY 0x04: OUI = 0x5043, Model = 0x06, Rev = 0x02, 100baseT, FDX
PHY 0x07: OUI = 0x5043, Model = 0x06, Rev = 0x02,  10baseT, HDX
PHY 0x1F: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX

Do I need some additional mods in the miibus code that is not in CVS?

Jacques


More information about the freebsd-embedded mailing list