[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v3 13/17] libxl/arm: Construct ACPI DSDT table



From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>

Copy the static DSDT table into ACPI blob.

Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
 tools/libxl/libxl_arm_acpi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
index 6075391..368db04 100644
--- a/tools/libxl/libxl_arm_acpi.c
+++ b/tools/libxl/libxl_arm_acpi.c
@@ -298,6 +298,15 @@ static void make_acpi_fadt(libxl__gc *gc, struct 
xc_dom_image *dom,
                        acpitables[FADT].size);
 }
 
+static void make_acpi_dsdt(libxl__gc *gc, struct xc_dom_image *dom,
+                           struct acpitable acpitables[])
+{
+    uint64_t offset = acpitables[DSDT].addr - GUEST_ACPI_BASE;
+    void *dsdt = dom->acpitable_blob + offset;
+
+    memcpy(dsdt, dsdt_anycpu_arm, dsdt_anycpu_arm_len);
+}
+
 int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
                         libxl__domain_build_state *state,
                         struct xc_dom_image *dom)
@@ -331,6 +340,7 @@ int libxl__prepare_acpi(libxl__gc *gc, 
libxl_domain_build_info *info,
        return rc;
 
     make_acpi_fadt(gc, dom, acpitables);
+    make_acpi_dsdt(gc, dom, acpitables);
 
     return 0;
 }
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.