On Thu, May 28, 2020 at 01:05:59AM -0600, Jason A. Donenfeld wrote: > On Thu, May 28, 2020 at 12:15 AM Otto Moerbeek <o...@drijf.net> wrote: > > > > On Wed, May 27, 2020 at 11:28:09PM -0600, Jason A. Donenfeld wrote: > > > > > Hi Otto, > > > > > > On Wed, May 27, 2020 at 4:07 AM Otto Moerbeek <o...@drijf.net> wrote: > > > > Although I'm not terribly interested in bugs that are only seen (s0 > > > > far) using emulation, please send me the details on how you set up > > > > qemu. > > > > > > Right, it could very well be a TCG bug. But maybe not. Here's how to > > > get things [not-]working: > > > > > > $ qemu-system-sparc64 --version > > > QEMU emulator version 5.0.0 > > > $ qemu-img convert -O qcow2 miniroot66.fs disk.qcow2 > > > $ qemu-img resize disk.qcow2 20G > > > $ qemu-system-sparc64 \ > > > -machine sun4u \ > > > -m 1024 \ > > > -drive file=disk.qcow2,if=ide \ > > > -net nic,model=ne2k_pci -net user \ > > > -nographic -serial stdio -monitor none \ > > > -boot c > > > > > > OpenBIOS for Sparc64 > > > [...] > > > Loading FCode image... > > > Loaded 5840 bytes > > > entry point is 0x4000 > > > Evaluating FCode... > > > OpenBSD IEEE 1275 Bootblock 1.4 > > > ..>> OpenBSD BOOT 1.14 > > > Trying bsd... > > > [...] > > > OpenBSD 6.6 (RAMDISK) #84: Sat Oct 12 10:42:12 MDT 2019 > > > dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/RAMDISK > > > [...] > > > Welcome to the OpenBSD/sparc64 6.6 installation program. > > > (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? > > > > > > If you swap out miniroot66.fs for miniroot67.fs, you'll get the error > > > I sent prior. > > > > > > Jason > > > > > > > Does not work for me, error message on OpenBSD/amd64: > > > > Could not allocate dynamic translator buffer > > > > ktrace snippet: > > > > 74960 qemu-system-spar CALL > > mmap(0,0x40000000,0x7<PROT_READ|PROT_WRITE|PROT_EX > > EC>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0) > > 74960 qemu-system-spar RET mmap -1 errno 91 Not supported > > > > It's doing a RWX mapping, won't fly on OpenBSD. > > > > -Otto > > This sequence worked fine on my OpenBSD box for reproducing the maybe-bug. > (See: mount option.) YMMV: > > bart ~ # pkg_add git gmake glib2 bison sdl2 gsed bash xz > [...] > bart ~ # ftp -o - https://download.qemu.org/qemu-5.0.0.tar.xz | unxz | tar xf > - > bart ~ # cd qemu-5.0.0/ > bart ~/qemu-5.0.0 # mkdir build && cd build > bart ~/qemu-5.0.0/build # ../configure && gmake -j$(sysctl -n hw.ncpu) > [...] > bart ~/qemu-5.0.0/build # ftp > https://cdn.openbsd.org/pub/OpenBSD/6.7/sparc64/miniroot67.fs > [...] > bart ~/qemu-5.0.0/build # ./qemu-img convert -O qcow2 miniroot67.fs disk.qcow2 > bart ~/qemu-5.0.0/build # ./qemu-img resize disk.qcow2 20G > Image resized. > bart ~/qemu-5.0.0/build # mount > /dev/sd0a on / type ffs (local, wxallowed) > bart ~/qemu-5.0.0/build # ./sparc64-softmmu/qemu-system-sparc64 -machine > sun4u -m 1024 -drive file=disk.qcow2,if=ide -net nic,model=ne2k_pci -net user > -nographic -serial stdio -monitor none -boot c > 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 Oct 28 2019 17:08 > Type 'help' for detailed information > Trying disk:a... > Not a bootable ELF image > Not a bootable a.out image > Loading FCode image... > Loaded 6882 bytes > entry point is 0x4000 > Evaluating FCode... > OpenBSD IEEE 1275 Bootblock 2.0 > ..reserved fcode word. > Unhandled Exception 0x0000000000000030 > PC = 0x00000000ffd0f3ac NPC = 0x00000000ffd0f3b0 > Stopping execution > > Jason >
Of course.., I was running it from a !wxallowed mount. BTW, qemu is in packages, no need to build it yourself. -Otto