[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 09/14] libxl/arm: Construct ACPI XSDT table
From: Shannon Zhao <shannon.zhao@xxxxxxxxxx> Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx> --- tools/libxl/libxl_arm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index f72f692..84ea8b6 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -1061,6 +1061,27 @@ static int make_acpi_madt(libxl__gc *gc, struct xc_dom_image *dom, int nr_cpus, return 0; } +static void make_acpi_xsdt(libxl__gc *gc, struct xc_dom_image *dom) +{ + uint32_t size; + struct acpi_xsdt_descriptor *xsdt; + + /* + * Currently only 3 tables(GTDT, FADT, MADT) are pointed by XSDT. Alloc + * entries for them but the entry values will be specified when they are + * copied to the guest memory. + */ + size = sizeof(*xsdt) + sizeof(uint64_t) * 3; + xsdt = libxl__zalloc(gc, size); + + make_acpi_header(&xsdt->header, "XSDT", size, 1); + + dom->acpitable_blob->xsdt.table = (void *)xsdt; + /* Align to 64bit. */ + dom->acpitable_blob->xsdt.size = size; + dom->acpitable_size += dom->acpitable_blob->xsdt.size; +} + static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, libxl__domain_build_state *state, struct xc_dom_image *dom) @@ -1089,6 +1110,8 @@ static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, if (rc) return rc; + make_acpi_xsdt(gc, dom); + return 0; } -- 2.0.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |