boards/blackberry/qnxhv_vm/doc/index.rst
.. zephyr:board:: qnxhv_vm
Overview
This board enables running Zephyr as a guest inside a QNX Hypervisor virtual machine.
This is an example configuration. VM layouts are typically unique per product, so you will likely need to adjust the devicetree and Kconfig options to match your VM configuration (memory map, interrupt routing, clocks, devices, etc.).
Hardware
.. zephyr:board-supported-hw::
.. _qvmconf:
The virtual hardware exposed to the guest depends on the VM configuration file. The above features are supported by following configuration.
.. code-block::
system zephyr
cpu
ram 0x80000000,128M
vdev gic version 2
load ./zephyr.elf
vdev pl011 hostdev >- # QVM console (stdout/stderr), keeps early output visible loc 0x1c090000 intr gic:37
vdev virtio-console loc 0x20000000 intr gic:42
vdev virtio-entropy loc 0x1c0e0000 intr gic:43
Building and Running
Use this board configuration to run basic Zephyr applications as a guest.
For example, build the :zephyr:code-sample:synchronization sample:
.. zephyr-app-commands:: :zephyr-app: samples/synchronization :board: qnxhv_vm :goals: build
This produces a guest image (e.g. zephyr/zephyr.elf) under the build directory.
You also need to create .qvmconf file to configure virtual machine.
:ref:qvmconf is a example QVM configuration which is support by default
qnxhv_vm configuration.
Here, create a file named zephyr.qvmconf with the contents of this example.
Transfer both the Zephyr image and the QVM configuration file to the QNX Hypervisor machine, then start the VM:
.. code-block:: console
qvm @zephyr.qvmconf
You will see Zephyr output:
.. code-block:: console
*** Booting Zephyr OS build v4.3.0-3524-g5c47f098ffc4 *** thread_a: Hello World from cpu 0 on qnxhv_vm! thread_b: Hello World from cpu 0 on qnxhv_vm! thread_a: Hello World from cpu 0 on qnxhv_vm! thread_b: Hello World from cpu 0 on qnxhv_vm! thread_a: Hello World from cpu 0 on qnxhv_vm!
Use :kbd:CTRL+C to stop the virtual machine.
References
QNX Hypervisor User's Guide (VM configuration) <https://www.qnx.com/developers/docs/8.0/com.qnx.doc.hypervisor.user/topic/vm/vm.html>_