qemu-system-sparc64 can boot FreeBSD 10.3!

Mark Cave-Ayland <[email protected]>
Newsgroups gmane.os.freebsd.devel.sparc
Message-ID <[email protected]>
Hi all,

So while I've been working on this, it seems that Artyom has beaten me
to it:
http://tyom.blogspot.co.uk/2016/04/freebsd-103sparc64-under-qemu.html.

A copy of QEMU git master along with
https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02284.html
and
https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02285.html
can boot the FreeBSD 10.3 release:

$ ./qemu-system-sparc64 -cdrom FreeBSD-10.3-RELEASE-sparc64-bootonly.iso
-boot d -m 512 -nographic
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39
  Type 'help' for detailed information
Trying cdrom:f...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000

Jumping to entry point 0000000000004000 for type 0000000000000005...
switching to new context: entry point 0x4000 stack 0x00000000ffe84a09

>> FreeBSD/sparc64 boot block
   Boot path:   /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f
   Boot loader: /boot/loader
Consoles: Open Firmware console

FreeBSD/sparc64 bootstrap loader, Revision 1.0
([email protected], Fri Mar 25 06:23:20 UTC 2016)
bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a"
Loading /boot/defaults/loader.conf
/boot/kernel/kernel data=0xbc4540+0xe62a0 syms=[0x8+0xcc060+0x8+0xbe0ae]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
jumping to kernel entry at 0xc00a8000.
Copyright (c) 1992-2016 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.3-RELEASE #0 r297264: Fri Mar 25 06:26:08 UTC 2016

[email protected]:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64
gcc version 4.2.1 20070831 patched [FreeBSD]
real memory  = 536870912 (512 MB)
avail memory = 501080064 (477 MB)
cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU)
random: <Software, Yarrow> initialized
kbd0 at kbdmux0
nexus0: <Open Firmware Nexus device>
nexus0: <builtin>: incomplete
pcib0: <U2P UPA-PCI bridge> mem 0x1fe00000000-0x1fe01ffffff irq
2032,2030,2031,2021 on nexus0
pcib0: Sabre, impl 0, version 0, IGN 0x1f, bus A, 33MHz
pcib0: DVMA map: 0xc0000000 to 0xc3ffffff 8192 entries
pcib0: [GIANT-LOCKED]
pci0: <OFW PCI bus> on pcib0
pcib1: <APB PCI-PCI bridge> at device 1.0 on pci0
pci1: <OFW PCI bus> on pcib1
pcib2: <APB PCI-PCI bridge> at device 1.1 on pci0
pci2: <OFW PCI bus> on pcib2
ebus0: <PCI-EBus2 bridge> port 0x4000-0x7fff mem 0x3000000-0x3ffffff at
device 3.0 on pci0
vgapci0: <VGA-compatible display> mem
0x1000000-0x1ffffff,0x2000000-0x2000fff at device 2.0 on pci0
vgapci0: Boot video device
eeprom0: <EEPROM/clock> addr 0x1400002000-0x1400003fff on ebus0
eeprom0: model mk48t59
ebus0: <fdthree> addr 0 (no driver attached)
uart0: <16550 or compatible> addr 0x14000003f8-0x14000003ff irq 43 on ebus0
uart0: console (9600,n,8,1)
ebus0: <kb_ps2> addr 0x1400000060-0x1400000067 (no driver attached)
pci0: <network, ethernet> at device 4.0 (no driver attached)
atapci0: <SiI (CMD) 646U2 UDMA33 controller> port
0x8100-0x8107,0x8180-0x8183,0x8200-0x8207,0x8280-0x8283,0x8300-0x830f at
device 5.0 on pci0
ata2: <ATA channel> at channel 0 on atapci0
ata3: <ATA channel> at channel 1 on atapci0
nexus0: <syscons> type unknown (no driver attached)
Timecounter "tick" frequency 100000000 Hz quality 1000
Event timer "tick" frequency 100000000 Hz quality 1000
Timecounters tick every 1.000 msec
cd0 at ata3 bus 0 scbus1 target 0 lun 0
cd0: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
cd0: Serial Number QM00003
cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: 193MB (99200 2048 byte sectors)
random: unblocking device.
Trying to mount root from cd9660:/dev/iso9660/10_3_RELEASE_SPARC64_BO
[ro]...
Entropy harvesting: interrupts ethernet point_to_point swi.
Starting file system checks:
Mounting local file systems:.
Writing entropy file:.
/etc/rc: WARNING: $hostname is not set -- see rc.conf(5).
Starting Network: lo0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Starting devd.
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Generating host.conf.
eval: cannot create /etc/host.conf: Read-only file system
eval: cannot create /etc/host.conf: Read-only file system
eval: cannot create /etc/host.conf: Read-only file system
Creating and/or trimming log files.
Starting syslogd.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Clearing /tmp (X related).
Starting local daemons:
Welcome to FreeBSD!

Please choose the appropriate terminal type for your system.
Common console types are:
   ansi     Standard ANSI terminal
   vt100    VT100 or compatible terminal
   xterm    xterm terminal emulator (or compatible)
   cons25w  cons25w terminal

Console type [vt100]:


Sadly though it seems the latest 11.0-CURRENT-sparc64-20160408-r297692
doesn't boot because https://reviews.freebsd.org/D2791 hasn't yet been
applied to the 11.0 tree:


$ ./qemu-system-sparc64 -cdrom
FreeBSD-11.0-CURRENT-sparc64-20160408-r297692-disc1.iso -boot d -m 512
-nographic
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39
  Type 'help' for detailed information
Trying cdrom:f...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000

Jumping to entry point 0000000000004000 for type 0000000000000005...
switching to new context: entry point 0x4000 stack 0x00000000ffe84a09

>> FreeBSD/sparc64 boot block
   Boot path:   /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f
   Boot loader: /boot/loader
Consoles: Open Firmware console

FreeBSD/sparc64 bootstrap loader, Revision 1.0
([email protected], Fri Apr  8 06:07:07 UTC 2016)
bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a"
Loading /boot/defaults/loader.conf
/boot/kernel/kernel data=0xd1cc40+0x2137d8 syms=[0x8+0xdf260+0x8+0xcddb9]
\
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
jumping to kernel entry at 0xc00b0000.
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 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 11.0-CURRENT #0 r297692: Fri Apr  8 06:10:15 UTC 2016

[email protected]:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
real memory  = 536870912 (512 MB)
avail memory = 493920256 (471 MB)
cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU)
random: entropy device external interface
kbd0 at kbdmux0
nexus0: <Open Firmware Nexus device>
nexus0: <builtin>: incomplete
pcib0: <U2P UPA-PCI bridge> mem 0x1fe00000000-0x1fe01ffffff irq
2032,2030,2031,2021 on nexus0
panic: psycho_attach: could not allocate registers
cpuid = 0
KDB: stack backtrace:
vpanic() at vpanic+0x1b4
panic() at panic+0x20
psycho_attach() at psycho_attach+0x1a0
device_attach() at device_attach+0x5a8
device_probe_and_attach() at device_probe_and_attach+0x64
bus_generic_attach() at bus_generic_attach+0x10
nexus_attach() at nexus_attach+0x590
device_attach() at device_attach+0x5a8
device_probe_and_attach() at device_probe_and_attach+0x64
bus_generic_new_pass() at bus_generic_new_pass+0x11c
bus_set_pass() at bus_set_pass+0xf8
root_bus_configure() at root_bus_configure+0x8
configure() at configure+0x4
mi_startup() at mi_startup+0x1d0
btext() at btext+0x28
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x80: ta              %xcc, 1
db>


ATB,

Mark.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.