ACPICA: DT compiler: prevent error if optional field at the end of table is not present
authorErik Schmauss <erik.schmauss@intel.com>
Wed, 3 Jan 2018 23:06:27 +0000 (15:06 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Jan 2018 00:33:23 +0000 (01:33 +0100)
ACPICA commit a7f73af9003bf4e730db5a133300c01ba7992a01

The data table compiler throws under the following conditions:
 1.) there is a table with a last field that is optional
 2.) if the optional field is not present
 3.) the optional field is the last line of the data table

A change was made to dt_compile_table to return an AE_EOF under
these conditions.  This AE_EOF means that we are at the end of the
file.  The caller to dt_compile_table() is responsible for handling
this case. For DBG2 table, we will complete the compilation of this
subtable.  For other tables, this could be different.

Link: https://github.com/acpica/acpica/commit/a7f73af9
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/acpi/acexcep.h

index e1f9fe47f69e5821e4ef312e4395079136ce7982..3c46f0ef5f7a7c07ed46b6497fa5ea4471549cbf 100644 (file)
@@ -130,8 +130,9 @@ struct acpi_exception_info {
 #define AE_HEX_OVERFLOW                 EXCEP_ENV (0x0020)
 #define AE_DECIMAL_OVERFLOW             EXCEP_ENV (0x0021)
 #define AE_OCTAL_OVERFLOW               EXCEP_ENV (0x0022)
+#define AE_END_OF_TABLE                 EXCEP_ENV (0x0023)
 
-#define AE_CODE_ENV_MAX                 0x0022
+#define AE_CODE_ENV_MAX                 0x0023
 
 /*
  * Programmer exceptions
@@ -275,7 +276,8 @@ static const struct acpi_exception_info acpi_gbl_exception_names_env[] = {
        EXCEP_TXT("AE_DECIMAL_OVERFLOW",
                  "Overflow during ASCII decimal-to-binary conversion"),
        EXCEP_TXT("AE_OCTAL_OVERFLOW",
-                 "Overflow during ASCII octal-to-binary conversion")
+                 "Overflow during ASCII octal-to-binary conversion"),
+       EXCEP_TXT("AE_END_OF_TABLE", "Reached the end of table")
 };
 
 static const struct acpi_exception_info acpi_gbl_exception_names_pgm[] = {