On 13/01/2018 5:26 PM, Jonathan Gray wrote:
On Thu, Jan 11, 2018 at 03:40:01PM +0100, Karel Gardas wrote:

Hello,

I'd like to help a bit with GHC work on OpenBSD and would like to give it a try
to port GHC to ARMv8. GHC is a beast so I assume I'll need machine/emulator
with 4GB RAM at least. I'm curious what you guys are using for running all those
ARMv8 packages builders and for your own porting efforts?

so far I see following options:

- qemu-system-aarch64 running on OpenBSD/amd64. I've verified qemu distributed 
with 6.2-current
   is well capable of running Ubuntu cloud image 16.04 for ARMv8. The question 
is, has anybody
   here tested that or get OpenBSD/arm64 running on Qemu? The advantage of this 
solution is flexibility

qemu is quite a bit slower than real hardware and more painful.

Using U-Boot with a recently proposed but not committed qemu_arm64
target is limited in that virtio devices can't be booted off.  Using an
EDK2 OVMF image works better but only if using a QEMU_EFI.fd older than
the prebuilt binaries linaro now provides otherwise there is no console
output after the kernel loads.


Hi all,
This thread caught my attention as I have been doing some experimenting with ARM virtualization recently - we (Traverse) have a ARM64 board (NXP/Freescale LS1043 / 4xA53) [1] that runs Linux and I have built a small distro[2] to host arm64 VM's.

I've had good success with Linux VM's and some success with FreeBSD (i.e needed older EDK2, and issues with emulated PCIe devices)

OpenBSD does boot under a virtual environment (using the older EDK2 like FBSD), but the segfaults noted on both the emulated and ThunderX environments also occur here.

If anyone would like me to try something to debug it, let me know.

The qemu command line used is roughly:
qemu-system-aarch64 --enable-kvm -m 512 -cpu host -M virt,gic_version=2 -smp 1 -mem-path /tmp/hugetlbfs -bios QEMU_EFI_bsd.fd -drive if=none,file=openbsd.qcow2,id=hd0 -device virtio-blk-device,drive=hd0

My notes:
https://gitlab.com/traversetech/muvirt/wikis/OpenBSD

Bootlog:>> OpenBSD/arm64 BOOTAA64 0.11boot>
booting sd0a:/bsd: 3919864+578708+580664+804528 [279358+96+459168+244083]=0x8424e0
type 0x2 pa 0x40000000 va 0x0 pages 0x4000 attr 0xf
type 0x7 pa 0x44000000 va 0x0 pages 0x176e2 attr 0xf
type 0x2 pa 0x5b6e2000 va 0x0 pages 0x6ee attr 0xf
type 0x9 pa 0x5bdd0000 va 0x0 pages 0x60 attr 0xf
type 0x2 pa 0x5be30000 va 0x0 pages 0x20 attr 0xf
type 0x6 pa 0x5be50000 va 0x118675b000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0x5bea0000 va 0x11867ab000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0x5bef0000 va 0x11867fb000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0x5bf40000 va 0x118684b000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0x5bf90000 va 0x118689b000 pages 0x70 attr 0x800000000000000f
type 0x4 pa 0x5c000000 va 0x0 pages 0x20 attr 0xf
type 0x9 pa 0x5c020000 va 0x0 pages 0x20 attr 0xf
type 0x5 pa 0x5c040000 va 0x118694b000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0x5c090000 va 0x118699b000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0x5c0e0000 va 0x11869eb000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0x5c130000 va 0x1186a3b000 pages 0xa0 attr 0x800000000000000f
type 0x5 pa 0x5c1d0000 va 0x1186adb000 pages 0x50 attr 0x800000000000000f
type 0x6 pa 0x5c220000 va 0x1186b2b000 pages 0x50 attr 0x800000000000000f
type 0x5 pa 0x5c270000 va 0x1186b7b000 pages 0x50 attr 0x800000000000000f
type 0x0 pa 0x5c2c0000 va 0x0 pages 0x4 attr 0xf
type 0x1 pa 0x5c2c4000 va 0x0 pages 0x14 attr 0xf
type 0x7 pa 0x5c2d8000 va 0x0 pages 0x103b attr 0xf
type 0x4 pa 0x5d313000 va 0x0 pages 0x3e5 attr 0xf
type 0x7 pa 0x5d6f8000 va 0x0 pages 0x8a attr 0xf
type 0x4 pa 0x5d782000 va 0x0 pages 0x1a36 attr 0xf
type 0x7 pa 0x5f1b8000 va 0x0 pages 0x27c attr 0xf
type 0x3 pa 0x5f434000 va 0x0 pages 0x16c attr 0xf
type 0x5 pa 0x5f5a0000 va 0x1189eab000 pages 0x90 attr 0x800000000000000f
type 0x7 pa 0x5f630000 va 0x0 pages 0x10 attr 0xf
type 0x6 pa 0x5f640000 va 0x1189f4b000 pages 0x120 attr 0x800000000000000f
type 0x7 pa 0x5f760000 va 0x0 pages 0x1a attr 0xf
type 0x4 pa 0x5f77a000 va 0x0 pages 0x886 attr 0xf
type 0xb pa 0x4000000 va 0x118a06b000 pages 0x4000 attr 0x8000000000000001
type 0xb pa 0x9010000 va 0x118e06b000 pages 0x1 attr 0x8000000000000001
[ using 983544 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) #172: Thu Feb  8 00:22:56 MST 2018
    dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC
real mem  = 480563200 (458MB)
avail mem = 438259712 (417MB)
mainbus0 at root: unknown model
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
efi0 at mainbus0: UEFI 2.6
efi0: EDK II rev 0x10000
ampintc0 at mainbus0 nirq 288, ncpu 1: "intc"
ampintcmsi0 at ampintc0: nspi 64
psci0 at mainbus0: PSCI 0.2
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 Unknown (0) Device
virtio31 at mainbus0: Virtio Block Device
vioblk0 at virtio31
scsibus0 at vioblk0: 2 targets
sd0 at scsibus0 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed
sd0: 20480MB, 512 bytes/sector, 41943040 sectors
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:12:34:56
virtio32: irq
pluart0 at mainbus0: console
agtimer0 at mainbus0: tick rate 25000 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 (6bec114a1cc40924.a) swap on sd0b dump on sd0b
Automatic boot in progress: starting file system checks.
/dev/sd0a (6bec114a1cc40924.a): file system is clean; not checking
/dev/sd0d (6bec114a1cc40924.d): file system is clean; not checking
/dev/sd0f (6bec114a1cc40924.f): file system is clean; not checking
/dev/sd0e (6bec114a1cc40924.e): file system is clean; not checking
setting tty flags
pf enabled
starting network
vio0: bound to 10.0.2.15 from 10.0.2.2 (52:55:0a:00:02:02)
sh(97431) in realloc(): use after free 0x11a8cc6ee0
Abort trap (core dumped)
reordering libraries: done.
starting early daemons: syslogdAbort trap (core dumped)
 pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
starting local daemons: cron.
Sat Feb 10 21:52:53 AEDT 2018
reorder_kernel: kernel relinking failed; see /usr/share/relink/kernel/GENERIC/relink.log

OpenBSD/arm64 (openbsd-arm64-vm.my.domain) (console)


Cheers,
Matt

[1] - https://traverse.com.au/products/ls1043v-vdsl-gateway/
[2] - https://gitlab.com/traversetech/muvirt



Reply via email to