Patchwork data: syntaxcheck.json: add more advice info for common errors

login
register
mail settings
Submitter Colin King
Date Feb. 28, 2013, 10:40 p.m.
Message ID <1362091224-29182-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/224191/
State Accepted
Headers show

Comments

Colin King - Feb. 28, 2013, 10:40 p.m.
From: Colin Ian King <colin.king@canonical.com>

I've run some analysis on the most common and terse output from the
compiler and from this added some more advice information to explain
these errors in some more depth.  This patch also fixes up some old
references to ACPI 4.0 as well as a few mistakes in older messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 data/syntaxcheck.json | 151 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 141 insertions(+), 10 deletions(-)
Keng-Yu Lin - March 7, 2013, 5:32 a.m.
On Fri, Mar 1, 2013 at 6:40 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> I've run some analysis on the most common and terse output from the
> compiler and from this added some more advice information to explain
> these errors in some more depth.  This patch also fixes up some old
> references to ACPI 4.0 as well as a few mistakes in older messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  data/syntaxcheck.json | 151 ++++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 141 insertions(+), 10 deletions(-)
>
> diff --git a/data/syntaxcheck.json b/data/syntaxcheck.json
> index b3ceb55..4d9bd0f 100644
> --- a/data/syntaxcheck.json
> +++ b/data/syntaxcheck.json
> @@ -2,6 +2,138 @@
>   "erroradvice":
>   [
>    {
> +   "id": "ASL_MSG_FIELD_ACCESS_WIDTH",
> +   "advice": "The region needs to be at least as big as the access width."
> +  },
> +  {
> +   "id": "ASL_MSG_FIELD_UNIT_ACCESS_WIDTH",
> +   "advice": "The field plus the access width must not go beyond the end of the region."
> +  },
> +  {
> +   "id": "ASL_MSG_HID_SUFFIX",
> +   "advice": "The remaining characters (suffix) of the _HID string must be hexadecimal digits."
> +  },
> +  {
> +   "id": "ASL_MSG_ISA_ADDRESS",
> +   "advice": "The fixed I/O ISA address is illegal, it is greater than 0x03ff."
> +  },
> +  {
> +   "id": "ASL_MSG_LEADING_ASTERISK",
> +   "advice": "The leading character of the string is an asterisk '*'.  This is used by some platform manufacturers.  While this is allowed for a _CID, the compiler complains about this since a valid use of this has never been seen."
> +  },
> +  {
> +   "id": "ASL_MSG_LIST_LENGTH_LONG",
> +   "advice": "The package length is smaller than the length of the initializer list."
> +  },
> +  {
> +   "id": "ASL_MSG_LOCAL_INIT",
> +   "advice": "A local variable to a method has not been initialized. This is a bug and can lead to undefined execution behaviour."
> +  },
> +  {
> +   "id": "ASL_MSG_NAME_EXISTS",
> +   "advice": "The name already exists in this scope. The compiler will continue to process it."
> +  },
> +  {
> +   "id": "ASL_MSG_NO_REGION",
> +   "advice": "_REG requires a corresponding Operation Region, however one was not found."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_FOUND",
> +   "advice": "The name referenced by Scope() should exist, but does not; forward references for Scope() are not supported by the Microsoft Windows ACPI interpreter."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_METHOD",
> +   "advice": "The node type is not a method, so it cannot be invoked."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_REACHABLE",
> +   "advice": "The name exists in the name space, but not it could not be accessed from the scope."
> +  },
> +  {
> +   "id": "ASL_MSG_RESERVED_METHOD",
> +   "advice": "The reserved method must be a control method, this occurs for example for the _Lxx, _Exx, _Wxx or _Qxx methods, or for a predefined name that requires input arguments, or no return value from prefefined names such as _DIS, _INI, _IRC, _OFF, _ON, _PSx."
> +  },
> +  {
> +   "id": "ASL_MSG_RESERVED_OPERAND_TYPE",
> +   "advice": "The object type for the reserved name does not match the expected type."
> +  },
> +  {
> +   "id": "ASL_MSG_SCOPE_FWD_REF",
> +   "advice": "The Microsoft ACPI interpreter cannot handle a forward reference from the Scope() operator, so the compiler flags this up as an error."
> +  },
> +  {
> +   "id": "ASL_MSG_TAG_LARGER",
> +   "advice": "The resource tag length is larger than the field length."
> +  },
> +  {
> +   "id": "ASL_MSG_TAG_SMALLER",
> +   "advice": "The resource tag length is smaller than the field length."
> +  },
> +  {
> +   "id": "ASL_MSG_UNKNOWN_RESERVED_NAME",
> +   "advice": "The name does not match any of the known predefined names.  Names that start with an underscore '_' are reserved by the ACPI specification and so this name should be one of these known names."
> +  },
> +  {
> +   "id": "ASL_MSG_UNREACHABLE_CODE",
> +   "advice": "This occurs when there is some code following a Return() - this code is unreachable code, it cannot be executed, so it is most probably a bug."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_EXIST",
> +   "advice": "The referenced object could not be found during a name space lookup, it does not seem to exist."
> +  },
> +  {
> +   "id": "ASL_MSG_CORE_EXCEPTION",
> +   "advice": "An internel compiler core execption error has occurred performing a name space lookuop."
> +  },
> +  {
> +   "id": "ASL_MSG_DEBUG_FILE_OPEN",
> +   "advice": "The compiler could not open a debug file for output."
> +  },
> +  {
> +   "id": "ASL_MSG_DEBUG_FILENAME",
> +   "advice": "A debug filename could not be generated by the compiler."
> +  },
> +  {
> +   "id": "ASL_MSG_DEPENDENT_NESTING",
> +   "advice": "A resource descriptor nesting error has occurred."
> +  },
> +  {
> +   "id": "ASL_MSG_DUPLICATE_CASE",
> +   "advice": "A case value has already been specified."
> +  },
> +  {
> +   "id": "ASL_MSG_EARLY_EOF",
> +   "advice": "The End-Of-File was reached prematurely."
> +  },
> +  {
> +   "id": "ASL_MSG_CONSTANT_FOLDED",
> +   "advice": "The compiler has performed a constant folding optimization."
> +  },
> +  {
> +   "id": "ASL_MSG_CONSTANT_EVALUATION",
> +   "advice": "Failed to evaluate a constant expression, the compiler could not resolve a subtree for some unknown reason."
> +  },
> +  {
> +   "id": "ASL_MSG_CONNECTION_MISSING",
> +   "advice": "The compiler was parsing a FieldUnitList and was expecting a Connection() operator but instead found a NameSeg() opcode."
> +  },
> +  {
> +   "id": "ASL_MSG_CONNECTION_INVALID",
> +   "advice": "A Connection() operator is only valid for the GeneralPurposeIo and GenericSerialBus operation region SpaceIds."
> +  },
> +  {
> +   "id": "ASL_MSG_CLOSE",
> +   "advice": "An error occurred closing a file in the ASL compiler, this is a system error and should not normally occur."
> +  },
> +  {
> +   "id": "ASL_MSG_COMPILER_INTERNAL",
> +   "advice": "An error occurred inside the compiler."
> +  },
> +  {
> +   "id": "ASL_MSG_COMPILER_RESERVED",
> +   "advice": "This normally occurs when disassembled code is being compiled and it contains compiler-emitted names of the form '_T_x'.  This is just a remark generated by the compiler can can normally be ignored."
> +  },
> +  {
>     "id": "ASL_MSG_RETURN_TYPES",
>     "advice": "Some of the execution paths do not return a value.  All control paths that return must return a value otherwise unepected behaviour may occur.  This error occurs because a branch on an conditional op-code returns a value and another does not, which is inconsitent behaviour."
>    },
> @@ -23,7 +155,7 @@
>    },
>    {
>     "id": "ASL_MSG_ALPHANUMERIC_STRING",
> -   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of version 4.0a of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
> +   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
>    },
>    {
>     "id": "ASL_MSG_AML_NOT_IMPLEMENTED",
> @@ -39,7 +171,7 @@
>    },
>    {
>     "id": "ASL_MSG_ARG_INIT",
> -   "advice": "FIXME"
> +   "advice": "A reference argument has not been initialized."
>    },
>    {
>     "id": "ASL_MSG_BACKWARDS_OFFSET",
> @@ -51,7 +183,7 @@
>    },
>    {
>     "id": "ASL_MSG_DMA_CHANNEL",
> -   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See ACPI specification 4.0a, section 6.4.2.2 DMA Descriptor
> +   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See the ACPI specification, section 6.4.2.2, DMA Descriptor
>   for more details."
>    },
>    {
> @@ -76,11 +208,11 @@
>    },
>    {
>     "id": "ASL_MSG_INVALID_ADDR_FLAGS",
> -   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of version 4.0a of the ACPI specification for more details."
> +   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of the ACPI specification for more details."
>    },
>    {
>     "id": "ASL_MSG_INVALID_EISAID",
> -   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of version 4.0a of the ACPI specification for more details."
> +   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of the ACPI specification for more details."
>    },
>    {
>     "id": "ASL_MSG_INVALID_GRANULARITY",
> @@ -100,16 +232,15 @@
>    },
>    {
>     "id": "ASL_MSG_INVALID_PERFORMANCE",
> -   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
> +   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
>    },
>    {
>     "id": "ASL_MSG_INVALID_PRIORITY",
> -   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
> +   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
>    },
>    {
>     "id": "ASL_MSG_INVALID_TIME",
> -   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time)
> - of version 4.0a of the ACPI speciciation."
> +   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time) of the ACPI specification."
>    },
>    {
>     "id": "ASL_MSG_NAMED_OBJECT_IN_WHILE",
> @@ -153,7 +284,7 @@
>    },
>    {
>     "id": "ASL_MSG_SYNC_LEVEL",
> -   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of version 4.0a of the ACPI specification for more details."
> +   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of the ACPI specification for more details."
>    },
>    {
>     "id": "ASL_MSG_SYNTAX",
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung - March 11, 2013, 9:43 a.m.
On 03/01/2013 06:40 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> I've run some analysis on the most common and terse output from the
> compiler and from this added some more advice information to explain
> these errors in some more depth.  This patch also fixes up some old
> references to ACPI 4.0 as well as a few mistakes in older messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   data/syntaxcheck.json | 151 ++++++++++++++++++++++++++++++++++++++++++++++----
>   1 file changed, 141 insertions(+), 10 deletions(-)
>
> diff --git a/data/syntaxcheck.json b/data/syntaxcheck.json
> index b3ceb55..4d9bd0f 100644
> --- a/data/syntaxcheck.json
> +++ b/data/syntaxcheck.json
> @@ -2,6 +2,138 @@
>    "erroradvice":
>    [
>     {
> +   "id": "ASL_MSG_FIELD_ACCESS_WIDTH",
> +   "advice": "The region needs to be at least as big as the access width."
> +  },
> +  {
> +   "id": "ASL_MSG_FIELD_UNIT_ACCESS_WIDTH",
> +   "advice": "The field plus the access width must not go beyond the end of the region."
> +  },
> +  {
> +   "id": "ASL_MSG_HID_SUFFIX",
> +   "advice": "The remaining characters (suffix) of the _HID string must be hexadecimal digits."
> +  },
> +  {
> +   "id": "ASL_MSG_ISA_ADDRESS",
> +   "advice": "The fixed I/O ISA address is illegal, it is greater than 0x03ff."
> +  },
> +  {
> +   "id": "ASL_MSG_LEADING_ASTERISK",
> +   "advice": "The leading character of the string is an asterisk '*'.  This is used by some platform manufacturers.  While this is allowed for a _CID, the compiler complains about this since a valid use of this has never been seen."
> +  },
> +  {
> +   "id": "ASL_MSG_LIST_LENGTH_LONG",
> +   "advice": "The package length is smaller than the length of the initializer list."
> +  },
> +  {
> +   "id": "ASL_MSG_LOCAL_INIT",
> +   "advice": "A local variable to a method has not been initialized. This is a bug and can lead to undefined execution behaviour."
> +  },
> +  {
> +   "id": "ASL_MSG_NAME_EXISTS",
> +   "advice": "The name already exists in this scope. The compiler will continue to process it."
> +  },
> +  {
> +   "id": "ASL_MSG_NO_REGION",
> +   "advice": "_REG requires a corresponding Operation Region, however one was not found."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_FOUND",
> +   "advice": "The name referenced by Scope() should exist, but does not; forward references for Scope() are not supported by the Microsoft Windows ACPI interpreter."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_METHOD",
> +   "advice": "The node type is not a method, so it cannot be invoked."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_REACHABLE",
> +   "advice": "The name exists in the name space, but not it could not be accessed from the scope."
> +  },
> +  {
> +   "id": "ASL_MSG_RESERVED_METHOD",
> +   "advice": "The reserved method must be a control method, this occurs for example for the _Lxx, _Exx, _Wxx or _Qxx methods, or for a predefined name that requires input arguments, or no return value from prefefined names such as _DIS, _INI, _IRC, _OFF, _ON, _PSx."
> +  },
> +  {
> +   "id": "ASL_MSG_RESERVED_OPERAND_TYPE",
> +   "advice": "The object type for the reserved name does not match the expected type."
> +  },
> +  {
> +   "id": "ASL_MSG_SCOPE_FWD_REF",
> +   "advice": "The Microsoft ACPI interpreter cannot handle a forward reference from the Scope() operator, so the compiler flags this up as an error."
> +  },
> +  {
> +   "id": "ASL_MSG_TAG_LARGER",
> +   "advice": "The resource tag length is larger than the field length."
> +  },
> +  {
> +   "id": "ASL_MSG_TAG_SMALLER",
> +   "advice": "The resource tag length is smaller than the field length."
> +  },
> +  {
> +   "id": "ASL_MSG_UNKNOWN_RESERVED_NAME",
> +   "advice": "The name does not match any of the known predefined names.  Names that start with an underscore '_' are reserved by the ACPI specification and so this name should be one of these known names."
> +  },
> +  {
> +   "id": "ASL_MSG_UNREACHABLE_CODE",
> +   "advice": "This occurs when there is some code following a Return() - this code is unreachable code, it cannot be executed, so it is most probably a bug."
> +  },
> +  {
> +   "id": "ASL_MSG_NOT_EXIST",
> +   "advice": "The referenced object could not be found during a name space lookup, it does not seem to exist."
> +  },
> +  {
> +   "id": "ASL_MSG_CORE_EXCEPTION",
> +   "advice": "An internel compiler core execption error has occurred performing a name space lookuop."
> +  },
> +  {
> +   "id": "ASL_MSG_DEBUG_FILE_OPEN",
> +   "advice": "The compiler could not open a debug file for output."
> +  },
> +  {
> +   "id": "ASL_MSG_DEBUG_FILENAME",
> +   "advice": "A debug filename could not be generated by the compiler."
> +  },
> +  {
> +   "id": "ASL_MSG_DEPENDENT_NESTING",
> +   "advice": "A resource descriptor nesting error has occurred."
> +  },
> +  {
> +   "id": "ASL_MSG_DUPLICATE_CASE",
> +   "advice": "A case value has already been specified."
> +  },
> +  {
> +   "id": "ASL_MSG_EARLY_EOF",
> +   "advice": "The End-Of-File was reached prematurely."
> +  },
> +  {
> +   "id": "ASL_MSG_CONSTANT_FOLDED",
> +   "advice": "The compiler has performed a constant folding optimization."
> +  },
> +  {
> +   "id": "ASL_MSG_CONSTANT_EVALUATION",
> +   "advice": "Failed to evaluate a constant expression, the compiler could not resolve a subtree for some unknown reason."
> +  },
> +  {
> +   "id": "ASL_MSG_CONNECTION_MISSING",
> +   "advice": "The compiler was parsing a FieldUnitList and was expecting a Connection() operator but instead found a NameSeg() opcode."
> +  },
> +  {
> +   "id": "ASL_MSG_CONNECTION_INVALID",
> +   "advice": "A Connection() operator is only valid for the GeneralPurposeIo and GenericSerialBus operation region SpaceIds."
> +  },
> +  {
> +   "id": "ASL_MSG_CLOSE",
> +   "advice": "An error occurred closing a file in the ASL compiler, this is a system error and should not normally occur."
> +  },
> +  {
> +   "id": "ASL_MSG_COMPILER_INTERNAL",
> +   "advice": "An error occurred inside the compiler."
> +  },
> +  {
> +   "id": "ASL_MSG_COMPILER_RESERVED",
> +   "advice": "This normally occurs when disassembled code is being compiled and it contains compiler-emitted names of the form '_T_x'.  This is just a remark generated by the compiler can can normally be ignored."
> +  },
> +  {
>      "id": "ASL_MSG_RETURN_TYPES",
>      "advice": "Some of the execution paths do not return a value.  All control paths that return must return a value otherwise unepected behaviour may occur.  This error occurs because a branch on an conditional op-code returns a value and another does not, which is inconsitent behaviour."
>     },
> @@ -23,7 +155,7 @@
>     },
>     {
>      "id": "ASL_MSG_ALPHANUMERIC_STRING",
> -   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of version 4.0a of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
> +   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
>     },
>     {
>      "id": "ASL_MSG_AML_NOT_IMPLEMENTED",
> @@ -39,7 +171,7 @@
>     },
>     {
>      "id": "ASL_MSG_ARG_INIT",
> -   "advice": "FIXME"
> +   "advice": "A reference argument has not been initialized."
>     },
>     {
>      "id": "ASL_MSG_BACKWARDS_OFFSET",
> @@ -51,7 +183,7 @@
>     },
>     {
>      "id": "ASL_MSG_DMA_CHANNEL",
> -   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See ACPI specification 4.0a, section 6.4.2.2 DMA Descriptor
> +   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See the ACPI specification, section 6.4.2.2, DMA Descriptor
>    for more details."
>     },
>     {
> @@ -76,11 +208,11 @@
>     },
>     {
>      "id": "ASL_MSG_INVALID_ADDR_FLAGS",
> -   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of version 4.0a of the ACPI specification for more details."
> +   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of the ACPI specification for more details."
>     },
>     {
>      "id": "ASL_MSG_INVALID_EISAID",
> -   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of version 4.0a of the ACPI specification for more details."
> +   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of the ACPI specification for more details."
>     },
>     {
>      "id": "ASL_MSG_INVALID_GRANULARITY",
> @@ -100,16 +232,15 @@
>     },
>     {
>      "id": "ASL_MSG_INVALID_PERFORMANCE",
> -   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
> +   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
>     },
>     {
>      "id": "ASL_MSG_INVALID_PRIORITY",
> -   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
> +   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
>     },
>     {
>      "id": "ASL_MSG_INVALID_TIME",
> -   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time)
> - of version 4.0a of the ACPI speciciation."
> +   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time) of the ACPI specification."
>     },
>     {
>      "id": "ASL_MSG_NAMED_OBJECT_IN_WHILE",
> @@ -153,7 +284,7 @@
>     },
>     {
>      "id": "ASL_MSG_SYNC_LEVEL",
> -   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of version 4.0a of the ACPI specification for more details."
> +   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of the ACPI specification for more details."
>     },
>     {
>      "id": "ASL_MSG_SYNTAX",
>
Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/data/syntaxcheck.json b/data/syntaxcheck.json
index b3ceb55..4d9bd0f 100644
--- a/data/syntaxcheck.json
+++ b/data/syntaxcheck.json
@@ -2,6 +2,138 @@ 
  "erroradvice": 
  [ 
   {
+   "id": "ASL_MSG_FIELD_ACCESS_WIDTH",
+   "advice": "The region needs to be at least as big as the access width."
+  },
+  {
+   "id": "ASL_MSG_FIELD_UNIT_ACCESS_WIDTH",
+   "advice": "The field plus the access width must not go beyond the end of the region."
+  },
+  {
+   "id": "ASL_MSG_HID_SUFFIX",
+   "advice": "The remaining characters (suffix) of the _HID string must be hexadecimal digits."
+  },
+  {
+   "id": "ASL_MSG_ISA_ADDRESS",
+   "advice": "The fixed I/O ISA address is illegal, it is greater than 0x03ff."
+  },
+  {
+   "id": "ASL_MSG_LEADING_ASTERISK",
+   "advice": "The leading character of the string is an asterisk '*'.  This is used by some platform manufacturers.  While this is allowed for a _CID, the compiler complains about this since a valid use of this has never been seen."
+  },
+  {
+   "id": "ASL_MSG_LIST_LENGTH_LONG",
+   "advice": "The package length is smaller than the length of the initializer list."
+  },
+  {
+   "id": "ASL_MSG_LOCAL_INIT",
+   "advice": "A local variable to a method has not been initialized. This is a bug and can lead to undefined execution behaviour."
+  },
+  {
+   "id": "ASL_MSG_NAME_EXISTS",
+   "advice": "The name already exists in this scope. The compiler will continue to process it."
+  },
+  {
+   "id": "ASL_MSG_NO_REGION",
+   "advice": "_REG requires a corresponding Operation Region, however one was not found."
+  },
+  {
+   "id": "ASL_MSG_NOT_FOUND",
+   "advice": "The name referenced by Scope() should exist, but does not; forward references for Scope() are not supported by the Microsoft Windows ACPI interpreter."
+  },
+  {
+   "id": "ASL_MSG_NOT_METHOD",
+   "advice": "The node type is not a method, so it cannot be invoked."
+  },
+  {
+   "id": "ASL_MSG_NOT_REACHABLE",
+   "advice": "The name exists in the name space, but not it could not be accessed from the scope."
+  },
+  {
+   "id": "ASL_MSG_RESERVED_METHOD",
+   "advice": "The reserved method must be a control method, this occurs for example for the _Lxx, _Exx, _Wxx or _Qxx methods, or for a predefined name that requires input arguments, or no return value from prefefined names such as _DIS, _INI, _IRC, _OFF, _ON, _PSx."
+  },
+  {
+   "id": "ASL_MSG_RESERVED_OPERAND_TYPE",
+   "advice": "The object type for the reserved name does not match the expected type."
+  },
+  {
+   "id": "ASL_MSG_SCOPE_FWD_REF",
+   "advice": "The Microsoft ACPI interpreter cannot handle a forward reference from the Scope() operator, so the compiler flags this up as an error."
+  },
+  {
+   "id": "ASL_MSG_TAG_LARGER",
+   "advice": "The resource tag length is larger than the field length."
+  },
+  {
+   "id": "ASL_MSG_TAG_SMALLER",
+   "advice": "The resource tag length is smaller than the field length."
+  },
+  {
+   "id": "ASL_MSG_UNKNOWN_RESERVED_NAME",
+   "advice": "The name does not match any of the known predefined names.  Names that start with an underscore '_' are reserved by the ACPI specification and so this name should be one of these known names."
+  },
+  {
+   "id": "ASL_MSG_UNREACHABLE_CODE",
+   "advice": "This occurs when there is some code following a Return() - this code is unreachable code, it cannot be executed, so it is most probably a bug."
+  },
+  {
+   "id": "ASL_MSG_NOT_EXIST",
+   "advice": "The referenced object could not be found during a name space lookup, it does not seem to exist."
+  },
+  {
+   "id": "ASL_MSG_CORE_EXCEPTION",
+   "advice": "An internel compiler core execption error has occurred performing a name space lookuop."
+  },
+  {
+   "id": "ASL_MSG_DEBUG_FILE_OPEN",
+   "advice": "The compiler could not open a debug file for output."
+  },
+  {
+   "id": "ASL_MSG_DEBUG_FILENAME",
+   "advice": "A debug filename could not be generated by the compiler."
+  },
+  {
+   "id": "ASL_MSG_DEPENDENT_NESTING",
+   "advice": "A resource descriptor nesting error has occurred."
+  },
+  {
+   "id": "ASL_MSG_DUPLICATE_CASE",
+   "advice": "A case value has already been specified."
+  },
+  {
+   "id": "ASL_MSG_EARLY_EOF",
+   "advice": "The End-Of-File was reached prematurely."
+  },
+  {
+   "id": "ASL_MSG_CONSTANT_FOLDED",
+   "advice": "The compiler has performed a constant folding optimization."
+  },
+  {
+   "id": "ASL_MSG_CONSTANT_EVALUATION",
+   "advice": "Failed to evaluate a constant expression, the compiler could not resolve a subtree for some unknown reason."
+  },
+  {
+   "id": "ASL_MSG_CONNECTION_MISSING",
+   "advice": "The compiler was parsing a FieldUnitList and was expecting a Connection() operator but instead found a NameSeg() opcode."
+  },
+  {
+   "id": "ASL_MSG_CONNECTION_INVALID",
+   "advice": "A Connection() operator is only valid for the GeneralPurposeIo and GenericSerialBus operation region SpaceIds."
+  },
+  {
+   "id": "ASL_MSG_CLOSE",
+   "advice": "An error occurred closing a file in the ASL compiler, this is a system error and should not normally occur."
+  },
+  {
+   "id": "ASL_MSG_COMPILER_INTERNAL",
+   "advice": "An error occurred inside the compiler."
+  },
+  {
+   "id": "ASL_MSG_COMPILER_RESERVED",
+   "advice": "This normally occurs when disassembled code is being compiled and it contains compiler-emitted names of the form '_T_x'.  This is just a remark generated by the compiler can can normally be ignored."
+  },
+  {
    "id": "ASL_MSG_RETURN_TYPES",
    "advice": "Some of the execution paths do not return a value.  All control paths that return must return a value otherwise unepected behaviour may occur.  This error occurs because a branch on an conditional op-code returns a value and another does not, which is inconsitent behaviour."
   },
@@ -23,7 +155,7 @@ 
   },
   {
    "id": "ASL_MSG_ALPHANUMERIC_STRING",
-   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of version 4.0a of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
+   "advice": "For _HID (Hardware object IDs), the ACPI specification requires all characters must be alphanumeric. Section 6.1.4 of the specification states that a valid PNP ID must be of the form AAA#### (where A is an uppercase letter and # is a hex digit) and a valid ACPI ID must be of the form ACPI#### where # is a hex digit."
   },
   {
    "id": "ASL_MSG_AML_NOT_IMPLEMENTED",
@@ -39,7 +171,7 @@ 
   },
   {
    "id": "ASL_MSG_ARG_INIT",
-   "advice": "FIXME"
+   "advice": "A reference argument has not been initialized."
   },
   {
    "id": "ASL_MSG_BACKWARDS_OFFSET",
@@ -51,7 +183,7 @@ 
   },
   {
    "id": "ASL_MSG_DMA_CHANNEL",
-   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See ACPI specification 4.0a, section 6.4.2.2 DMA Descriptor
+   "advice": "DMA channels are described by an 8 bit mask, hence there can only be 8 channels 0..7. See the ACPI specification, section 6.4.2.2, DMA Descriptor
  for more details."
   },
   {
@@ -76,11 +208,11 @@ 
   },
   {
    "id": "ASL_MSG_INVALID_ADDR_FLAGS",
-   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of version 4.0a of the ACPI specification for more details."
+   "advice": "This occurs if the length is zero and just one of the resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags are both set. These are illegal combinations and need to be fixed. See section 6.4.3.5 Address Space Resource Descriptors of the ACPI specification for more details."
   },
   {
    "id": "ASL_MSG_INVALID_EISAID",
-   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of version 4.0a of the ACPI specification for more details."
+   "advice": "The EISAID string must be exactly 7 characters and of the form UUUXXXX, 3 uppercase letters and 4 hex digits (e.g., 'PNP0001'). See section 18.5.35 'EISAID (EISA ID String To Integer Conversion Macro)' of the ACPI specification for more details."
   },
   {
    "id": "ASL_MSG_INVALID_GRANULARITY",
@@ -100,16 +232,15 @@ 
   },
   {
    "id": "ASL_MSG_INVALID_PERFORMANCE",
-   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
+   "advice": "Performance/Robustness value in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
   },
   {
    "id": "ASL_MSG_INVALID_PRIORITY",
-   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of version 4.0a of the ACPI specification for more information."
+   "advice": "Priority in StartDependentFn declaration was > 2. It must be one of: 0 = Good, 1 = Acceptable, 2 = Sub-optimal. See section 18.5.111 of the ACPI specification for more information."
   },
   {
    "id": "ASL_MSG_INVALID_TIME",
-   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time)
- of version 4.0a of the ACPI speciciation."
+   "advice": "Illegal stall time (>255). Generally, stall times > 100 microseconds must use sleep() instead. See section 18.5.110 Stall (Stall for a Short Time) of the ACPI specification."
   },
   {
    "id": "ASL_MSG_NAMED_OBJECT_IN_WHILE",
@@ -153,7 +284,7 @@ 
   },
   {
    "id": "ASL_MSG_SYNC_LEVEL",
-   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of version 4.0a of the ACPI specification for more details."
+   "advice": "Data mutex synchronization level is too large, should be 0..15.  See section 18.5.79 Mutex (Declare Synchronization/Mutex Object) of the ACPI specification for more details."
   },
   {
    "id": "ASL_MSG_SYNTAX",