Skip to content

Commit 87cdece

Browse files
Erik Schmaussrafaeljw
authored andcommitted
ACPICA: DT compiler: prevent error if optional field at the end of table is not present
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: acpica/acpica@a7f73af9 Signed-off-by: Erik Schmauss <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ee174d3 commit 87cdece

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/acpi/acexcep.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ struct acpi_exception_info {
130130
#define AE_HEX_OVERFLOW EXCEP_ENV (0x0020)
131131
#define AE_DECIMAL_OVERFLOW EXCEP_ENV (0x0021)
132132
#define AE_OCTAL_OVERFLOW EXCEP_ENV (0x0022)
133+
#define AE_END_OF_TABLE EXCEP_ENV (0x0023)
133134

134-
#define AE_CODE_ENV_MAX 0x0022
135+
#define AE_CODE_ENV_MAX 0x0023
135136

136137
/*
137138
* Programmer exceptions
@@ -275,7 +276,8 @@ static const struct acpi_exception_info acpi_gbl_exception_names_env[] = {
275276
EXCEP_TXT("AE_DECIMAL_OVERFLOW",
276277
"Overflow during ASCII decimal-to-binary conversion"),
277278
EXCEP_TXT("AE_OCTAL_OVERFLOW",
278-
"Overflow during ASCII octal-to-binary conversion")
279+
"Overflow during ASCII octal-to-binary conversion"),
280+
EXCEP_TXT("AE_END_OF_TABLE", "Reached the end of table")
279281
};
280282

281283
static const struct acpi_exception_info acpi_gbl_exception_names_pgm[] = {

0 commit comments

Comments
 (0)