Date: Wed, 02 May 2007 14:34:04 +0100 From: "Bruce M. Simpson" <bms@incunabulum.net> To: freebsd-mips@FreeBSD.org Cc: gonzo@FreeBSD.org Subject: FreeBSD on Broadcom Sentry5 devices Message-ID: <4638934C.50401@incunabulum.net>
next in thread | raw e-mail | index | archive | help
Hi all, I'd like to announce that a FreeBSD kernel is able to boot to mountroot on real MIPS32 hardware: a Netgear WGT634U. The Linksys WRT54G uses the A0 rev of the BCM4710 which is notorious for containing some CPU bugs requiring gcc toolchain patches to workaround. The WGT634U uses a more recent Sentry5 spin which does not have these issues. The Broadcom CFE firmware is able to load a FreeBSD ELF kernel via TFTP with some tweaks to the linker script. There is basic support code in NetBSD for CFE which may be worth looking at. What needs to be done to support this hardware is to port Broadcom's Linux support package for the Sonics SiliconBackplane. The code looks like it was originally written for a BSD, so this shouldn't be too complex. This stuff is nowhere ready for prime time yet -- and I would like to iron a few things out before committing to p4. Board level reset is very simple -- write to a register. Serial I/O uses uart(4); it is currently kludged to use the hard mapped physical addresses on this board just as the MALTA target does. Oh, and the clock needs to be calibrated properly; DELAY() is currently stubbed out, otherwise you get lots of divide-by-zero errors. This is the output from a Netgear WGT634U access point: CFE version 1.0.34 for BCM95365R (32bit,SP,LE) Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux) Copyright (C) 2000,2001,2002 Broadcom Corporation. Add MAC client version(DNI). Initializing Arena. Initializing Devices. et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller CPU type 0x29007: 200MHz Total memory: 0x2000000 bytes (32MB) Total memory used by CFE: 0x81BB1280 - 0x82000000 (4517248) Initialized Data: 0x81BB1280 - 0x81BB3E90 (11280) BSS Area: 0x81BB3E90 - 0x81BB45D0 (1856) Local Heap: 0x81BB45D0 - 0x81FB45D0 (4194304) Stack Area: 0x81FB45D0 - 0x81FB65D0 (8192) Text (code) segment: 0x81FB65E0 - 0x81FFFFB0 (301520) Boot area (physical): 0x01B70000 - 0x01BB0000 Relocation Factor: I:E23B65E0 - D:01BB0280 configure vlans ***************************************************************** *********************** VLAN Driver initial ******************** ***************************************************************** Process LAN port(2-5) vlan Architecture... SUCCESS: trying to create VLAN 0 for switch SUCCESS: trying to add LAN port Process WAN port(2-5) vlan Architecture... SUCCESS: trying to create VLAN 0 for switch SUCCESS: trying to add WAN port SUCCESS: enable ports success configure vlans...done Device eth0: hwaddr 00-0F-B5-3D-52-90, ipaddr 192.168.123.123, mask not set gateway not set, nameserver not set CFE> boot -elf 192.168.123.16:/kernel Loader:elf Filesys:tftp Dev:eth0 File:192.168.123.16:/kernel Options:(null) *************************** **** MAC Client V1.0 **** *************************** et0macaddr value :flag =0 value=00-0f-b5-3d-52-90 et1macaddr value :flag =0 value=00-0f-b5-3d-52-91 MAC exist at least one system ethernet mac exist and not default.... Skip mac client process..... Loading: 0x80001000/2014752 0x801eef00/107428 0x802092a4/96380 Entry at 0x80001000 Closing network. et0: link down Starting program at 0x80001000 entry: mips_init() picache_stride = 4096 picache_loopcount = 2 pdcache_stride = 2048 pdcache_loopcount = 2 mips_cache_ops.mco_pdcache_wbinv_all == 0x8018a7d0 Exception vector at 80000000 almost out of space Kernel page table maps 16384 4K pages and is 511K KDB: debugger backends: ddb KDB: current backend: ddb MIPS32 clock: 10000000 Hz Copyright (c) 1992-2007 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 7.0-CURRENT #40: Wed May 2 14:11:58 BST 2007 bms@anglepoise.lon.incunabulum.net:/usr/obj/mips/usr/home/bms/p4/mips2/sys/SENTRY5 cpu0: Broadcom processor v7.144 MMU: Standard TLB, 32 entries L1 i-cache: 2 ways of 256 sets, 16 bytes per line L1 d-cache: 2 ways of 256 sets, 16 bytes per line clock0: <Generic MIPS32 ticker> on motherboard clock0: [FILTER] Timecounter "MIPS32" frequency 10000000 Hz quality 800 Timecounters tick every 10.000 msec Manual root filesystem specification: <fstype>:<device> Mount <device> using filesystem <fstype> eg. ufs:/dev/da0a ? List valid disk boot devices <empty line> Abort manual input mountroot> db> call cpu_reset Resetting...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4638934C.50401>