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 perspecitve, 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)
On ARM platforms, you can create an FDT and use the VM configuration
load option to load it into guest memory (see load
in the VM Configuration Reference
chapter).
- Start with the FDT supplied with your hardware platform.
- If the FDT isn't available in human-readable format, use a dtc utility to convert the binary FDT into a *.dts human-readable file.
- Edit the human-readable file, removing all entries except those describing the devices you will pass through to the guest.
- Use your dtc utility to create a new FDT binary file (*.dtb) from your edited file.
- In the configuration for the VM that will host the guest that needs the FDT
information, use the load option to load
it into your guest's memory. For example, the following VM configuration
loads the fdt_foo.dtb FDT binary into guest memory and
passes a USB device with three channels through to the guest:
fdt load ./fdt_foo.dtb ## USB2.0 Host (EHCI/OHCI) channels 0,1,2 pass loc 0xEE080000,0x1000,rw pass loc 0xEE0A0000,0x1000,rw pass loc 0xEE0C0000,0x1000,rw pass intr gic:144
If your guest requires additional information from an FDT (e.g., CPUs, clocks), you can use the same method to load an FDT with the relevant information into the guest's memory.
- For information about how to reference a vdev FDT node from a user-provided
FDT, see
Referencing a vdev FDT node from a user-provided FDT
in this chapter. - 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.
