On 13/02/18 13:15, Weidemann, Maik (M-SO) wrote:
I try do emulate / virtualize a very old Sun Workstation Ultra 2 with a SunOs 5.8 with KVM/qemu. As host system I use a Ubuntu 17.10 with the qemu packages from http://ppa.launchpad.net/jacob/virtualisation/ubuntu. The qemu Version is: QEMU emulator version 2.11.0(Debian 1:2.11+dfsg-1ubuntu1~ppa0)
I tried to start a virtual machine with the default bios (Version: 1.1.git20161120-2). But I get this error message: # qemu-system-sparc64 -nographic -drive unit=1,file=sun14_disk.raw,format=raw OpenBIOS for Sparc64 set_property: NULL phandle set_property: NULL phandle Unhandled Exception 0x0000000000000030 PC = 0x00000000ffd0f6b8 NPC = 0x00000000ffd0f6bc Stopping execution
Yes, unfortunately that combination of QEMU/OpenBIOS won't work because at the moment there is no way to pass the device tree from QEMU to OpenBIOS and so the two must generally be kept in sync. Hopefully this requirement will be something that can be relaxed in time.
I see that was some new commits at the git repository, so I clone the repo an build a new openbios-file (https://www.openbios.org/OpenBIOS#Building_OpenBIOS) an start the vm with this new bios. But I get also a error message: # qemu-system-sparc64 -nographic -drive unit=1,file=sun14_disk.raw,format=raw -L . -bios openbios-builtin.elf Unhandled Exception 0x0000000000000030 PC = 0x00000000ffd21368 NPC = 0x00000000ffd2136c Stopping execution
Something definitely looks wrong there - for 2.11 have you tried grabbing the relevant OpenBIOS binary direct from git? It's available as a direct download from https://git.qemu.org/?p=qemu.git%3Ba=blob%3Bf=pc-bios/openbios-sparc64%3Bh=a....
Is it even possible to emulate a Sun Sparc Ultra 2 with a SunOs 5.8 (64bit)? SunOS satnw014 5.8 Generic_108528-06 sun4u sparc SUNW,Ultra-2
The default sun4u model emulates an Ultra 5, so assuming your image contains enough drivers then in theory you should be able to at least boot into the kernel and get somewhere close to userspace.
To the best of my knowledge the main outstanding feature missing from the SPARC64 emulation preventing it from booting SunOS is the MMU IE bit which is required to program PCI devices. I suspect this will still be the case for SunOS 5.8.
There has been a lot of work done over the past couple of releases to fix up all the PCI bridge issues so I would hope that getting qemu-system-sparc64 to boot Solaris 64-bit is now within reach, so watch this space :)