Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Oct 2014 23:59:50 +0100
From:      Ben Morrow <ben@morrow.me.uk>
To:        freebsd-mips@freebsd.org
Subject:   Trying to get MALTA64 running under qemu
Message-ID:  <20141018225950.GA12023@anubis.morrow.me.uk>

next in thread | raw e-mail | index | archive | help
I'm considering buying an ERL to use as a local router, but before I did
I thought I'd make sure the ports I want to run work properly with MIPS,
so I'm trying to bring up a qemu-system-mips64 instance. I've built
world and kernel (using MALTA64) for mips.mips64, and built a disk image
following the instructions on the MipsEmulation page on the wiki. The
source I am using is a slightly patched 10-STABLE from 2014-09-09; the
patches have nothing to do with MIPS.

However, when I try to bring qemu up, the system appears to hang after
probing the ata devices. Over the course of about 30 seconds the qemu
process goes up to 100% of one CPU, and no more output appears on the
console. This appears to happen regardless of the disk images I pass to
qemu; I've tried passing a UFS image, a file full of zeros, no disks at
all, and (just in case) both -hda and -hdc. I've included the boot log
below; I'd appreciate any advice.

Ben

% uname -m
amd64
% pkg info -E qemu                                                     
qemu-0.11.1_16
% qemu-system-mips64 -M malta -kernel yarrow.kernel -hda yarrow.ufs -nographic
entry: platform_start()
cmd line: yarrow.kernel  
envp:
	memsize = 134217728
	modetty0 = 38400n8r
memsize = 08000000
Cache info:
  picache_stride    = 4096
  picache_loopcount = 8
  pdcache_stride    = 4096
  pdcache_loopcount = 8
cpu0: MIPS Technologies processor v160.130
  MMU: Standard TLB, 48 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
  Config1=0xdea3519b<PerfCount,WatchRegs,EJTAG,FPU>
Physical memory chunk(s):
0x622000 - 0x7ffffff, 127787008 bytes (31198 pages)
Maxmem is 0x8000000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2014 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 10.1-PRERELEASE #0 3c1e5d7(mauzo/10-S): Sat Oct 18 02:43:24 BST 2014
    root@anubis:/usr/obj/mips.mips64/usr/src/sys/MALTA64 mips
gcc version 4.2.1 20070831 patched [FreeBSD]
Preloaded elf kernel "kernel" at 0xffffffff8061b2c0.
real memory  = 134217728 (131072K bytes)
Physical memory chunk(s):
0x0073f000 - 0x07cadfff, 123138048 bytes (30063 pages)
avail memory = 121868288 (116MB)
random device not loaded; using insecure entropy
mem: <memory>
null: <null device, zero device>
nfslock: pseudo-device
nexus0: <MIPS32 root nexus>
gt0: <GT64120 chip> on nexus0
pcib0: <GT64120 PCI bridge> on gt0
pci0: <PCI bus> on pcib0
pci0: domain=0, physical bus=0
found->	vendor=0x11ab, dev=0x4620, revid=0x10
	domain=0, bus=0, slot=0, func=0
	class=06-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=0
	map[14]: type Prefetchable Memory, range 32, base 0x1000000, size 24, memory disabled
	map[18]: type Memory, range 32, base 0x1c000000, size 26, memory disabled
	map[1c]: type Memory, range 32, base 0x1f000000, size 24, memory disabled
	map[20]: type Memory, range 32, base 0x14000000, size 26, memory disabled
	map[24]: type I/O Port, range 32, base 0x14000000, size 26, port disabled
pcib0: no IRQ mapping for 0/0/0/1
found->	vendor=0x8086, dev=0x7110, revid=0x00
	domain=0, bus=0, slot=10, func=0
	class=06-01-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0007, statreg=0x0200, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x8086, dev=0x7111, revid=0x00
	domain=0, bus=0, slot=10, func=1
	class=01-01-80, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[20]: type I/O Port, range 32, base 0, size  4, port disabled
found->	vendor=0x8086, dev=0x7112, revid=0x01
	domain=0, bus=0, slot=10, func=2
	class=0c-03-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=d, irq=0
	map[20]: type I/O Port, range 32, base 0, size  5, port disabled
pcib0: no IRQ mapping for 0/10/2/4
found->	vendor=0x8086, dev=0x7113, revid=0x03
	domain=0, bus=0, slot=10, func=3
	class=06-80-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=0
pcib0: no IRQ mapping for 0/10/3/1
found->	vendor=0x1022, dev=0x2000, revid=0x10
	domain=0, bus=0, slot=11, func=0
	class=02-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0007, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x06 (1500 ns), maxlat=0xff (63750 ns)
	intpin=a, irq=0
	map[10]: type I/O Port, range 32, base 0, size  5, enabled
	map[14]: type Memory, range 32, base 0, size  5, enabled
found->	vendor=0x1013, dev=0x00b8, revid=0x00
	domain=0, bus=0, slot=18, func=0
	class=03-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0003, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[10]: type Prefetchable Memory, range 32, base 0, size 25, enabled
	map[14]: type Memory, range 32, base 0, size 12, enabled
uart0: <Non-standard ns8250 class UART with FIFOs> on obio0
uart0: console (9600,n,8,1)
uart0: fast interrupt
pci0: <bridge, PCI-ISA> at device 10.0 (no driver attached)
atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376 at device 10.1 on pci0
atapci0: Lazy allocation of 0x10 bytes rid 0x20 type 4 at 0x100
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <serial bus, USB> at device 10.2 (no driver attached)
pci0: <bridge> at device 10.3 (no driver attached)
le0: <AMD PCnet-PCI> irq 10 at device 11.0 on pci0
le0: Lazy allocation of 0x20 bytes rid 0x10 type 4 at 0x120
le0: 16 receive buffers, 4 transmit buffers
le0: bpf attached
le0: Ethernet address: 52:54:00:12:34:56
vgapci0: <VGA-compatible display> at device 18.0 on pci0
vgapci0: Boot video device
clock0: <Generic MIPS32 ticker> on nexus0
Timecounter "MIPS32" frequency 100000000 Hz quality 800
Event timer "MIPS32" frequency 100000000 Hz quality 800
Device configuration finished.
Timecounters tick every 10.000 msec
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 2048
lo0: bpf attached
ata0: reset tp1 mask=03 ostat0=50 ostat1=00
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x00 err=0x00 lsb=0xff msb=0xff
ata0: reset tp2 stat0=50 stat1=00 devices=0x1
ata1: reset tp1 mask=03 ostat0=50 ostat1=00
ata1: stat0=0x00 err=0x01 lsb=0x14 msb=0xeb
ata1: stat1=0x00 err=0x00 lsb=0xff msb=0xff
ata1: reset tp2 stat0=00 stat1=00 devices=0x10000

(The emulator hangs at this point. I've left it for over an hour and it
just sits there at 100% CPU, making no further progress.)




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