On Thu, 6 Oct 2022, Miguel Luis wrote: > MADT has been updated with the GIC Structures from ACPI 6.0 Errata A > and so MADT revision and GICC Structure must be updated also. > > Fixes: 37f33084ed2e ("acpi: arm/virt: madt: use build_append_int_noprefix() > API to compose MADT table") > > Signed-off-by: Miguel Luis <miguel.l...@oracle.com> Reviewed-by: Ani Sinha <a...@anisinha.ca> > --- > hw/arm/virt-acpi-build.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index 72bb6f61a5..2d21e3cec4 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -686,7 +686,7 @@ build_dbg2(GArray *table_data, BIOSLinker *linker, > VirtMachineState *vms) > }; > > /* > - * ACPI spec, Revision 5.1 Errata A > + * ACPI spec, Revision 6.0 Errata A > * 5.2.12 Multiple APIC Description Table (MADT) > */ > static void build_append_gicr(GArray *table_data, uint64_t base, uint32_t > size) > @@ -705,7 +705,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, > VirtMachineState *vms) > int i; > VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); > const MemMapEntry *memmap = vms->memmap; > - AcpiTable table = { .sig = "APIC", .rev = 3, .oem_id = vms->oem_id, > + AcpiTable table = { .sig = "APIC", .rev = 4, .oem_id = vms->oem_id, > .oem_table_id = vms->oem_table_id }; > > acpi_table_begin(&table, table_data); > @@ -740,7 +740,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, > VirtMachineState *vms) > > /* 5.2.12.14 GIC Structure */ > build_append_int_noprefix(table_data, 0xB, 1); /* Type */ > - build_append_int_noprefix(table_data, 76, 1); /* Length */ > + build_append_int_noprefix(table_data, 80, 1); /* Length */ > build_append_int_noprefix(table_data, 0, 2); /* Reserved */ > build_append_int_noprefix(table_data, i, 4); /* GIC ID */ > build_append_int_noprefix(table_data, i, 4); /* ACPI Processor > UID */ > @@ -760,6 +760,10 @@ build_madt(GArray *table_data, BIOSLinker *linker, > VirtMachineState *vms) > build_append_int_noprefix(table_data, 0, 8); /* GICR Base > Address*/ > /* MPIDR */ > build_append_int_noprefix(table_data, armcpu->mp_affinity, 8); > + /* Processor Power Efficiency Class */ > + build_append_int_noprefix(table_data, 0, 1); > + /* Reserved */ > + build_append_int_noprefix(table_data, 0, 3); > } > > if (vms->gic_version != VIRT_GIC_VERSION_2) { > @@ -771,12 +775,6 @@ build_madt(GArray *table_data, BIOSLinker *linker, > VirtMachineState *vms) > } > > if (its_class_name() && !vmc->no_its) { > - /* > - * FIXME: Structure is from Revision 6.0 where 'GIC Structure' > - * has additional fields on top of implemented 5.1 Errata A, > - * to make it consistent with v6.0 we need to bump everything > - * to v6.0 > - */ > /* > * ACPI spec, Revision 6.0 Errata A > * (original 6.0 definition has invalid Length) > -- > 2.37.3 > >