tools/(lib)xl: Add partial device tree support for ARM
authorJulien Grall <julien.grall@linaro.org>
Wed, 13 May 2015 18:33:38 +0000 (19:33 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 14:11:59 +0000 (15:11 +0100)
commit51c2d7bd4d5c88bddc409964ae1739afbc64a1bb
tree1215b4113bc34016a580357c3f12e901c6cfb376
parent4b7fbef6fb309cc3058b5d7eb4c75996693f6401
tools/(lib)xl: Add partial device tree support for ARM

Allow the user to pass additional nodes to the guest device tree. For
this purpose, everything in the node /passthrough from the partial
device tree will be copied into the guest device tree.

The node /aliases will be also copied to allow the user to define
aliases which can be used by the guest kernel.

A simple partial device tree will look like:

/dts-v1/;

/ {
        #address-cells = <2>;
        #size-cells = <2>;

        passthrough {
            compatible = "simple-bus";
            ranges;
            #address-cells = <2>;
            #size-cells = <2>;

            /* List of your nodes */
        }
};

Note that:
    * The interrupt-parent property will be added by the toolstack in
    the root node
    * The properties compatible, ranges, #address-cells and #size-cells
    in /passthrough are mandatory.

The helpers provided by the libfdt don't perform all the necessary
security check on a given device tree. Therefore, only trusted device
tree should be used.

Note: The partial device tree code requires the presence of libfdt
functions which have been only correctly exported in libfdt 1.4.0 and
higher. All the major distributions but Debian Wheezy are using v1.4.0
or higher. It has been decided to disable partial device tree support on
OSes where libfdt doesn't meet the requirement.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
docs/man/xl.cfg.pod.5
tools/config.h.in
tools/configure
tools/configure.ac
tools/libxl/libxl_arm.c
tools/libxl/libxl_types.idl
tools/libxl/xl_cmdimpl.c