On Sun, Jan 28, 2018 at 12:59:39PM +0100, Mark Kettenis wrote:
> > Date: Sun, 28 Jan 2018 07:27:49 +0100
> > From: Sebastien Marie <[email protected]>
> >
> Did OpenBSD/arm64 ever run properly in qemu? I certainly never tried
> it. Things are fairly stable on real hardware, but on the overdrive
> 3000 we see random segfaults as well.
It is my first try with arm64 and qemu, so I couldn't say if
OpenBSD/arm64 worked previously.
I am a bit inclined to incriminate qemu here.
> What happens if you tell qemu to emulate a Cortex-A53 by passing -cpu
> cortex-a53?
I have similar behavior (random segfaults).
Here a boot sequence using cortex-a53 (psci is disabled):
$ doas ./qaarch64.sh
>> OpenBSD/arm64 BOOTAA64 0.9
boot>
booting sd0a:/bsd: 3909540+578336+580264+807056
[277702+96+457680+243174]=0x841d58
type 0x2 pa 0x40000000 va 0x0 pages 0x4000 attr 0xf
type 0x7 pa 0x44000000 va 0x0 pages 0x776e6 attr 0xf
type 0x2 pa 0xbb6e6000 va 0x0 pages 0x6ea attr 0xf
type 0x9 pa 0xbbdd0000 va 0x0 pages 0x60 attr 0xf
type 0x2 pa 0xbbe30000 va 0x0 pages 0x20 attr 0xf
type 0x6 pa 0xbbe50000 va 0x2547848000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0xbbea0000 va 0x2547898000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0xbbef0000 va 0x25478e8000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0xbbf40000 va 0x2547938000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0xbbf90000 va 0x2547988000 pages 0x70 attr 0x800000000000000f
type 0x4 pa 0xbc000000 va 0x0 pages 0x20 attr 0xf
type 0x9 pa 0xbc020000 va 0x0 pages 0x20 attr 0xf
type 0x5 pa 0xbc040000 va 0x2547a38000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0xbc090000 va 0x2547a88000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0xbc0e0000 va 0x2547ad8000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0xbc130000 va 0x2547b28000 pages 0xa0 attr 0x800000000000000f
type 0x5 pa 0xbc1d0000 va 0x2547bc8000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0xbc220000 va 0x2547c18000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0xbc270000 va 0x2547c68000 pages 0x50 attr 0x800000000000000f
type 0x0 pa 0xbc2c0000 va 0x0 pages 0x4 attr 0xf
type 0x1 pa 0xbc2c4000 va 0x0 pages 0x14 attr 0xf
type 0x7 pa 0xbc2d8000 va 0x0 pages 0x102f attr 0xf
type 0x4 pa 0xbd307000 va 0x0 pages 0x3e5 attr 0xf
type 0x7 pa 0xbd6ec000 va 0x0 pages 0x8a attr 0xf
type 0x4 pa 0xbd776000 va 0x0 pages 0x1a42 attr 0xf
type 0x7 pa 0xbf1b8000 va 0x0 pages 0x27c attr 0xf
type 0x3 pa 0xbf434000 va 0x0 pages 0x16c attr 0xf
type 0x5 pa 0xbf5a0000 va 0x254af98000 pages 0x90 attr 0x800000000000000f
type 0x7 pa 0xbf630000 va 0x0 pages 0x10 attr 0xf
type 0x6 pa 0xbf640000 va 0x254b038000 pages 0x120 attr 0x800000000000000f
type 0x7 pa 0xbf760000 va 0x0 pages 0x1a attr 0xf
type 0x4 pa 0xbf77a000 va 0x0 pages 0x886 attr 0xf
type 0xb pa 0x4000000 va 0x254b158000 pages 0x4000 attr 0x8000000000000001
type 0xb pa 0x9010000 va 0x254f158000 pages 0x1 attr 0x8000000000000001
[ using 979488 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved. https://www.OpenBSD.org
OpenBSD 6.2-current (GENERIC) #160: Wed Jan 24 18:26:59 MST 2018
[email protected]:/usr/src/sys/arch/arm64/compile/GENERIC
real mem = 2091143168 (1994MB)
avail mem = 2002989056 (1910MB)
mainbus0 at root: unknown model
cpu0 at mainbus0: ARM Cortex-A53 r0p4
efi0 at mainbus0: UEFI 2.6
efi0: EDK II rev 0x10000
simplebus0 at mainbus0: "platform"
virtio0 at mainbus0: Virtio Unknown (0) Device
virtio1 at mainbus0: Virtio Unknown (0) Device
virtio2 at mainbus0: Virtio Unknown (0) Device
virtio3 at mainbus0: Virtio Unknown (0) Device
virtio4 at mainbus0: Virtio Unknown (0) Device
virtio5 at mainbus0: Virtio Unknown (0) Device
virtio6 at mainbus0: Virtio Unknown (0) Device
virtio7 at mainbus0: Virtio Unknown (0) Device
virtio8 at mainbus0: Virtio Unknown (0) Device
virtio9 at mainbus0: Virtio Unknown (0) Device
virtio10 at mainbus0: Virtio Unknown (0) Device
virtio11 at mainbus0: Virtio Unknown (0) Device
virtio12 at mainbus0: Virtio Unknown (0) Device
virtio13 at mainbus0: Virtio Unknown (0) Device
virtio14 at mainbus0: Virtio Unknown (0) Device
virtio15 at mainbus0: Virtio Unknown (0) Device
virtio16 at mainbus0: Virtio Unknown (0) Device
virtio17 at mainbus0: Virtio Unknown (0) Device
virtio18 at mainbus0: Virtio Unknown (0) Device
virtio19 at mainbus0: Virtio Unknown (0) Device
virtio20 at mainbus0: Virtio Unknown (0) Device
virtio21 at mainbus0: Virtio Unknown (0) Device
virtio22 at mainbus0: Virtio Unknown (0) Device
virtio23 at mainbus0: Virtio Unknown (0) Device
virtio24 at mainbus0: Virtio Unknown (0) Device
virtio25 at mainbus0: Virtio Unknown (0) Device
virtio26 at mainbus0: Virtio Unknown (0) Device
virtio27 at mainbus0: Virtio Unknown (0) Device
virtio28 at mainbus0: Virtio Unknown (0) Device
virtio29 at mainbus0: Virtio Unknown (0) Device
virtio30 at mainbus0: Virtio Block Device
vioblk0 at virtio30
scsibus0 at vioblk0: 2 targets
sd0 at scsibus0 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed
sd0: 15359MB, 512 bytes/sector, 31455272 sectors
virtio31 at mainbus0: Virtio Entropy Device
viornd0 at virtio31
pciecam0 at mainbus0
pci0 at pciecam0
"Red Hat Host" rev 0x00 at pci0 dev 0 function 0 not configured
virtio32 at pci0 dev 1 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio32: address 52:54:00:00:ff:66
virtio32: irq
pluart0 at mainbus0: console
ampintc0 at mainbus0 nirq 288, ncpu 1: "intc"
ampintcmsi0 at ampintc0: nspi 64
agtimer0 at mainbus0: tick rate 62500 KHz
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (9bab94372acbda1b.a) swap on sd0b dump on sd0b
Automatic boot in progress: starting file system checks.
/dev/sd0a (9bab94372acbda1b.a): file system is clean; not checking
/dev/sd0j (9bab94372acbda1b.j): file system is clean; not checking
/dev/sd0h (9bab94372acbda1b.h): file system is clean; not checking
/dev/sd0d (9bab94372acbda1b.d): file system is clean; not checking
/dev/sd0f (9bab94372acbda1b.f): file system is clean; not checking
/dev/sd0g (9bab94372acbda1b.g): file system is clean; not checking
/dev/sd0e (9bab94372acbda1b.e): file system is clean; not checking
setting tty flags
pf enabled
sh(37200) in free(): use after free 0x11fd77ae40
Abort trap (core dumped)
sh(17102) in free(): use after free 0x1130152580
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter pathname of shell or RETURN for sh:
# ^D
setting tty flags
pfctl: pf already enabled
starting network
vio0: DHCPREQUEST to 255.255.255.255
vio0: DHCPACK from 10.0.2.2 (52:55:0a:00:02:02)
vio0: bound to 10.0.2.15 -- renewal in 43200 seconds
reordering libraries: done.
starting early daemons: syslogdksh(51404) in free(): use after free 0x6d2117680
pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
turning on accounting
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
starting local daemons:Segmentation fault (core dumped)
usage: /etc/rc.d/cron [-df] start|stop|restart|reload|check
.
Sun Jan 28 13:31:00 CET 2018
reorder_kernel: kernel relinking failed; see
/usr/share/relink/kernel/GENERIC/relink.log
OpenBSD/arm64 (qaarch64.local) (console)
login:
For reference, my qemu script is:
$ cat qaarch64.sh
#!/bin/sh
[ ! -e QEMU_EFI.fd ] && ftp
"https://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd"
ulimit -c 0
ulimit -d `ulimit -dH`
MALLOC_OPTIONS=S
export MALLOC_OPTIONS
exec qemu-system-aarch64 \
-runas ${USER} \
-m 2G \
-M virt \
-cpu cortex-a53 \
-bios QEMU_EFI.fd \
-display none \
-serial stdio \
-device virtio-rng-device \
-drive file=/dev/rsd0i,if=none,id=drive0,format=raw \
-device virtio-blk-device,drive=drive0 \
-net nic,macaddr=52:54:00:00:ff:66,model=virtio \
-net user,hostfwd=tcp::4422-:22 \
"$@"
I have a sd0i with 15 Go.
--
Sebastien Marie