From 23a659e190cf3ed0edd46cddf12bbbcfeaa09396 Mon Sep 17 00:00:00 2001 From: Piotr Maziarz Date: Thu, 16 Dec 2021 17:43:12 +0100 Subject: iASL: NHLT: Treat Terminator as SpecificConfig SpecificConfig has 4 bytes of size and then an amount of bytes specified by size. All of the terminators that I've seen had a size equal to 4, but theoretically it can vary. --- source/compiler/dttable2.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/compiler') diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c index 854063611..f0481928d 100644 --- a/source/compiler/dttable2.c +++ b/source/compiler/dttable2.c @@ -1143,11 +1143,21 @@ DtCompileNhlt ( /* * All Endpoint Descriptors are completed. - * Do the table terminator structure (not in NHLT spec, optional) + * Do the table terminator specific config (not in NHLT spec, optional) */ if (*PFieldList && (strcmp ((const char *) (*PFieldList)->Name, "Descriptor Length"))) { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt8, + Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5b, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3a, &Subtable); if (ACPI_FAILURE (Status)) { -- cgit v1.2.1