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

[Xen-devel] [PATCH RESEND 10/14] libxl/arm: Construct ACPI RSDP table



From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>

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

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 84ea8b6..1bef9b0 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -1082,6 +1082,23 @@ static void make_acpi_xsdt(libxl__gc *gc, struct 
xc_dom_image *dom)
     dom->acpitable_size += dom->acpitable_blob->xsdt.size;
 }
 
+static void make_acpi_rsdp(libxl__gc *gc, struct xc_dom_image *dom)
+{
+    struct acpi_rsdp_descriptor *rsdp;
+
+    rsdp = libxl__zalloc(gc, sizeof(*rsdp));
+    memcpy(&rsdp->signature, "RSD PTR ", sizeof(rsdp->signature));
+    memcpy(rsdp->oem_id, ACPI_BUILD_APPNAME6, sizeof(rsdp->oem_id));
+    rsdp->length = sizeof(*rsdp);
+    rsdp->revision = 0x02;
+    rsdp->checksum = 0;
+
+    dom->acpitable_blob->rsdp.table = (void *)rsdp;
+    /* Align to 64bit. */
+    dom->acpitable_blob->rsdp.size = sizeof(*rsdp);
+    dom->acpitable_size += dom->acpitable_blob->rsdp.size;
+}
+
 static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
                         libxl__domain_build_state *state,
                         struct xc_dom_image *dom)
@@ -1111,6 +1128,7 @@ static int prepare_acpi(libxl__gc *gc, 
libxl_domain_build_info *info,
        return rc;
 
     make_acpi_xsdt(gc, dom);
+    make_acpi_rsdp(gc, dom);
 
     return 0;
 }
-- 
2.0.4



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

 


Rackspace

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