FreeBSD/mips booting on Sibyte 1250
Neelkanth Natu
neelnatu at yahoo.com
Fri Jun 12 20:10:37 UTC 2009
Hi,
I am now able boot the mips port on a Sibyte 1250 processor on the SWARM
reference platform.
You can find more details about the processor here (including user manual):
http://www.broadcom.com/products/Enterprise-Networking/Communications-Processors/BCM1250
http://www.broadcom.com/products/Enterprise-Networking/Communications-Processors/BCM91250A
Some details about my setup:
- 2GB of memory (cannot use all of it since some is mapped beyond 4GB)
- Kernel is netbooted by the CFE
- Root filesystem comes off a compact flash card connected via parallel ATA
or a USB stick.
- bge ethernet card on the PCI expansion slot for network connectivity
- Using CFE to read and write from the console
Things that still remain to be done are mostly to enable the devices on
the chip (e.g. uart, gigabit ethernet, pcmcia) and also to start using
the second core.
Most of my changes were platform-dependent however I had to make some
changes to:
- busdma (to deal with physical memory beyond the directly mapped window)
- pmap (zero pages through cacheable direct mapped window)
- interrupts (allow masking and unmasking of shared interrupts)
I don't want to keep holding diffs against -current for this, so I was
hoping to get this checked in. How do I go about doing that?
best
Neel
Boot log:
CFE version 1.4.0 for SWARM (64bit,MP,LE,MIPS)
Build Date: Sat May 5 17:32:29 PDT 2007 (neelnatu at sim19)
Copyright (C) 2000,2001,2002,2003,2004,2005 Broadcom Corporation.
Initializing Arena.
Initializing PCI. [normal]
HyperTransport: 400 MHz
PCI bus 0 slot 0/0: SiByte, Inc. BCM1250 PCI Host Bridge (host bridge, rev 0x02)
PCI bus 0 slot 1/0: SiByte, Inc. BCM1250 HyperTransport Host Bridge (host bridge, rev 0x02)
PCI bus 0 slot 5/0: unknown vendor 0x1033 product 0x0035 (USB serial bus, interface 0x10, rev 0x43)
PCI bus 0 slot 5/1: unknown vendor 0x1033 product 0x0035 (USB serial bus, interface 0x10, rev 0x43)
PCI bus 0 slot 5/2: unknown vendor 0x1033 product 0x00e0 (USB serial bus, interface 0x20, rev 0x04)
PCI bus 0 slot 6/0: Broadcom BCM5701 10/100/1000 Ethernet (ethernet network, rev 0x15)
PCI bus 0 slot 7/0: Opti 82C862 FireLink USB Controller (USB serial bus, interface 0x10, rev 0x10)
PCI bus 1 slot 1/0: Alliance Semiconductor SP1011 HyperTransport-PCI Bridge (PCI bridge)
PCI bus 2 slot 0/0: Intel product 0x1008 (ethernet network, rev 0x02)
Initializing Devices.
SWARM board revision 3
sbeth: found phy 1, vendor 000818 part 0E
sbeth: found phy 1, vendor 000818 part 0E
PCIIDE: 0 controllers found
Config switch: 2
CPU: BCM1250 A8/A10
L2 Cache Status: OK
Wafer ID: 0x1F918019 [Lot 2020, Wafer 12]
Manuf Test: Bin A [2CPU_FI_FD_F2 (OK)]
SysCfg: 00000000289B0680 [PLL_DIV: 13, IOB0_DIV: CPUCLK/4, IOB1_DIV: CPUCLK/3]
CPU type 0x1040102: 650MHz
Total memory: 0x80000000 bytes (2048MB)
Total memory used by CFE: 0x8FE95000 - 0x8FFFF480 (1483904)
Initialized Data: 0x8FEF4880 - 0x8FEFCDB0 (34096)
BSS Area: 0x8FEFCDB0 - 0x8FEFD470 (1728)
Local Heap: 0x8FEFD480 - 0x8FFFD480 (1048576)
Stack Area: 0x8FFFD480 - 0x8FFFF480 (8192)
Text (code) segment: 0x8FE95000 - 0x8FEF3F63 (388963)
Boot area (physical): 0x0FE54000 - 0x0FE94000
Relocation Factor: I:F0295000 - D:F0295000
CFE> ifconfig -auto eth2; boot -elf -tftp neelnatu1:kernel
eth2: Link speed: 100BaseT FDX
Device eth2: hwaddr 00-10-18-04-04-4F, ipaddr 10.33.27.25, mask 255.255.252.0
gateway 10.33.24.1, nameserver 10.99.158.106
Loader:elf Filesys:tftp Dev:eth2 File:neelnatu1:kernel Options:(null)
Loading: 0xffffffff80100010/3180292 0xffffffff80831fac/200 0xffffffff80832074/1494268 0xffffffff8040a800/4356012 Entry at 0x80131350
Closing network.
eth2: 13559 sent, 13581 received, 25042 interrupts
Starting program at 0x80131350
cfe_enummem: 0x0000000000000000/266948608.
cfe_enummem: 0x0000000080000000/536870912.
cfe_enummem: 0x00000000c0000000/268435456.
cfe_enummem: 0x0000000100000000/1073741824.
Ignoring 1073741824 bytes of memory at 0x100000000 that is above maxmem 4096MB
icache is virtual
picache_stride = 8192
picache_loopcount = 4
pdcache_stride = 4096
pdcache_loopcount = 8
cpu0: Broadcom processor v2.1
MMU: Standard TLB, 64 entries
L1 i-cache: 4 ways of 256 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
Physical memory chunk(s):
0x99ed70 - 0xfe94fff, 256860816 bytes (62710 pages)
0x80000000 - 0x9fffffff, 536870912 bytes (131072 pages)
0xc0000000 - 0xcfffffff, 268435456 bytes (65536 pages)
Maxmem is 0xd0000000
Va=0xc0002000 Ve=ffffc000
init kernel_segmap va >> = 768 nkpt:256
avail_start:0xab2d70 avail_end:0xd0000000
KDB: debugger backends: ddb
KDB: current backend: ddb
hz=100 cyl_per_hz:650000 cyl_per_usec:650 freq:650000000 cyl_per_hz:6500000 cyl_per_sec:650000000
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 #25: Fri Jun 12 12:03:39 PDT 2009
neelnatu at neelnatu1:/usr/obj/mips/neelnatu/p4/freebsd_sibyte/src/sys/SWARM
WARNING: WITNESS option enabled, expect reduced performance.
real memory = 1072254976 (1047124K bytes)
Physical memory chunk(s):
0x00ab3000 - 0x0fe94fff, 255729664 bytes (62434 pages)
0x80000000 - 0x9bf04fff, 468733952 bytes (114437 pages)
0xc0000000 - 0xcfffffff, 268435456 bytes (65536 pages)
avail memory = 989282304 (943MB)
null: <null device, zero device>
nfslock: pseudo-device
mem: <memory>
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
Establish HARD IRQ 5: filt 0x8039519c handler 0 arg 0
clock0: [FILTER]
zbbus0: <Broadcom/Sibyte ZBbus> at mem 0xc740b400-0x477d827f on nexus0
zbbus0: attached.
zbbus0: Adding hinted child zbpci0
zbbus0: Adding hinted child scd0
zbbus0: Adding hinted child ata0
zbbus0: Assigning memory resource 0x100b0000/65536 to child ata0
zbbus0: Assigning irq resource 36 to child ata0
zbpci0: <Broadcom/Sibyte PCI I/O Bridge> on zbbus0
zbpci0: attached.
pci0: <PCI bus> on zbpci0
pci0: domain=0, physical bus=0
found-> vendor=0x166d, dev=0x0001, revid=0x02
domain=0, bus=0, slot=0, func=0
class=06-00-00, hdrtype=0x00, mfdev=0
cmdreg=0x0156, statreg=0x02a0, cachelnsz=8 (dwords)
lattimer=0xfc (7560 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=a, irq=56
map[10]: type Prefetchable Memory, range 32, base 0x60000000, size 29, enabled
map[18]: type Prefetchable Memory, range 32, base 0x70000000, size 28, enabled
map[1c]: type Prefetchable Memory, range 32, base 0x71000000, size 24, enabled
map[24]: type Prefetchable Memory, range 32, base 0x80000000, size 31, enabled
found-> vendor=0x166d, dev=0x0002, revid=0x02
domain=0, bus=0, slot=1, func=0
class=06-00-00, hdrtype=0x01, mfdev=0
cmdreg=0x0107, statreg=0x0010, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns)
found-> vendor=0x1033, dev=0x0035, revid=0x43
domain=0, bus=0, slot=5, func=0
class=0c-03-10, hdrtype=0x00, mfdev=1
cmdreg=0x0156, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0xfc (7560 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns)
intpin=a, irq=56
powerspec 2 supports D0 D1 D2 D3 current D0
map[10]: type Memory, range 32, base 0x41011000, size 12, enabled
found-> vendor=0x1033, dev=0x0035, revid=0x43
domain=0, bus=0, slot=5, func=1
class=0c-03-10, hdrtype=0x00, mfdev=0
cmdreg=0x0156, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0xfc (7560 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns)
intpin=b, irq=57
powerspec 2 supports D0 D1 D2 D3 current D0
map[10]: type Memory, range 32, base 0x41010000, size 12, enabled
found-> vendor=0x1033, dev=0x00e0, revid=0x04
domain=0, bus=0, slot=5, func=2
class=0c-03-20, hdrtype=0x00, mfdev=0
cmdreg=0x0156, statreg=0x0210, cachelnsz=8 (dwords)
lattimer=0xfc (7560 ns), mingnt=0x10 (4000 ns), maxlat=0x22 (8500 ns)
intpin=c, irq=58
powerspec 2 supports D0 D1 D2 D3 current D0
map[10]: type Memory, range 32, base 0x41013000, size 8, enabled
found-> vendor=0x14e4, dev=0x1645, revid=0x15
domain=0, bus=0, slot=6, func=0
class=02-00-00, hdrtype=0x00, mfdev=0
cmdreg=0x0156, statreg=0x02b0, cachelnsz=8 (dwords)
lattimer=0xf8 (7440 ns), mingnt=0x40 (16000 ns), maxlat=0x00 (0 ns)
intpin=a, irq=57
powerspec 2 supports D0 D3 current D0
MSI supports 8 messages, 64 bit
map[10]: type Memory, range 64, base 0x41000000, size 16, enabled
found-> vendor=0x1045, dev=0xc861, revid=0x10
domain=0, bus=0, slot=7, func=0
class=0c-03-10, hdrtype=0x00, mfdev=0
cmdreg=0x0157, statreg=0x0280, cachelnsz=8 (dwords)
lattimer=0xf8 (7440 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=a, irq=58
map[10]: type Memory, range 32, base 0x41012000, size 12, enabled
ohci0: <NEC uPD 9210 USB controller> mem 0x41011000-0x41011fff irq 56 at device 5.0 on pci0
ohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x41011000
Establish HARD IRQ 1: filt 0 handler 0x801ae56c arg 0xc74bd000
ohci0: [MPSAFE]
ohci0: [ITHREAD]
usbus0: <NEC uPD 9210 USB controller> on ohci0
ohci1: <NEC uPD 9210 USB controller> mem 0x41010000-0x41010fff irq 57 at device 5.1 on pci0
ohci1: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x41010000
Establish HARD IRQ 2: filt 0 handler 0x801ae56c arg 0xc74c3000
ohci1: [MPSAFE]
ohci1: [ITHREAD]
usbus1: <NEC uPD 9210 USB controller> on ohci1
ehci0: <NEC uPD 720100 USB 2.0 controller> mem 0x41013000-0x410130ff irq 58 at device 5.2 on pci0
ehci0: Reserved 0x100 bytes for rid 0x10 type 3 at 0x41013000
Establish HARD IRQ 3: filt 0 handler 0x801a8064 arg 0xc74ca000
ehci0: [MPSAFE]
ehci0: [ITHREAD]
usbus2: EHCI version 1.0
usbus2: <NEC uPD 720100 USB 2.0 controller> on ehci0
pci0:0:6:0: bad VPD cksum, remain 14
bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0x105> mem 0x41000000-0x4100ffff irq 57 at device 6.0 on pci0
bge0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0x41000000
bge0: CHIP ID 0x01050000; ASIC REV 0x00; CHIP REV 0x01; PCI
miibus0: <MII bus> on bge0
brgphy0: <BCM5701 10/100/1000baseTX PHY> PHY 1 on miibus0
brgphy0: OUI 0x000818, model 0x0011, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge0: Ethernet address: 00:10:18:04:04:4f
Establish HARD IRQ 2: filt 0 handler 0x8017257c arg 0xc74e4000
bge0: [MPSAFE]
bge0: [ITHREAD]
ohci2: <OPTi 82C861 (FireLink) USB controller> mem 0x41012000-0x41012fff irq 58 at device 7.0 on pci0
ohci2: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x41012000
Establish HARD IRQ 3: filt 0 handler 0x801ae56c arg 0xc74f7000
ohci2: [MPSAFE]
ohci2: [ITHREAD]
usbus3: <OPTi 82C861 (FireLink) USB controller> on ohci2
pci1: <PCI bus> on zbpci0
pci1: domain=0, physical bus=1
found-> vendor=0x14d9, dev=0x0010, revid=0x00
domain=0, bus=1, slot=1, func=0
class=06-04-00, hdrtype=0x01, mfdev=0
cmdreg=0x0107, statreg=0x0010, cachelnsz=8 (dwords)
lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x00 (0 ns)
pcib0: <PCI-PCI bridge> at device 1.0 on pci1
pcib0: domain 0
pcib0: secondary bus 2
pcib0: subordinate bus 2
pcib0: I/O decode 0x8000-0x8fff
pcib0: memory decode 0x41100000-0x411fffff
pcib0: no prefetched decode
pci2: <PCI bus> on pcib0
pci2: domain=0, physical bus=2
found-> vendor=0x8086, dev=0x1008, revid=0x02
domain=0, bus=2, slot=0, func=0
class=02-00-00, hdrtype=0x00, mfdev=0
cmdreg=0x0157, statreg=0x0230, cachelnsz=8 (dwords)
lattimer=0xfc (7560 ns), mingnt=0xff (63750 ns), maxlat=0x00 (0 ns)
intpin=a, irq=57
powerspec 2 supports D0 D3 current D0
MSI supports 1 message, 64 bit
map[10]: type Memory, range 32, base 0x41120000, size 17, enabled
pcib0: requested memory range 0x41120000-0x4113ffff: good
map[14]: type Memory, range 32, base 0x41140000, size 17, enabled
pcib0: requested memory range 0x41140000-0x4115ffff: good
map[18]: type I/O Port, range 32, base 0x8000, size 5, enabled
pcib0: requested I/O range 0x8000-0x801f: in range
pci2: <network, ethernet> at device 0.0 (no driver attached)
scd0: <Broadcom/Sibyte System Control and Debug> on zbbus0
scd0: attached.
ata0 on zbbus0
ata0: using a register shift of 5
ata0: using a register offset of 0x1f0
ata0: reset tp1 mask=03 ostat0=50 ostat1=00
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x00 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=00 devices=0x1
Establish HARD IRQ 1: filt 0 handler 0x8014c144 arg 0xc74b1000
ata0: [MPSAFE]
ata0: [ITHREAD]
Device configuration finished.
Timecounter "MIPS32" frequency 650000000 Hz quality 800
Timecounters tick every 10.000 msec
ata0: Identifying devices: 00000001
ata0: New devices: 00000001
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
ata0-master: pio=PIO4 wdma=WDMA2 udma=UNSUPPORTED cable=40 wire
ad0: 977MB <STI Flash 8.0.0 01/17/07> at ata0-master PIO4
ad0: 2001888 sectors [1986C/16H/63S] 1 sectors/interrupt 1 depth queue
ugen0.1: <NEC> at usbus0
uhub0: <NEC OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <NEC> at usbus1
uhub1: <NEC OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <NEC> at usbus2
uhub2: <NEC EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen3.1: <OPTi> at usbus3
uhub3: <OPTi OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
GEOM: new disk ad0
WARNING: WITNESS option enabled, expect reduced performance.
Root mount waiting for: usbus3 usbus2 usbus1 usbus0
uhub3: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub0: 3 ports with 3 removable, self powered
Root mount waiting for: usbus2
uhub2: 5 ports with 5 removable, self powered
Trying to mount root from ufs:/dev/md0
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> ufs:/dev/ad0
Trying to mount root from ufs:/dev/ad0
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
hello world
Enter full pathname of shell or RETURN for /bin/sh:
# uname -a
FreeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #25: Fri Jun 12 12:03:39 PDT 2009 neelnatu at neelnatu1:/usr/obj/mips/neelnatu/p4/freebsd_sibyte/src/sys/SWARM mips
More information about the freebsd-mips
mailing list