@@ -922,6 +922,28 @@ static void make_acpi_gtdt(libxl__gc *gc, struct xc_dom_image *dom)
dom->acpitable_size += dom->acpitable_blob->gtdt.size;
}
+static void make_acpi_fadt(libxl__gc *gc, struct xc_dom_image *dom)
+{
+ struct acpi_fadt_descriptor *fadt;
+
+ fadt = libxl__zalloc(gc, sizeof(*fadt));
+
+ /* Hardware Reduced = 1 and use PSCI 0.2+ and with HVC */
+ fadt->flags = 1 << ACPI_FADT_F_HW_REDUCED_ACPI;
+ fadt->arm_boot_flags = (1 << ACPI_FADT_ARM_USE_PSCI_G_0_2) |
+ (1 << ACPI_FADT_ARM_PSCI_USE_HVC);
+
+ /* ACPI v5.1 (fadt->revision.fadt->minor_revision) */
+ fadt->minor_revision = 0x1;
+
+ make_acpi_header(&fadt->header, "FACP", sizeof(*fadt), 5);
+
+ dom->acpitable_blob->fadt.table = (void *)fadt;
+ /* Align to 64bit. */
+ dom->acpitable_blob->fadt.size = sizeof(*fadt);
+ dom->acpitable_size += dom->acpitable_blob->fadt.size;
+}
+
static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
libxl__domain_build_state *state,
struct xc_dom_image *dom)
@@ -943,6 +965,7 @@ static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
dom->acpitable_size = 0;
make_acpi_gtdt(gc, dom);
+ make_acpi_fadt(gc, dom);
return 0;
}