@@ -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;
}