[PATCH] acpi: madt: Fix ITS subtable length check
Alex Hung
alex.hung at canonical.com
Thu Jul 14 06:50:39 UTC 2016
On 2016-07-14 02:41 AM, Jeffrey Hugo wrote:
> The ACPI spec defines the MADT GIC ITS subtable length as 20 bytes. The
> test is checking to see if the subtable is 16 bytes in length which causes
> an invalid test failure for MADT tables with GIC ITS subtables that follow
> the spec.
>
> Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
> ---
> src/acpi/madt/madt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index b65b89e..65d3962 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -183,7 +183,7 @@ static struct acpi_madt_subtable_lengths spec_info[] = {
> .madt_version = 3,
> .num_types = 16,
> .lengths = { 8, 12, 10, 8, 6, 12, 16, SUBTABLE_VARIABLE,
> - 16, 16, 12, 80, 24, 24, 16, 16 }
> + 16, 16, 12, 80, 24, 24, 16, 20 }
> },
Hi Jeffrey,
Thanks a lot for pointing this out.
I noticed the ITS's length is 16 in ACPI 6.0 and it is updated to 20 in
ACPI 6.1 (See revision history "1487 The Length of GIC ITS Structure is
wrong"). However, the madt's revision also changed from 3 to 4
1. talk about to this change in this patch
2. keep the original structure and add a new structure for revision 4, ex.
{ /* for ACPI 6.0 */
.major_version = 6,
.minor_version = 0,
.madt_version = 3,
.num_types = 16,
.lengths = { 8, 12, 10, 8, 6, 12, 16, SUBTABLE_VARIABLE,
16, 16, 12, 80, 24, 24, 16, 16 }
},
{ /* for ACPI 6.1 */
.major_version = 6,
.minor_version = 0,
.madt_version = 4,
.num_types = 16,
.lengths = { 8, 12, 10, 8, 6, 12, 16, SUBTABLE_VARIABLE,
16, 16, 12, 80, 24, 24, 16, 20 }
Hi Al,
Will you be able to give some suggestions?
> { /* terminator */
> .major_version = 0,
>
--
Cheers,
Alex Hung
More information about the fwts-devel
mailing list