Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD on qemu-ppc

2013/8/6 Jeff Rizzo <>:
> I haven't tried in a while, and never actually got it working, but I recall
> getting slightly further using NetBSD/ofppc instead of macppc last time I
> tried.

NetBSD/ofppc INSTALL kernel drops to db (after OpenBIOS console
printing lots of dma-alloc errors -21) with "/dev/console" not found.
It looks like PCI before cannot be configured, as there seem to be
problems with OpenBIOS/the firmware interface.

But hey, after your suggestion and more experiments, I tried /prep
again, and this time I had success:

A simple "qemu-system-ppc -nographic -M prep -hda disk.qcow2 -serial
pipe:ppc -kernel sysinst_com0.fs" can reach sysinst! sysinst_com0.fs
is taken from
Console is redirected to the serial port, as the emulated VGA output
stays black.
generic_com0.fs, on the other hand, does not even reach NetBSD's
bootloader when called with the same arguments... No idea why.
The question is why the emulated IDE disk is not recognized. /prep
kernels seem to be quite limited regarding IDE controller support,
maybe I have to roll my own?

CPU usage on the host is also 100% when the guest is idle, but this
can be significantly reduced to ~0% by choosing another guest CPU
(like "-cpu 604", perhaps because of "powersave == 1").

Emulated PCI network cards (fxp, ne, pcn) give "couldn't map
interrupt", but I will try to get a working disk first...

Console output follows.


register PCI host 'pci-bridge' 'pci' '<null>' 'PREP Host PCI Bridge -
Motorola Raven'
register 'pci-bridge' 'pci' '<null>' 'PREP Host PCI Bridge - Motorola
Raven' 0x80000000 in 'device-tree' 0xffffffff
Done 582b000 582b880
PCI device '<null>' 0 11 0 has no reg properties:
PCI device '<null>' 0 11 0 has no assigned addresses properties:
register pci device 'Qemu VGA' 0000000d 'display' 'VGA' 'Qemu VGA'
register 'Qemu VGA' 'display' 'VGA' 'Qemu VGA' 0x0000000d in
'pci-bridge' 0x80000000
Done 582b880 582b980
PCI device 'Qemu VGA' 0 13 0 reg properties:
addr: 82006810 00000000 f0000000 size: 00000000 01000000
addr: 82006818 00000000 f1000000 size: 00000000 00010000
PCI device 'Qemu VGA' 0 13 0 assigned addresses properties:
addr: 82006810 00000000 f0000000 size: 00000000 01000000
addr: 82006818 00000000 f1000000 size: 00000000 00010000
PPC Open Hack'Ware BIOS for qemu version 0.4.1
Build 2007-10-01 06:42:47
Copyright 2003-2005 Jocelyn Mayer

Memory size: 128 MB.
Booting from device m
ide0: drive 0: Hard Disk
ERROR: OF_property_copy cannot get property 'hd' for aliases
ERROR: WIN_READ_NATIVE_MAX : status 50 != 0x40
ide0: drive 1: none
ide1: drive 0: CD-ROM
ERROR: OF_property_copy cannot get property 'cd' for aliases
ERROR: ATAPI TEST_UNIT_READY : status 41 != 0x40
ide1: drive 1: none
Probe partitions for device m
ERROR: No MSDOS signature (38 0 0 0)
Use bloc device as raw partition
Boot partition: 0 9401fff8 9401fff8 0
ERROR: OF_property_copy cannot get property 'alias' for <null>
boot device: 5832080 image 1000000 size 1876471
ERROR: PREP boot image greater than boot partition: 1ca1f7 167c00
Probe filesystem on unknown PREP partition 'PREP boot' (bootable) 5832100
Fix bootfile
Partition is bootable (0)
bd_set_boot_part: part 5832100 (0) 0
Boot partition: 5832100 582e480 582e480 0
boot device: 5832080
ERROR: Found boot partition : 5832100 582e480
ERROR: Not a MACH-O file
ERROR: Not an Apple CHRP boot file !
dest 100000 entry 00000200 => 100200
Load raw file into memory at 100000 1876471 (001ca1f7) 0 (00000000)
Boot: 00040000 f7a11c00 00000000 00000000
Bootinfos at : 300000

Now boot it... (0)

stack: 5bfff80 malloc_base: 0 0x05800000 0x06000000
PREP boot... 100200 100000

>> NetBSD/prep BOOT, Revision 1.8

Loading in()

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

Model: Qemu
total memory = 128 MB
avail memory = 119 MB
mainbus0 (root)
cpu0 at mainbus0: 602 (Revision 256), ID 0 (primary)
cpu0: HID0 0xc000<ICE,DCE>, powersave: -1
Couldn't find PNP data for bus 0 devfunc 0x0
pnpbus0 at mainbus0
pci0 at mainbus0 bus 0: indirect configuration space access
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1057 product 0x4801 (rev. 0x00)
pcib0 at pci0 dev 1 function 0: vendor 0x8086 product 0x0484 (rev. 0x03)
vendor 0x1234 product 0x1111 (VGA display) at pci0 dev 2 function 0
not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 (mux ignored)
vmmask 10000000 schedmask 10000000 highmask 70000000
boot device: mainbus0
root on md0a dumps on md0b
root file system type: ffs
WARNING: no TOD clock present
WARNING: using filesystem time
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]

Home | Main Index | Thread Index | Old Index