[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 07/17] libxl/arm: Construct ACPI GTDT table
On 23/06/16 17:26, Julien Grall wrote: enum { RSDP, XSDT, @@ -110,6 +113,30 @@ static void make_acpi_xsdt(libxl__gc *gc, struct xc_dom_image *dom) dom->acpitable_size += ROUNDUP(acpitables[XSDT].size, 3); } +static void make_acpi_gtdt(libxl__gc *gc, struct xc_dom_image *dom) +{ + struct acpi_table_gtdt *gtdt; + size_t size = sizeof(*gtdt); + + gtdt = libxl__zalloc(gc, size); + + gtdt->non_secure_el1_interrupt = GUEST_TIMER_PHYS_NS_PPI; + gtdt->non_secure_el1_flags = + (ACPI_LEVEL_SENSITIVE << ACPI_GTDT_INTERRUPT_MODE) + |(ACPI_ACTIVE_LOW << ACPI_GTDT_INTERRUPT_POLARITY); + gtdt->virtual_timer_interrupt = GUEST_TIMER_VIRT_PPI; + gtdt->virtual_timer_flags = + (ACPI_LEVEL_SENSITIVE << ACPI_GTDT_INTERRUPT_MODE) + |(ACPI_ACTIVE_LOW << ACPI_GTDT_INTERRUPT_POLARITY); + + make_acpi_header(>dt->header, "GTDT", size, 2); + + acpitables[GTDT].table = gtdt; + acpitables[GTDT].size = size; + /* Align to 64bit. */ + dom->acpitable_size += ROUNDUP(acpitables[GTDT].size, 3);I am not sure how ROUNDUP(..., 3) will align to 64-bit. Hmmm I found why. The ROUNDUP macro in libxl is taking an order which is odd. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |