[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 09/16] libxl/arm: Construct ACPI MADT table
On 16/08/2016 06:25, Shannon Zhao wrote: From: Shannon Zhao <shannon.zhao@xxxxxxxxxx> According to the GIC version, construct the MADT table. Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx> --- tools/libxl/libxl_arm_acpi.c | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c index 28fb6fe..75dfcc2 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -203,6 +203,89 @@ static void make_acpi_gtdt(libxl__gc *gc, struct xc_dom_image *dom, acpitables[GTDT].size); } +static void make_acpi_madt_gicc(void *table, int nr_cpus, uint64_t gicc_base) +{ + uint32_t i; Please don't mix the type. Either i should be int or nr_cpus uint32_t. + struct acpi_madt_generic_interrupt *gicc = table; + + for (i = 0; i < nr_cpus; i++) { + gicc->header.type = ACPI_MADT_TYPE_GENERIC_INTERRUPT; + gicc->header.length = sizeof(*gicc); + gicc->base_address = gicc_base; + gicc->cpu_interface_number = i; + gicc->arm_mpidr = libxl__compute_mpdir(i); + gicc->uid = i; + gicc->flags = ACPI_MADT_ENABLED; + gicc++; + } +} Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |