|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 05/17] libxl/arm: Construct ACPI RSDP table
From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
tools/libxl/libxl_arm_acpi.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c
index 60c31f9..5f332fa 100644
--- a/tools/libxl/libxl_arm_acpi.c
+++ b/tools/libxl/libxl_arm_acpi.c
@@ -53,6 +53,24 @@ struct acpitable {
static struct acpitable acpitables[NUMS];
+static void make_acpi_rsdp(libxl__gc *gc, struct xc_dom_image *dom)
+{
+ struct acpi_table_rsdp *rsdp;
+ size_t size = sizeof(*rsdp);
+
+ rsdp = libxl__zalloc(gc, size);
+ memcpy(rsdp->signature, "RSD PTR ", sizeof(rsdp->signature));
+ memcpy(rsdp->oem_id, ACPI_BUILD_APPNAME6, sizeof(rsdp->oem_id));
+ rsdp->length = size;
+ rsdp->revision = 0x02;
+ rsdp->checksum = 0;
+
+ acpitables[RSDP].table = rsdp;
+ acpitables[RSDP].size = size;
+ /* Align to 64 bit. */
+ dom->acpitable_size += ROUNDUP(acpitables[RSDP].size, 3);
+}
+
int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
libxl__domain_build_state *state,
struct xc_dom_image *dom)
@@ -73,6 +91,8 @@ int libxl__prepare_acpi(libxl__gc *gc,
libxl_domain_build_info *info,
dom->acpitable_blob = NULL;
dom->acpitable_size = 0;
+ make_acpi_rsdp(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 |