QNX / Page-Fault question


devin.acrn@...
 

Hello,

I'm completely new to ACRN (only having learned about it yesterday). Let me know if this is not the proper group to post this question to.

Should ACRN support any OS or does the OS require explicit support in order to work with ACRN? Or similarly, does ACRN require specific support for certain OSes?

As an example, should I be able to run QNX on the ACRN hypervisor, or would it/ACRN need some sort of support built-in?

I'm basing my experiment on the information from the following pages and trying to apply it to boot QNX:
https://projectacrn.github.io/latest/getting-started/apl-nuc.html
https://projectacrn.github.io/latest/tutorials/using_vxworks_as_uos.html

I have an EFI file named QNX.efi that I can boot on a NUC7i3DNB when booting on bare metal just fine. However when I try to boot this on the ACRN hypervisor I get a page fault error (which I'll copy below).

My launch file is based on the launch_vxworks.sh file but has a few changes, including the following for acrn-dm parameters. Is there anything obviously wrong with it?
acrn-dm \
  -A \
  -m $mem_size \
  -c $2 \
  -s 0:0,hostbridge \
  -s 1:0,lpc \
  -s 2,pci-gvt \
  -G "10 128 6" \
  -l com1,stdio \
  -s 5,virtio-console,@pty:pty_port \
  -s 6,virtio-hyper_dmabuf \
  -s 3,virtio-blk,./qnx.img \
  --virtio_poll 1000000 \
  --ovmf ./OVMF.fd \
  --lapic_pt \
  $vm_name

I can change the QNX.efi to a shell.efi, as an sanity check, and the EFI shell boots up just fine. If I try to launch the QNX.efi from within the EFI shell then I get the same page fault error.

The error that I'm getting is copied below. Where would this error be coming from? Would it be OVMF.fd, the ACRN hypervisor, or something else (like the QNX bootloader)?

!!!! X64 Exception Type - 0E(#PF - Page-Fault)  CPU Apic ID - 00000000 !!!!
ExceptionData - 0000000000000000  I:0 R:0 U:0 W:0 P:0 PK:0 S:0
RIP  - 0000000001400B64, CS  - 0000000000000038, RFLAGS - 0000000000011006
RAX  - 0000000000000000, RCX - 0000000000000001, RDX - 0000000000000800
RBX  - 0000000000000063, RSP - 00000000014009A0, RBP - 000000000141E5A0
RSI  - 0000000001400A40, RDI - 000000000141E5A0
R8   - 000000007FFA0000, R9  - 0000000000000000, R10 - 0000000000019000
R11  - 0000000001F94618, R12 - 00000000FFFFFFFC, R13 - 0000000001400A40
R14  - 00000000014009EF, R15 - 00000000FEE00000
DS   - 0000000000000030, ES  - 0000000000000030, FS  - 0000000000000030
GS   - 0000000000000030, SS  - 0000000000000030
CR0  - 0000000080010033, CR2 - FFFFFFFFCBE02874, CR3 - 000000007FC01000
CR4  - 00000000000006A8, CR8 - 0000000000000000
DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 000000007FBEEA98 0000000000000047, LDTR - 0000000000000000
IDTR - 000000007F914018 0000000000000FFF,   TR - 0000000000000000
FXSAVE_STATE - 0000000001400600
!!!! Can't find image information. !!!!

Any help/advice would be appreciated. Is what I'm attempting reasonable or should I not expect an OS like QNX to run on the ACRN hypervisor?

As a side question, are there build instructions for the ACRN fork of edk2 (https://github.com/projectacrn/acrn-edk2)? When I try building it I end up with an OVMF.fd file that's exactly the same size as when I build the regular edk2, which seems unlikely so I imagine that I'm doing something wrong. I found the following build instructions for edk2 (I'm using Ubuntu to build it): https://wiki.ubuntu.com/UEFI/EDK2. Would those instructions need any changes to build OVMF.fd from acrn-edk2?
 

Many thanks,
Devin