ACK: [PATCH V2 1/3] acpi: madt: Use 20 as the GIC ITS node length
Alex Hung
alex.hung at canonical.com
Mon Jul 25 01:23:20 UTC 2016
On 2016-07-22 03:58 AM, Jeffrey Hugo wrote:
> The ACPI 6.0 spec technically defines the GIC ITS node length as 16,
> however the conbination of all defined fields is 20 bytes, so the length is
> really 20. The spec defined length is corrected in following revisions of
> the spec.
>
> 20 is what ACPI implementations are expected to be using in practice, so
> updating the test to use 20 despite the spec definition has the test match
> the real world, updates the test implementation to match the test
> documentation, and allows the test to correctly find the start of any nodes
> following a GIC ITS node in the MADT table.
>
> Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
> ---
> src/acpi/madt/madt.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index e260222..141405d 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -183,7 +183,15 @@ 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 }
> + /*
> + * The spec technically defines the GIC ITS node length to be
> + * 16, but this is a clear mistake as the fields add up to be
> + * length 20, and the length was corrected in the next revision.
> + * Test for 20, as that is what is expected to be used in real,
> + * implementations and using length 20 ensures that the test can
> + * correctly find the start of any following nodes.
> + */
> },
> { /* terminator */
> .major_version = 0,
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list