ACPI tables and FDTs
QNX hypervisor VMs make Advanced Configuration and Power Interface (ACPI) tables and Flattened Device Trees (FDTs) available to their guests.
In a QNX hypervisor system, devices available to a guest are specified in the configuration for its VM (i.e., its hosting qvm process instance). If the guest requires ACPI tables or an FDT in order to enumerate the devices available to it, you can modify ACPI tables and FDTs and have the corresponding qvm process instance load them into the guest's memory so the guest will find them when it starts.
ACPI tables (x86)
Guests running in QNX hypervisor VMs on x86 platforms can access ACPI tables for
their VMs. From the guest's perspective, these tables are in the same location in
the VM as they are in the hardware; that is, if the tables are at location
0x12340000
in host-physical memory, the guest will find them
at location 0x12340000
in guest-physical memory. Check the
specifications for your board for the location of the ACPI tables.
acpi load ./acpi_foo
will cause the qvm process instance to load the
acpi_foo file into guest memory as an ACPI table (see
loadin the
VM Configuration Referencechapter).
FDTs (ARM)
Guests running in VMs on ARM platforms can use FDTs to access devices. The way to configure an FDT in a VM is to provide an FDT overlay, which defines only the device properties that you want to override. This approach is taken for the following reasons:
- There is no need to include the parts that qvm generates, such as CPU information, the interrupt controller, or vdevs.
- Changing vdev properties such as compatible is easy. This is especially useful for the shmem vdev. You can define different compatible values for separate instances of this vdev to expose different device interface names in the FDT. This way, the guest OS can assign distinct drivers to interact with the different vdev shmem instances (and hence, they can be used for different purposes).
- Pass-through information can be inferred by qvm which removes the need to duplicate it between the FDT and the qvm configuration, thereby removing the chance for contradictions.
In this version of QNX Hypervisor, the FDT overlay must be provided to qvm in a device-tree binary (.dtb) file. To generate this binary file you must use the Device Tree Compiler (dtc) utility version 1.7 or higher. The input to this compiler is a device-tree source (.dts) file. This source file is not expected to define a full tree starting at a single root, but rather a collection of fragments that overlay specific nodes in a pre-existing tree which qvm supplies. For examples of files that define FDT overlays, go to our GitLab Repository at https://gitlab.com/qnx/hypervisor and look for the sample FDT projects.
- For more information about FDTs, see www.devicetree.org.
- A dtc utility is available from https://git.kernel.org/cgit/utils/dtc/dtc.git; a Device Tree Compiler Manual can be found at web.mit.edu/freebsd/head/contrib/dtc/Documentation/manual.txt.