tools/libxl: arm: Use an higher value for the GIC phandle

The partial device tree may contains phandle. The Device Tree Compiler
tends to allocate the phandle from 1.

Reserve the ID 65000 for the GIC phandle. I think we can safely assume
that the partial device tree will never contain a such ID.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Julien Grall authored and Ian Campbell committed 2015-05-21 15:12:08 +01:00
1 parent 51c2d7bd4d
commit c3ba52a84d
3 files changed
+10 -4

No files matched your search

+3
View File
@@ -470,6 +470,9 @@ the user to defined aliases which can be used by the guest kernel.
Given the complexity of verifying the validity of a device tree, this
option should only be used with trusted device tree.
Note that the partial device tree should avoid to use the phandle 65000
which is reserved by the toolstack.
=back
=head2 Devices
+5 -4
View File
@@ -81,10 +81,11 @@ static struct arch_info {
{"xen-3.0-aarch64", "arm,armv8-timer", "arm,armv8" },
};
enum {
PHANDLE_NONE = 0,
PHANDLE_GIC,
};
/*
* The device tree compiler (DTC) is allocating the phandle from 1 to
* onwards. Reserve a high value for the GIC phandle.
*/
#define PHANDLE_GIC (65000)
typedef uint32_t be32;
typedef be32 gic_interrupt[3];
+2
View File
@@ -416,6 +416,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
# Given the complexity of verifying the validity of a device tree,
# libxl doesn't do any security check on it. It's the responsibility
# of the caller to provide only trusted device tree.
# Note that the partial device tree should avoid to use the phandle
# 65000 which is reserved by the toolstack.
("device_tree", string),
("u", KeyedUnion(None, libxl_domain_type, "type",
[("hvm", Struct(None, [("firmware", string),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.