ACK: [PATCH 1/2] ACPICA: Update to version 20190509

ivanhu ivan.hu at canonical.com
Thu May 16 05:25:59 UTC 2019


On 5/10/19 4:47 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> changes in this release of ACPICA are detailed at the following
> link on the ACPICA developer mailing list:
>
> https://lists.acpica.org/pipermail/devel/2019-May/001908.html
>
> Also fixed build issue with syntaxcheck because of changes in
> enums.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/syntaxcheck/syntaxcheck.c           | 358 ++++++++++---------
>  src/acpica/source/compiler/aslcodegen.c      |   3 +-
>  src/acpica/source/compiler/aslcompile.c      |   3 +-
>  src/acpica/source/compiler/aslcompiler.h     |   4 -
>  src/acpica/source/compiler/aslerror.c        |  12 +-
>  src/acpica/source/compiler/aslfiles.c        |   6 +-
>  src/acpica/source/compiler/aslload.c         |  24 +-
>  src/acpica/source/compiler/aslmain.c         |   3 +-
>  src/acpica/source/compiler/aslmessages.c     |   7 +-
>  src/acpica/source/compiler/aslmessages.h     |   3 +-
>  src/acpica/source/compiler/asloperands.c     |   2 +
>  src/acpica/source/compiler/aslstartup.c      |   6 +-
>  src/acpica/source/compiler/aslutils.c        |  12 +-
>  src/acpica/source/compiler/aslwalks.c        | 222 +++++++++++-
>  src/acpica/source/compiler/aslxref.c         |  47 ++-
>  src/acpica/source/components/events/evgpe.c  |   8 -
>  src/acpica/source/include/acpixf.h           |   2 +-
>  src/acpica/source/include/platform/aclinux.h |  10 +-
>  18 files changed, 483 insertions(+), 249 deletions(-)
>
> diff --git a/src/acpi/syntaxcheck/syntaxcheck.c b/src/acpi/syntaxcheck/syntaxcheck.c
> index d1eb0798..03a28b2c 100644
> --- a/src/acpi/syntaxcheck/syntaxcheck.c
> +++ b/src/acpi/syntaxcheck/syntaxcheck.c
> @@ -53,174 +53,196 @@ static void syntaxcheck_free_advice(void);
>   * 	create a mapping from value to stringified name
>   */
>  static syntaxcheck_error_map_item syntaxcheck_error_map[] = {
> -    ASL_ID(ASL_MSG_ALIGNMENT),
> -    ASL_ID(ASL_MSG_ALPHANUMERIC_STRING),
> -    ASL_ID(ASL_MSG_AML_NOT_IMPLEMENTED),
> -    ASL_ID(ASL_MSG_ARG_COUNT_HI),
> -    ASL_ID(ASL_MSG_ARG_COUNT_LO),
> -    ASL_ID(ASL_MSG_ARG_INIT),
> -    ASL_ID(ASL_MSG_BACKWARDS_OFFSET),
> -    ASL_ID(ASL_MSG_BUFFER_LENGTH),
> -    ASL_ID(ASL_MSG_CLOSE),
> -    ASL_ID(ASL_MSG_COMPILER_INTERNAL),
> -    ASL_ID(ASL_MSG_COMPILER_RESERVED),
> -    ASL_ID(ASL_MSG_CONNECTION_MISSING),
> -    ASL_ID(ASL_MSG_CONNECTION_INVALID),
> -    ASL_ID(ASL_MSG_CONSTANT_EVALUATION),
> -    ASL_ID(ASL_MSG_CONSTANT_FOLDED),
> -    ASL_ID(ASL_MSG_CORE_EXCEPTION),
> -    ASL_ID(ASL_MSG_DEBUG_FILE_OPEN),
> -    ASL_ID(ASL_MSG_DEBUG_FILENAME),
> -    ASL_ID(ASL_MSG_DEPENDENT_NESTING),
> -    ASL_ID(ASL_MSG_DMA_CHANNEL),
> -    ASL_ID(ASL_MSG_DMA_LIST),
> -    ASL_ID(ASL_MSG_DUPLICATE_CASE),
> -    ASL_ID(ASL_MSG_DUPLICATE_ITEM),
> -    ASL_ID(ASL_MSG_EARLY_EOF),
> -    ASL_ID(ASL_MSG_ENCODING_LENGTH),
> -    ASL_ID(ASL_MSG_EX_INTERRUPT_LIST),
> -    ASL_ID(ASL_MSG_EX_INTERRUPT_LIST_MIN),
> -    ASL_ID(ASL_MSG_EX_INTERRUPT_NUMBER),
> -    ASL_ID(ASL_MSG_FIELD_ACCESS_WIDTH),
> -    ASL_ID(ASL_MSG_FIELD_UNIT_ACCESS_WIDTH),
> -    ASL_ID(ASL_MSG_FIELD_UNIT_OFFSET),
> -    ASL_ID(ASL_MSG_GPE_NAME_CONFLICT),
> -    ASL_ID(ASL_MSG_HID_LENGTH),
> -    ASL_ID(ASL_MSG_HID_PREFIX),
> -    ASL_ID(ASL_MSG_HID_SUFFIX),
> -    ASL_ID(ASL_MSG_INCLUDE_FILE_OPEN),
> -    ASL_ID(ASL_MSG_INPUT_FILE_OPEN),
> -    ASL_ID(ASL_MSG_INTEGER_LENGTH),
> -    ASL_ID(ASL_MSG_INTEGER_OPTIMIZATION),
> -    ASL_ID(ASL_MSG_INTERRUPT_LIST),
> -    ASL_ID(ASL_MSG_INTERRUPT_NUMBER),
> -    ASL_ID(ASL_MSG_INVALID_ACCESS_SIZE),
> -    ASL_ID(ASL_MSG_INVALID_ADDR_FLAGS),
> -    ASL_ID(ASL_MSG_INVALID_CONSTANT_OP),
> -    ASL_ID(ASL_MSG_INVALID_EISAID),
> -    ASL_ID(ASL_MSG_INVALID_ESCAPE),
> -    ASL_ID(ASL_MSG_INVALID_GRAN_FIXED),
> -    ASL_ID(ASL_MSG_INVALID_GRANULARITY),
> -    ASL_ID(ASL_MSG_INVALID_LENGTH),
> -    ASL_ID(ASL_MSG_INVALID_LENGTH_FIXED),
> -    ASL_ID(ASL_MSG_INVALID_MIN_MAX),
> -    ASL_ID(ASL_MSG_INVALID_OPERAND),
> -    ASL_ID(ASL_MSG_INVALID_PERFORMANCE),
> -    ASL_ID(ASL_MSG_INVALID_PRIORITY),
> -    ASL_ID(ASL_MSG_INVALID_STRING),
> -    ASL_ID(ASL_MSG_INVALID_TARGET),
> -    ASL_ID(ASL_MSG_INVALID_TIME),
> -    ASL_ID(ASL_MSG_INVALID_TYPE),
> -    ASL_ID(ASL_MSG_INVALID_UUID),
> -    ASL_ID(ASL_MSG_ISA_ADDRESS),
> -    ASL_ID(ASL_MSG_LEADING_ASTERISK),
> -    ASL_ID(ASL_MSG_LIST_LENGTH_LONG),
> -    ASL_ID(ASL_MSG_LIST_LENGTH_SHORT),
> -    ASL_ID(ASL_MSG_LISTING_FILE_OPEN),
> -    ASL_ID(ASL_MSG_LISTING_FILENAME),
> -    ASL_ID(ASL_MSG_LOCAL_INIT),
> -    ASL_ID(ASL_MSG_LOCAL_OUTSIDE_METHOD),
> -    ASL_ID(ASL_MSG_LONG_LINE),
> -    ASL_ID(ASL_MSG_MEMORY_ALLOCATION),
> -    ASL_ID(ASL_MSG_MISSING_ENDDEPENDENT),
> -    ASL_ID(ASL_MSG_MISSING_STARTDEPENDENT),
> -    ASL_ID(ASL_MSG_MULTIPLE_DEFAULT),
> -    ASL_ID(ASL_MSG_MULTIPLE_TYPES),
> -    ASL_ID(ASL_MSG_NAME_EXISTS),
> -    ASL_ID(ASL_MSG_NAME_OPTIMIZATION),
> -    ASL_ID(ASL_MSG_NAMED_OBJECT_IN_WHILE),
> -    ASL_ID(ASL_MSG_NESTED_COMMENT),
> -    ASL_ID(ASL_MSG_NO_CASES),
> -    ASL_ID(ASL_MSG_NO_REGION),
> -    ASL_ID(ASL_MSG_NO_RETVAL),
> -    ASL_ID(ASL_MSG_NO_WHILE),
> -    ASL_ID(ASL_MSG_NON_ASCII),
> -    ASL_ID(ASL_MSG_NON_ZERO),
> -    ASL_ID(ASL_MSG_NOT_EXIST),
> -    ASL_ID(ASL_MSG_NOT_FOUND),
> -    ASL_ID(ASL_MSG_NOT_METHOD),
> -    ASL_ID(ASL_MSG_NOT_PARAMETER),
> -    ASL_ID(ASL_MSG_NOT_REACHABLE),
> -    ASL_ID(ASL_MSG_NOT_REFERENCED),
> -    ASL_ID(ASL_MSG_NULL_DESCRIPTOR),
> -    ASL_ID(ASL_MSG_NULL_STRING),
> -    ASL_ID(ASL_MSG_OPEN),
> -    ASL_ID(ASL_MSG_OUTPUT_FILE_OPEN),
> -    ASL_ID(ASL_MSG_OUTPUT_FILENAME),
> -    ASL_ID(ASL_MSG_PACKAGE_LENGTH),
> -    ASL_ID(ASL_MSG_PREPROCESSOR_FILENAME),
> -    ASL_ID(ASL_MSG_READ),
> -    ASL_ID(ASL_MSG_RECURSION),
> -    ASL_ID(ASL_MSG_REGION_BUFFER_ACCESS),
> -    ASL_ID(ASL_MSG_REGION_BYTE_ACCESS),
> -    ASL_ID(ASL_MSG_RESERVED_ARG_COUNT_HI),
> -    ASL_ID(ASL_MSG_RESERVED_ARG_COUNT_LO),
> -    ASL_ID(ASL_MSG_RESERVED_METHOD),
> -    ASL_ID(ASL_MSG_RESERVED_NO_RETURN_VAL),
> -    ASL_ID(ASL_MSG_RESERVED_OPERAND_TYPE),
> -    ASL_ID(ASL_MSG_RESERVED_RETURN_VALUE),
> -    ASL_ID(ASL_MSG_RESERVED_USE),
> -    ASL_ID(ASL_MSG_RESERVED_WORD),
> -    ASL_ID(ASL_MSG_RESOURCE_FIELD),
> -    ASL_ID(ASL_MSG_RESOURCE_INDEX),
> -    ASL_ID(ASL_MSG_RESOURCE_LIST),
> -    ASL_ID(ASL_MSG_RESOURCE_SOURCE),
> -    ASL_ID(ASL_MSG_RESULT_NOT_USED),
> -    ASL_ID(ASL_MSG_RETURN_TYPES),
> -    ASL_ID(ASL_MSG_SCOPE_FWD_REF),
> -    ASL_ID(ASL_MSG_SCOPE_TYPE),
> -    ASL_ID(ASL_MSG_SEEK),
> -    ASL_ID(ASL_MSG_SERIALIZED),
> -    ASL_ID(ASL_MSG_SINGLE_NAME_OPTIMIZATION),
> -    ASL_ID(ASL_MSG_SOME_NO_RETVAL),
> -    ASL_ID(ASL_MSG_STRING_LENGTH),
> -    ASL_ID(ASL_MSG_SWITCH_TYPE),
> -    ASL_ID(ASL_MSG_SYNC_LEVEL),
> -    ASL_ID(ASL_MSG_SYNTAX),
> -    ASL_ID(ASL_MSG_TABLE_SIGNATURE),
> -    ASL_ID(ASL_MSG_TAG_LARGER),
> -    ASL_ID(ASL_MSG_TAG_SMALLER),
> -    ASL_ID(ASL_MSG_TIMEOUT),
> -    ASL_ID(ASL_MSG_TOO_MANY_TEMPS),
> -    ASL_ID(ASL_MSG_UNKNOWN_RESERVED_NAME),
> -    ASL_ID(ASL_MSG_UNREACHABLE_CODE),
> -    ASL_ID(ASL_MSG_UNSUPPORTED),
> -    ASL_ID(ASL_MSG_UPPER_CASE),
> -    ASL_ID(ASL_MSG_VENDOR_LIST),
> -    ASL_ID(ASL_MSG_WRITE),
> -    ASL_ID(ASL_MSG_DIRECTIVE_SYNTAX),
> -    ASL_ID(ASL_MSG_ENDIF_MISMATCH),
> -    ASL_ID(ASL_MSG_ERROR_DIRECTIVE),
> -    ASL_ID(ASL_MSG_EXISTING_NAME),
> -    ASL_ID(ASL_MSG_INVALID_INVOCATION),
> -    ASL_ID(ASL_MSG_MACRO_SYNTAX),
> -    ASL_ID(ASL_MSG_TOO_MANY_ARGUMENTS),
> -    ASL_ID(ASL_MSG_UNKNOWN_DIRECTIVE),
> -    ASL_ID(ASL_MSG_UNKNOWN_PRAGMA),
> -    ASL_ID(ASL_MSG_BUFFER_ELEMENT),
> -    ASL_ID(ASL_MSG_DIVIDE_BY_ZERO),
> -    ASL_ID(ASL_MSG_FLAG_VALUE),
> -    ASL_ID(ASL_MSG_INTEGER_SIZE),
> -    ASL_ID(ASL_MSG_INVALID_EXPRESSION),
> -    ASL_ID(ASL_MSG_INVALID_FIELD_NAME),
> -    ASL_ID(ASL_MSG_INVALID_HEX_INTEGER),
> -    ASL_ID(ASL_MSG_OEM_TABLE),
> -    ASL_ID(ASL_MSG_RESERVED_VALUE),
> -    ASL_ID(ASL_MSG_UNKNOWN_LABEL),
> -    ASL_ID(ASL_MSG_UNKNOWN_SUBTABLE),
> -    ASL_ID(ASL_MSG_UNKNOWN_TABLE),
> -    ASL_ID(ASL_MSG_ZERO_VALUE),
> -    ASL_ID(ASL_MSG_RECURSION),
> -    ASL_ID(ASL_MSG_SERIALIZED_REQUIRED),
> -    ASL_ID(ASL_MSG_LOCAL_OUTSIDE_METHOD),
> -    ASL_ID(ASL_MSG_NOT_PARAMETER),
> -    ASL_ID(ASL_MSG_TRUNCATION),
> -    ASL_ID(ASL_MSG_LIST_LENGTH_SHORT),
> -    ASL_ID(ASL_MSG_PACKAGE_LENGTH),
> -    ASL_ID(ASL_MSG_RESERVED_PACKAGE_LENGTH),
> -    ASL_ID(ASL_MSG_LIST_LENGTH_SHORT),
> -
> -    { 0, NULL, NULL }
> +	ASL_ID(ASL_MSG_ALIGNMENT),
> +	ASL_ID(ASL_MSG_ALPHANUMERIC_STRING),
> +	ASL_ID(ASL_MSG_AML_NOT_IMPLEMENTED),
> +	ASL_ID(ASL_MSG_ARG_COUNT_HI),
> +	ASL_ID(ASL_MSG_ARG_COUNT_LO),
> +	ASL_ID(ASL_MSG_ARG_INIT),
> +	ASL_ID(ASL_MSG_BACKWARDS_OFFSET),
> +	ASL_ID(ASL_MSG_BUFFER_LENGTH),
> +	ASL_ID(ASL_MSG_CLOSE),
> +	ASL_ID(ASL_MSG_COMPILER_INTERNAL),
> +	ASL_ID(ASL_MSG_COMPILER_RESERVED),
> +	ASL_ID(ASL_MSG_CONNECTION_MISSING),
> +	ASL_ID(ASL_MSG_CONNECTION_INVALID),
> +	ASL_ID(ASL_MSG_CONSTANT_EVALUATION),
> +	ASL_ID(ASL_MSG_CONSTANT_FOLDED),
> +	ASL_ID(ASL_MSG_CORE_EXCEPTION),
> +	ASL_ID(ASL_MSG_DEBUG_FILE_OPEN),
> +	ASL_ID(ASL_MSG_DEBUG_FILENAME),
> +	ASL_ID(ASL_MSG_DEPENDENT_NESTING),
> +	ASL_ID(ASL_MSG_DMA_CHANNEL),
> +	ASL_ID(ASL_MSG_DMA_LIST),
> +	ASL_ID(ASL_MSG_DUPLICATE_CASE),
> +	ASL_ID(ASL_MSG_DUPLICATE_ITEM),
> +	ASL_ID(ASL_MSG_EARLY_EOF),
> +	ASL_ID(ASL_MSG_ENCODING_LENGTH),
> +	ASL_ID(ASL_MSG_EX_INTERRUPT_LIST),
> +	ASL_ID(ASL_MSG_EX_INTERRUPT_LIST_MIN),
> +	ASL_ID(ASL_MSG_EX_INTERRUPT_NUMBER),
> +	ASL_ID(ASL_MSG_FIELD_ACCESS_WIDTH),
> +	ASL_ID(ASL_MSG_FIELD_UNIT_ACCESS_WIDTH),
> +	ASL_ID(ASL_MSG_FIELD_UNIT_OFFSET),
> +	ASL_ID(ASL_MSG_GPE_NAME_CONFLICT),
> +	ASL_ID(ASL_MSG_HID_LENGTH),
> +	ASL_ID(ASL_MSG_HID_PREFIX),
> +	ASL_ID(ASL_MSG_HID_SUFFIX),
> +	ASL_ID(ASL_MSG_INCLUDE_FILE_OPEN),
> +	ASL_ID(ASL_MSG_INPUT_FILE_OPEN),
> +	ASL_ID(ASL_MSG_INTEGER_LENGTH),
> +	ASL_ID(ASL_MSG_INTEGER_OPTIMIZATION),
> +	ASL_ID(ASL_MSG_INTERRUPT_LIST),
> +	ASL_ID(ASL_MSG_INTERRUPT_NUMBER),
> +	ASL_ID(ASL_MSG_INVALID_ACCESS_SIZE),
> +	ASL_ID(ASL_MSG_INVALID_ADDR_FLAGS),
> +	ASL_ID(ASL_MSG_INVALID_CONSTANT_OP),
> +	ASL_ID(ASL_MSG_INVALID_EISAID),
> +	ASL_ID(ASL_MSG_INVALID_ESCAPE),
> +	ASL_ID(ASL_MSG_INVALID_GRAN_FIXED),
> +	ASL_ID(ASL_MSG_INVALID_GRANULARITY),
> +	ASL_ID(ASL_MSG_INVALID_LENGTH),
> +	ASL_ID(ASL_MSG_INVALID_LENGTH_FIXED),
> +	ASL_ID(ASL_MSG_INVALID_MIN_MAX),
> +	ASL_ID(ASL_MSG_INVALID_OPERAND),
> +	ASL_ID(ASL_MSG_INVALID_PERFORMANCE),
> +	ASL_ID(ASL_MSG_INVALID_PRIORITY),
> +	ASL_ID(ASL_MSG_INVALID_STRING),
> +	ASL_ID(ASL_MSG_INVALID_TARGET),
> +	ASL_ID(ASL_MSG_INVALID_TIME),
> +	ASL_ID(ASL_MSG_INVALID_TYPE),
> +	ASL_ID(ASL_MSG_INVALID_UUID),
> +	ASL_ID(ASL_MSG_ISA_ADDRESS),
> +	ASL_ID(ASL_MSG_LEADING_ASTERISK),
> +	ASL_ID(ASL_MSG_LIST_LENGTH_LONG),
> +	ASL_ID(ASL_MSG_LIST_LENGTH_SHORT),
> +	ASL_ID(ASL_MSG_LISTING_FILE_OPEN),
> +	ASL_ID(ASL_MSG_LISTING_FILENAME),
> +	ASL_ID(ASL_MSG_LOCAL_INIT),
> +	ASL_ID(ASL_MSG_LOCAL_OUTSIDE_METHOD),
> +	ASL_ID(ASL_MSG_LONG_LINE),
> +	ASL_ID(ASL_MSG_MEMORY_ALLOCATION),
> +	ASL_ID(ASL_MSG_MISSING_ENDDEPENDENT),
> +	ASL_ID(ASL_MSG_MISSING_STARTDEPENDENT),
> +	ASL_ID(ASL_MSG_MULTIPLE_DEFAULT),
> +	ASL_ID(ASL_MSG_MULTIPLE_TYPES),
> +	ASL_ID(ASL_MSG_NAME_EXISTS),
> +	ASL_ID(ASL_MSG_NAME_OPTIMIZATION),
> +	ASL_ID(ASL_MSG_NAMED_OBJECT_IN_WHILE),
> +	ASL_ID(ASL_MSG_NESTED_COMMENT),
> +	ASL_ID(ASL_MSG_NO_CASES),
> +	ASL_ID(ASL_MSG_NO_REGION),
> +	ASL_ID(ASL_MSG_NO_RETVAL),
> +	ASL_ID(ASL_MSG_NO_WHILE),
> +	ASL_ID(ASL_MSG_NON_ASCII),
> +	ASL_ID(ASL_MSG_BUFFER_FIELD_LENGTH),
> +	ASL_ID(ASL_MSG_NOT_EXIST),
> +	ASL_ID(ASL_MSG_NOT_FOUND),
> +	ASL_ID(ASL_MSG_NOT_METHOD),
> +	ASL_ID(ASL_MSG_NOT_PARAMETER),
> +	ASL_ID(ASL_MSG_NOT_REACHABLE),
> +	ASL_ID(ASL_MSG_NOT_REFERENCED),
> +	ASL_ID(ASL_MSG_NULL_DESCRIPTOR),
> +	ASL_ID(ASL_MSG_NULL_STRING),
> +	ASL_ID(ASL_MSG_OPEN),
> +	ASL_ID(ASL_MSG_OUTPUT_FILE_OPEN),
> +	ASL_ID(ASL_MSG_OUTPUT_FILENAME),
> +	ASL_ID(ASL_MSG_PACKAGE_LENGTH),
> +	ASL_ID(ASL_MSG_PREPROCESSOR_FILENAME),
> +	ASL_ID(ASL_MSG_READ),
> +	ASL_ID(ASL_MSG_RECURSION),
> +	ASL_ID(ASL_MSG_REGION_BUFFER_ACCESS),
> +	ASL_ID(ASL_MSG_REGION_BYTE_ACCESS),
> +	ASL_ID(ASL_MSG_RESERVED_ARG_COUNT_HI),
> +	ASL_ID(ASL_MSG_RESERVED_ARG_COUNT_LO),
> +	ASL_ID(ASL_MSG_RESERVED_METHOD),
> +	ASL_ID(ASL_MSG_RESERVED_NO_RETURN_VAL),
> +	ASL_ID(ASL_MSG_RESERVED_OPERAND_TYPE),
> +	ASL_ID(ASL_MSG_RESERVED_PACKAGE_LENGTH),
> +	ASL_ID(ASL_MSG_RESERVED_RETURN_VALUE),
> +	ASL_ID(ASL_MSG_RESERVED_USE),
> +	ASL_ID(ASL_MSG_RESERVED_WORD),
> +	ASL_ID(ASL_MSG_RESOURCE_FIELD),
> +	ASL_ID(ASL_MSG_RESOURCE_INDEX),
> +	ASL_ID(ASL_MSG_RESOURCE_LIST),
> +	ASL_ID(ASL_MSG_RESOURCE_SOURCE),
> +	ASL_ID(ASL_MSG_RESULT_NOT_USED),
> +	ASL_ID(ASL_MSG_RETURN_TYPES),
> +	ASL_ID(ASL_MSG_SCOPE_FWD_REF),
> +	ASL_ID(ASL_MSG_SCOPE_TYPE),
> +	ASL_ID(ASL_MSG_SEEK),
> +	ASL_ID(ASL_MSG_SERIALIZED),
> +	ASL_ID(ASL_MSG_SERIALIZED_REQUIRED),
> +	ASL_ID(ASL_MSG_SINGLE_NAME_OPTIMIZATION),
> +	ASL_ID(ASL_MSG_SOME_NO_RETVAL),
> +	ASL_ID(ASL_MSG_STRING_LENGTH),
> +	ASL_ID(ASL_MSG_SWITCH_TYPE),
> +	ASL_ID(ASL_MSG_SYNC_LEVEL),
> +	ASL_ID(ASL_MSG_SYNTAX),
> +	ASL_ID(ASL_MSG_TABLE_SIGNATURE),
> +	ASL_ID(ASL_MSG_TAG_LARGER),
> +	ASL_ID(ASL_MSG_TAG_SMALLER),
> +	ASL_ID(ASL_MSG_TIMEOUT),
> +	ASL_ID(ASL_MSG_TOO_MANY_TEMPS),
> +	ASL_ID(ASL_MSG_TRUNCATION),
> +	ASL_ID(ASL_MSG_UNKNOWN_RESERVED_NAME),
> +	ASL_ID(ASL_MSG_UNREACHABLE_CODE),
> +	ASL_ID(ASL_MSG_UNSUPPORTED),
> +	ASL_ID(ASL_MSG_UPPER_CASE),
> +	ASL_ID(ASL_MSG_VENDOR_LIST),
> +	ASL_ID(ASL_MSG_WRITE),
> +	ASL_ID(ASL_MSG_RANGE),
> +	ASL_ID(ASL_MSG_BUFFER_ALLOCATION),
> +	ASL_ID(ASL_MSG_MISSING_DEPENDENCY),
> +	ASL_ID(ASL_MSG_ILLEGAL_FORWARD_REF),
> +	ASL_ID(ASL_MSG_ILLEGAL_METHOD_REF),
> +	ASL_ID(ASL_MSG_LOCAL_NOT_USED),
> +	ASL_ID(ASL_MSG_ARG_AS_LOCAL_NOT_USED),
> +	ASL_ID(ASL_MSG_ARG_NOT_USED),
> +	ASL_ID(ASL_MSG_CONSTANT_REQUIRED),
> +	ASL_ID(ASL_MSG_CROSS_TABLE_SCOPE),
> +	ASL_ID(ASL_MSG_EXCEPTION_NOT_RECEIVED),
> +	ASL_ID(ASL_MSG_NULL_RESOURCE_TEMPLATE),
> +	ASL_ID(ASL_MSG_FOUND_HERE),
> +	ASL_ID(ASL_MSG_ILLEGAL_RECURSION),
> +	ASL_ID(ASL_MSG_DUPLICATE_INPUT_FILE),
> +	ASL_ID(ASL_MSG_WARNING_AS_ERROR),
> +	ASL_ID(ASL_MSG_OEM_TABLE_ID),
> +	ASL_ID(ASL_MSG_OEM_ID),
> +	ASL_ID(ASL_MSG_UNLOAD),
> +	ASL_ID(ASL_MSG_OFFSET),
> +	ASL_ID(ASL_MSG_LONG_SLEEP),
> +	ASL_ID(ASL_MSG_PREFIX_NOT_EXIST),
> +	ASL_ID(ASL_MSG_NAMEPATH_NOT_EXIST),
> +	ASL_ID(ASL_MSG_REGION_LENGTH),
> +	ASL_ID(ASL_MSG_TEMPORARY_OBJECT),
> +	ASL_ID(ASL_MSG_UNDEFINED_EXTERNAL),
> +	ASL_ID(ASL_MSG_BUFFER_FIELD_OVERFLOW),
> +	ASL_ID(ASL_MSG_BUFFER_ELEMENT),
> +	ASL_ID(ASL_MSG_DIVIDE_BY_ZERO),
> +	ASL_ID(ASL_MSG_FLAG_VALUE),
> +	ASL_ID(ASL_MSG_INTEGER_SIZE),
> +	ASL_ID(ASL_MSG_INVALID_EXPRESSION),
> +	ASL_ID(ASL_MSG_INVALID_FIELD_NAME),
> +	ASL_ID(ASL_MSG_INVALID_HEX_INTEGER),
> +	ASL_ID(ASL_MSG_OEM_TABLE),
> +	ASL_ID(ASL_MSG_RESERVED_VALUE),
> +	ASL_ID(ASL_MSG_UNKNOWN_LABEL),
> +	ASL_ID(ASL_MSG_UNKNOWN_SUBTABLE),
> +	ASL_ID(ASL_MSG_UNKNOWN_TABLE),
> +	ASL_ID(ASL_MSG_ZERO_VALUE),
> +	ASL_ID(ASL_MSG_DIRECTIVE_SYNTAX),
> +	ASL_ID(ASL_MSG_ENDIF_MISMATCH),
> +	ASL_ID(ASL_MSG_ERROR_DIRECTIVE),
> +	ASL_ID(ASL_MSG_EXISTING_NAME),
> +	ASL_ID(ASL_MSG_INVALID_INVOCATION),
> +	ASL_ID(ASL_MSG_MACRO_SYNTAX),
> +	ASL_ID(ASL_MSG_TOO_MANY_ARGUMENTS),
> +	ASL_ID(ASL_MSG_UNKNOWN_DIRECTIVE),
> +	ASL_ID(ASL_MSG_UNKNOWN_PRAGMA),
> +	ASL_ID(ASL_MSG_WARNING_DIRECTIVE),
> +	ASL_ID(ASL_MSG_INCLUDE_FILE),
> +	{ 0, NULL, NULL }
>  };
>  
>  static int syntaxcheck_init(fwts_framework *fw)
> diff --git a/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c
> index 88e34824..54b5ac2c 100644
> --- a/src/acpica/source/compiler/aslcodegen.c
> +++ b/src/acpica/source/compiler/aslcodegen.c
> @@ -690,7 +690,8 @@ CgUpdateHeader (
>      {
>          if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK)
>          {
> -            printf ("EOF while reading checksum bytes\n");
> +            AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL,
> +                "Table length is greater than size of the input file");
>              return;
>          }
>  
> diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
> index 845f15bc..5f152dc9 100644
> --- a/src/acpica/source/compiler/aslcompile.c
> +++ b/src/acpica/source/compiler/aslcompile.c
> @@ -224,7 +224,6 @@ CmDoCompile (
>          if (AslGbl_PreprocessOnly)
>          {
>              UtEndEvent (Event);
> -            CmCleanupAndExit ();
>              return (AE_OK);
>          }
>      }
> @@ -919,7 +918,7 @@ CmCleanupAndExit (
>       * We will delete the AML file if there are errors and the
>       * force AML output option has not been used.
>       */
> -    if (AslGbl_ParserErrorDetected || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
> +    if (AslGbl_ParserErrorDetected || AslGbl_PreprocessOnly || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
>          (!AslGbl_IgnoreErrors) &&
>          AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle))
>      {
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index ad0e73f3..5c4bdc17 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -1105,10 +1105,6 @@ ASL_GLOBAL_FILE_NODE *
>  FlGetCurrentFileNode (
>      void);
>  
> -BOOLEAN
> -FlInputFileExists (
> -    char                    *InputFilename);
> -
>  
>  /*
>   * aslhwmap - hardware map summary
> diff --git a/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c
> index db6d871d..ae1f38ac 100644
> --- a/src/acpica/source/compiler/aslerror.c
> +++ b/src/acpica/source/compiler/aslerror.c
> @@ -869,16 +869,8 @@ static void AslInitEnode (
>              return;
>          }
>  
> -	if (!FlInputFileExists (Filename))
> -	{
> -            /*
> -             * This means that this file is an include file. Record the .src
> -             * file as the error message source because this file is not in
> -             * the global file list.
> -             */
> -            Enode->SourceFilename =
> -                FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
> -	}
> +        Enode->SourceFilename =
> +            FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
>      }
>  }
>  
> diff --git a/src/acpica/source/compiler/aslfiles.c b/src/acpica/source/compiler/aslfiles.c
> index 80a74e81..b9208c7c 100644
> --- a/src/acpica/source/compiler/aslfiles.c
> +++ b/src/acpica/source/compiler/aslfiles.c
> @@ -163,6 +163,10 @@ FlOpenIncludeWithPrefix (
>      ACPI_PARSE_OBJECT       *Op,
>      char                    *Filename);
>  
> +static BOOLEAN
> +FlInputFileExists (
> +    char                    *InputFilename);
> +
>  #ifdef ACPI_OBSOLETE_FUNCTIONS
>  ACPI_STATUS
>  FlParseInputPathname (
> @@ -250,7 +254,7 @@ FlInitOneFile (
>   *
>   ******************************************************************************/
>  
> -BOOLEAN
> +static BOOLEAN
>  FlInputFileExists (
>      char                    *Filename)
>  {
> diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
> index a055bab0..d1523ab6 100644
> --- a/src/acpica/source/compiler/aslload.c
> +++ b/src/acpica/source/compiler/aslload.c
> @@ -263,10 +263,29 @@ LdLoadFieldElements (
>      ACPI_WALK_STATE         *WalkState)
>  {
>      ACPI_PARSE_OBJECT       *Child = NULL;
> +    ACPI_PARSE_OBJECT       *SourceRegion;
>      ACPI_NAMESPACE_NODE     *Node;
>      ACPI_STATUS             Status;
>  
>  
> +
> +    SourceRegion = UtGetArg (Op, 0);
> +    if (SourceRegion)
> +    {
> +        Status = AcpiNsLookup (WalkState->ScopeInfo,
> +            SourceRegion->Asl.Value.String,
> +            ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
> +            ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
> +        if (Status == AE_NOT_FOUND)
> +        {
> +            /*
> +             * If the named object is not found, it means that it is either a
> +             * forward reference or the named object does not exist.
> +             */
> +            SourceRegion->Asl.CompileFlags |= OP_NOT_FOUND_DURING_LOAD;
> +        }
> +    }
> +
>      /* Get the first named field element */
>  
>      switch (Op->Asl.AmlOpcode)
> @@ -493,7 +512,7 @@ LdNamespace1Begin (
>      case AML_FIELD_OP:
>  
>          Status = LdLoadFieldElements (Op, WalkState);
> -        break;
> +        return (Status);
>  
>      case AML_INT_CONNECTION_OP:
>  
> @@ -557,8 +576,7 @@ LdNamespace1Begin (
>           * We only want references to named objects:
>           *      Store (2, WXYZ) -> Attempt to resolve the name
>           */
> -        if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) &&
> -            (OpInfo->Type != AML_TYPE_NAMED_FIELD))
> +        if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
>          {
>              return (AE_OK);
>          }
> diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
> index 81f634e6..2afb20f6 100644
> --- a/src/acpica/source/compiler/aslmain.c
> +++ b/src/acpica/source/compiler/aslmain.c
> @@ -291,7 +291,8 @@ main (
>      /*
>       * At this point, compilation of a data table or disassembly is complete.
>       */
> -    if (AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA || AcpiGbl_DisasmFlag)
> +    if (AslGbl_PreprocessOnly || AcpiGbl_DisasmFlag ||
> +        AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
>      {
>          goto CleanupAndExit;
>      }
> diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
> index d7e2eb43..cf7a7a4f 100644
> --- a/src/acpica/source/compiler/aslmessages.c
> +++ b/src/acpica/source/compiler/aslmessages.c
> @@ -283,7 +283,7 @@ const char                      *AslCompilerMsgs [] =
>  /*    ASL_MSG_NO_RETVAL */                  "Called method returns no value",
>  /*    ASL_MSG_NO_WHILE */                   "No enclosing While statement",
>  /*    ASL_MSG_NON_ASCII */                  "Invalid characters found in file",
> -/*    ASL_MSG_NON_ZERO */                   "Operand evaluates to zero",
> +/*    ASL_MSG_BUFFER_FIELD_LENGTH */        "Field length must be non-zero",
>  /*    ASL_MSG_NOT_EXIST */                  "Object does not exist",
>  /*    ASL_MSG_NOT_FOUND */                  "Object not found or not accessible from current scope",
>  /*    ASL_MSG_NOT_METHOD */                 "Not a control method, cannot invoke",
> @@ -342,7 +342,7 @@ const char                      *AslCompilerMsgs [] =
>  /*    ASL_MSG_RANGE */                      "Constant out of range",
>  /*    ASL_MSG_BUFFER_ALLOCATION */          "Could not allocate line buffer",
>  /*    ASL_MSG_MISSING_DEPENDENCY */         "Missing dependency",
> -/*    ASL_MSG_ILLEGAL_FORWARD_REF */        "Forward references are not supported by the ASL language",
> +/*    ASL_MSG_ILLEGAL_FORWARD_REF */        "Illegal forward reference",
>  /*    ASL_MSG_ILLEGAL_METHOD_REF */         "Object is declared in a different method",
>  /*    ASL_MSG_LOCAL_NOT_USED */             "Method Local is set but never used",
>  /*    ASL_MSG_ARG_AS_LOCAL_NOT_USED */      "Method Argument (as a local) is set but never used",
> @@ -364,7 +364,8 @@ const char                      *AslCompilerMsgs [] =
>  /*    ASL_MSG_NAMEPATH_NOT_EXIST */         "One or more objects within the Pathname do not exist",
>  /*    ASL_MSG_REGION_LENGTH */              "Operation Region declared with zero length",
>  /*    ASL_MSG_TEMPORARY_OBJECT */           "Object is created temporarily in another method and cannot be accessed",
> -/*    ASL_MSG_UNDEFINED_EXTERNAL */         "Named object was declared external but the actual definition does not exist"
> +/*    ASL_MSG_UNDEFINED_EXTERNAL */         "Named object was declared external but the actual definition does not exist",
> +/*    ASL_MSG_BUFFER_FIELD_OVERFLOW */        "Buffer field extends beyond end of target buffer"
>  };
>  
>  /* Table compiler */
> diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
> index a7cd1f31..15613685 100644
> --- a/src/acpica/source/compiler/aslmessages.h
> +++ b/src/acpica/source/compiler/aslmessages.h
> @@ -285,7 +285,7 @@ typedef enum
>      ASL_MSG_NO_RETVAL,
>      ASL_MSG_NO_WHILE,
>      ASL_MSG_NON_ASCII,
> -    ASL_MSG_NON_ZERO,
> +    ASL_MSG_BUFFER_FIELD_LENGTH,
>      ASL_MSG_NOT_EXIST,
>      ASL_MSG_NOT_FOUND,
>      ASL_MSG_NOT_METHOD,
> @@ -367,6 +367,7 @@ typedef enum
>      ASL_MSG_REGION_LENGTH,
>      ASL_MSG_TEMPORARY_OBJECT,
>      ASL_MSG_UNDEFINED_EXTERNAL,
> +    ASL_MSG_BUFFER_FIELD_OVERFLOW,
>  
>      /* These messages are used by the Data Table compiler only */
>  
> diff --git a/src/acpica/source/compiler/asloperands.c b/src/acpica/source/compiler/asloperands.c
> index 4f4b636d..cb9c5c89 100644
> --- a/src/acpica/source/compiler/asloperands.c
> +++ b/src/acpica/source/compiler/asloperands.c
> @@ -819,6 +819,7 @@ OpnDoBuffer (
>      BufferLengthOp->Asl.Value.Integer = BufferLength;
>  
>      (void) OpcSetOptimalIntegerSize (BufferLengthOp);
> +    UtSetParseOpName (BufferLengthOp);
>  
>      /* Remaining nodes are handled via the tree walk */
>  }
> @@ -905,6 +906,7 @@ OpnDoPackage (
>           */
>          Op->Asl.Child->Asl.ParseOpcode = PARSEOP_INTEGER;
>          Op->Asl.Child->Asl.Value.Integer = PackageLength;
> +        UtSetParseOpName (Op);
>  
>          /* Set the AML opcode */
>  
> diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
> index aee5ad60..472f777c 100644
> --- a/src/acpica/source/compiler/aslstartup.c
> +++ b/src/acpica/source/compiler/aslstartup.c
> @@ -550,14 +550,10 @@ AslDoOneFile (
>          Status = CmDoCompile ();
>          if (ACPI_FAILURE (Status))
>          {
> +            PrTerminatePreprocessor ();
>              return (Status);
>          }
>  
> -        /* Cleanup (for next source file) and exit */
> -
> -        AeClearErrorLog ();
> -        PrTerminatePreprocessor ();
> -
>          /*
>           * At this point, we know how many lines are in the input file. Save it
>           * to display for post-compilation summary.
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index 0b78f473..80149247 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -541,8 +541,14 @@ UtDisplayOneSummary (
>  {
>      UINT32                  i;
>      ASL_GLOBAL_FILE_NODE    *FileNode;
> +    BOOLEAN                 DisplayAMLSummary;
>  
>  
> +    DisplayAMLSummary =
> +        !AslGbl_PreprocessOnly && !AslGbl_ParserErrorDetected &&
> +        ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || AslGbl_IgnoreErrors) &&
> +        AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle;
> +
>      if (FileId != ASL_FILE_STDOUT)
>      {
>          /* Compiler name and version number */
> @@ -595,9 +601,7 @@ UtDisplayOneSummary (
>  
>              /* AML summary */
>  
> -            if (!AslGbl_ParserErrorDetected &&
> -                ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || AslGbl_IgnoreErrors) &&
> -                AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
> +            if (DisplayAMLSummary)
>              {
>                  FlPrintFile (FileId,
>                      "%-14s %s - %7u bytes %6u opcodes  %6u named objects\n",
> @@ -633,7 +637,7 @@ UtDisplayOneSummary (
>              continue;
>          }
>  
> -        FlPrintFile (FileId, "%14s %s - %u bytes\n",
> +        FlPrintFile (FileId, "%-14s %s - %7u bytes\n",
>              AslGbl_FileDescs[i].ShortDescription,
>              AslGbl_Files[i].Filename, FlGetFileSize (i));
>      }
> diff --git a/src/acpica/source/compiler/aslwalks.c b/src/acpica/source/compiler/aslwalks.c
> index f1ebd903..e383e794 100644
> --- a/src/acpica/source/compiler/aslwalks.c
> +++ b/src/acpica/source/compiler/aslwalks.c
> @@ -165,6 +165,14 @@ static void
>  AnAnalyzeStoreOperator (
>      ACPI_PARSE_OBJECT       *Op);
>  
> +static BOOLEAN
> +AnIsValidBufferConstant (
> +    ACPI_PARSE_OBJECT       *Op);
> +
> +static void
> +AnValidateCreateBufferField (
> +    ACPI_PARSE_OBJECT       *CreateBufferFieldOp);
> +
>  
>  /*******************************************************************************
>   *
> @@ -669,6 +677,14 @@ AnOtherSemanticAnalysisWalkBegin (
>      OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
>  
>  
> +    if (OpInfo->Flags & AML_CREATE)
> +    {
> +        /* This group contains all of the Create Buffer Field operators */
> +
> +        AnValidateCreateBufferField (Op);
> +        return (AE_OK);
> +    }
> +
>      /*
>       * Determine if an execution class operator actually does something by
>       * checking if it has a target and/or the function return value is used.
> @@ -734,10 +750,10 @@ AnOtherSemanticAnalysisWalkBegin (
>          }
>      }
>  
> -
>      /*
>       * Semantic checks for individual ASL operators
>       */
> +
>      switch (Op->Asl.ParseOpcode)
>      {
>      case PARSEOP_STORE:
> @@ -785,22 +801,6 @@ AnOtherSemanticAnalysisWalkBegin (
>          }
>          break;
>  
> -    case PARSEOP_CREATEFIELD:
> -        /*
> -         * Check for a zero Length (NumBits) operand. NumBits is the 3rd operand
> -         */
> -        ArgOp = Op->Asl.Child;
> -        ArgOp = ArgOp->Asl.Next;
> -        ArgOp = ArgOp->Asl.Next;
> -
> -        if ((ArgOp->Asl.ParseOpcode == PARSEOP_ZERO) ||
> -           ((ArgOp->Asl.ParseOpcode == PARSEOP_INTEGER) &&
> -            (ArgOp->Asl.Value.Integer == 0)))
> -        {
> -            AslError (ASL_ERROR, ASL_MSG_NON_ZERO, ArgOp, NULL);
> -        }
> -        break;
> -
>      case PARSEOP_CONNECTION:
>          /*
>           * Ensure that the referenced operation region has the correct SPACE_ID.
> @@ -886,6 +886,194 @@ AnOtherSemanticAnalysisWalkBegin (
>  }
>  
>  
> +/*******************************************************************************
> + *
> + * FUNCTION:    AnValidateCreateBufferField
> + *
> + * PARAMETERS:  Op                  - A create buffer field operator
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Check if a buffer index argument to a create buffer field
> + *              operation is beyond the end of the target buffer.
> + *
> + *  Validates these AML operators:
> + *
> + *  AML_CREATE_FIELD_OP
> + *  AML_CREATE_BIT_FIELD_OP
> + *  AML_CREATE_BYTE_FIELD_OP
> + *  AML_CREATE_WORD_FIELD_OP
> + *  AML_CREATE_DWORD_FIELD_OP
> + *  AML_CREATE_QWORD_FIELD_OP
> + *
> + *  There are two conditions that must be satisfied in order to enable
> + *  validation at compile time:
> + *
> + *  1) The length of the target buffer must be an integer constant
> + *  2) The index specified in the create* must be an integer constant
> + *  3) For CreateField, the bit length argument must be non-zero.
> + *
> + ******************************************************************************/
> +
> +static void
> +AnValidateCreateBufferField (
> +    ACPI_PARSE_OBJECT       *CreateBufferFieldOp)
> +{
> +    ACPI_PARSE_OBJECT       *TargetBufferOp;
> +    ACPI_PARSE_OBJECT       *ArgOp;
> +    UINT32                  TargetBufferLength;
> +    UINT32                  LastFieldByteIndex;
> +
> +
> +    /*
> +     * 1) Get the length of the target buffer
> +     */
> +    ArgOp = CreateBufferFieldOp->Asl.Child;     /* Reference to target buffer */
> +
> +    /*
> +     * If no attached Node, the target buffer may be something like an
> +     * ArgX or LocalX and cannot be evaluated at compile time.
> +     */
> +    if (!ArgOp->Asl.Node)
> +    {
> +        return;
> +    }
> +
> +    TargetBufferOp = ArgOp->Asl.Node->Op;
> +    TargetBufferOp = TargetBufferOp->Asl.Child; /* Target buffer */
> +    TargetBufferOp = TargetBufferOp->Asl.Next;  /* "Buffer" keyword */
> +    if (!TargetBufferOp)
> +    {
> +        /* Not a statement of the form NAME(XXXX, Buffer.... */
> +
> +        return;
> +    }
> +
> +    /* Get the buffer length argument. It must be an integer constant */
> +
> +    ArgOp = TargetBufferOp->Asl.Child;
> +    if (!AnIsValidBufferConstant (ArgOp))
> +    {
> +        return;
> +    }
> +
> +    TargetBufferLength = (UINT32) ArgOp->Asl.Value.Integer;
> +
> +    /*
> +     * 2) Get the value of the buffer index argument. It must be
> +     * an integer constant.
> +     */
> +    ArgOp = CreateBufferFieldOp->Asl.Child;     /* Reference to target buffer */
> +    ArgOp = ArgOp->Asl.Next;                    /* Buffer Index argument*/
> +    if (!AnIsValidBufferConstant (ArgOp))
> +    {
> +        return;
> +    }
> +
> +    LastFieldByteIndex =
> +        (UINT32) ArgOp->Asl.Value.Integer;      /* Index can be in either bytes or bits */
> +
> +    /*
> +     * 3) Get the length of the new buffer field, in bytes. Also,
> +     * create the final target buffer index for the last byte of the field
> +     */
> +    switch (CreateBufferFieldOp->Asl.ParseOpcode)
> +    {
> +    case PARSEOP_CREATEBITFIELD:                /* A one bit field */
> +
> +        LastFieldByteIndex = ACPI_ROUND_BITS_DOWN_TO_BYTES (LastFieldByteIndex);
> +        break;
> +
> +    case PARSEOP_CREATEBYTEFIELD:
> +        break;
> +
> +    case PARSEOP_CREATEWORDFIELD:
> +
> +        LastFieldByteIndex += (sizeof (UINT16) - 1);
> +        break;
> +
> +    case PARSEOP_CREATEDWORDFIELD:
> +
> +        LastFieldByteIndex += (sizeof (UINT32) - 1);
> +        break;
> +
> +    case PARSEOP_CREATEQWORDFIELD:
> +
> +        LastFieldByteIndex += (sizeof (UINT64) - 1);
> +        break;
> +
> +    case PARSEOP_CREATEFIELD:                   /* Multi-bit field */
> +
> +        ArgOp = ArgOp->Asl.Next;                /* Length argument, in bits */
> +        if (!AnIsValidBufferConstant (ArgOp))
> +        {
> +            return;
> +        }
> +
> +        /* The buffer field length is not allowed to be zero */
> +
> +        if (ArgOp->Asl.Value.Integer == 0)
> +        {
> +            AslError (ASL_WARNING,  ASL_MSG_BUFFER_FIELD_LENGTH, ArgOp, NULL);
> +            return;
> +        }
> +
> +        LastFieldByteIndex +=
> +            ((UINT32) ArgOp->Asl.Value.Integer - 1);    /* Create final bit index */
> +
> +        /* Convert bit index to a byte index */
> +
> +        LastFieldByteIndex = ACPI_ROUND_BITS_DOWN_TO_BYTES (LastFieldByteIndex);
> +        break;
> +
> +    default:
> +        return;
> +    }
> +
> +    /*
> +     * 4) Check for an access (index) beyond the end of the target buffer,
> +     * or a zero length target buffer.
> +     */
> +    if (!TargetBufferLength || (LastFieldByteIndex >= TargetBufferLength))
> +    {
> +        AslError (ASL_WARNING, ASL_MSG_BUFFER_FIELD_OVERFLOW, ArgOp, NULL);
> +    }
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AnIsValidBufferConstant
> + *
> + * PARAMETERS:  Op                  - A buffer-related operand
> + *
> + * RETURN:      TRUE if operand is valid constant, FALSE otherwise
> + *
> + * DESCRIPTION: Check if the input Op is valid constant that can be used
> + *              in compile-time analysis.
> + *
> + ******************************************************************************/
> +
> +static BOOLEAN
> +AnIsValidBufferConstant (
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +    if (!Op)
> +    {
> +        return (FALSE);
> +    }
> +
> +    if ((Op->Asl.ParseOpcode == PARSEOP_INTEGER) ||
> +        (Op->Asl.ParseOpcode == PARSEOP_ZERO)    ||
> +        (Op->Asl.ParseOpcode == PARSEOP_ONE))
> +    {
> +        return (TRUE);
> +    }
> +
> +    return (FALSE);
> +}
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AnAnalyzeStoreOperator
> diff --git a/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c
> index 9d6e5c0b..d903ef1b 100644
> --- a/src/acpica/source/compiler/aslxref.c
> +++ b/src/acpica/source/compiler/aslxref.c
> @@ -460,6 +460,8 @@ XfNamespaceLocateBegin (
>      ASL_METHOD_LOCAL        *MethodArgs = NULL;
>      int                     RegisterNumber;
>      UINT32                  i;
> +    ACPI_NAMESPACE_NODE     *DeclarationParentMethod;
> +    ACPI_PARSE_OBJECT       *ReferenceParentMethod;
>  
>  
>      ACPI_FUNCTION_TRACE_PTR (XfNamespaceLocateBegin, Op);
> @@ -613,8 +615,7 @@ XfNamespaceLocateBegin (
>          (Op->Asl.ParseOpcode != PARSEOP_NAMESTRING) &&
>          (Op->Asl.ParseOpcode != PARSEOP_NAMESEG)    &&
>          (Op->Asl.ParseOpcode != PARSEOP_METHODCALL) &&
> -        (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)   &&
> -        (OpInfo->Type != AML_TYPE_NAMED_FIELD))
> +        (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
>      {
>          return_ACPI_STATUS (AE_OK);
>      }
> @@ -638,8 +639,7 @@ XfNamespaceLocateBegin (
>      if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
>          (Op->Asl.ParseOpcode == PARSEOP_NAMESEG)    ||
>          (Op->Asl.ParseOpcode == PARSEOP_METHODCALL) ||
> -        (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)   ||
> -        (OpInfo->Type == AML_TYPE_NAMED_FIELD))
> +        (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
>      {
>          /*
>           * These are name references, do not push the scope stack
> @@ -676,10 +676,6 @@ XfNamespaceLocateBegin (
>  
>          Path = NextOp->Asl.Value.String;
>      }
> -    else if (OpInfo->Type == AML_TYPE_NAMED_FIELD)
> -    {
> -        Path = Op->Asl.Child->Asl.Value.String;
> -    }
>      else
>      {
>          Path = Op->Asl.Value.String;
> @@ -798,24 +794,45 @@ XfNamespaceLocateBegin (
>          return_ACPI_STATUS (Status);
>      }
>  
> -    /* Object was found above, check for an illegal forward reference */
> +   /* Object was found above, check for an illegal forward reference */
>  
>      if (Op->Asl.CompileFlags & OP_NOT_FOUND_DURING_LOAD)
>      {
>          /*
>           * During the load phase, this Op was flagged as a possible
> -         * illegal forward reference
> +         * illegal forward reference. In other words, Op is a name path or
> +         * name segment that refers to a named object declared after the
> +         * reference. In this scinario, Node refers to the actual declaration
> +         * and Op is a parse node that references the named object.
>           *
> -         * Note: Allow "forward references" from within a method to an
> -         * object that is not within any method (module-level code)
> +         * Note:
> +         *
> +         * Object references inside of control methods are allowed to
> +         * refer to objects declared outside of control methods.
> +         *
> +         * If the declaration and reference are both contained inside of the
> +         * same method or outside of any method, this is a forward reference
> +         * and should be reported as a compiler error.
>           */
> -        if (!WalkState->ScopeInfo || (UtGetParentMethod (Node) &&
> -            !UtNodeIsDescendantOf (WalkState->ScopeInfo->Scope.Node,
> -                UtGetParentMethod (Node))))
> +        DeclarationParentMethod = UtGetParentMethod (Node);
> +        ReferenceParentMethod = XfGetParentMethod (Op);
> +
> +        /* case 1: declaration and refrence are both outside of method */
> +
> +        if (!ReferenceParentMethod && !DeclarationParentMethod)
>          {
>              AslError (ASL_ERROR, ASL_MSG_ILLEGAL_FORWARD_REF, Op,
>                  Op->Asl.ExternalName);
>          }
> +
> +        /* case 2: declaration and reference are both inside of the same method */
> +
> +        else if (ReferenceParentMethod && DeclarationParentMethod &&
> +            ReferenceParentMethod == DeclarationParentMethod->Op)
> +        {
> +             AslError (ASL_ERROR, ASL_MSG_ILLEGAL_FORWARD_REF, Op,
> +                Op->Asl.ExternalName);
> +        }
>      }
>  
>      /* Check for a reference vs. name declaration */
> diff --git a/src/acpica/source/components/events/evgpe.c b/src/acpica/source/components/events/evgpe.c
> index 7534f6d7..f5ea992a 100644
> --- a/src/acpica/source/components/events/evgpe.c
> +++ b/src/acpica/source/components/events/evgpe.c
> @@ -240,14 +240,6 @@ AcpiEvEnableGpe (
>      ACPI_FUNCTION_TRACE (EvEnableGpe);
>  
>  
> -    /* Clear the GPE (of stale events) */
> -
> -    Status = AcpiHwClearGpe(GpeEventInfo);
> -    if (ACPI_FAILURE(Status))
> -    {
> -        return_ACPI_STATUS(Status);
> -    }
> -
>      /* Enable the requested GPE */
>  
>      Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index be338bbe..8778da72 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -154,7 +154,7 @@
>  
>  /* Current ACPICA subsystem version in YYYYMMDD format */
>  
> -#define ACPI_CA_VERSION                 0x20190405
> +#define ACPI_CA_VERSION                 0x20190509
>  
>  #include "acconfig.h"
>  #include "actypes.h"
> diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h
> index f6522e32..e6d57e31 100644
> --- a/src/acpica/source/include/platform/aclinux.h
> +++ b/src/acpica/source/include/platform/aclinux.h
> @@ -205,6 +205,11 @@
>  
>  #define ACPI_INIT_FUNCTION __init
>  
> +/* Use a specific bugging default separate from ACPICA */
> +
> +#undef ACPI_DEBUG_DEFAULT
> +#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INFO | ACPI_LV_REPAIR)
> +
>  #ifndef CONFIG_ACPI
>  
>  /* External globals for __KERNEL__, stubs is needed */
> @@ -221,11 +226,6 @@
>  #define ACPI_NO_ERROR_MESSAGES
>  #undef ACPI_DEBUG_OUTPUT
>  
> -/* Use a specific bugging default separate from ACPICA */
> -
> -#undef ACPI_DEBUG_DEFAULT
> -#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INFO | ACPI_LV_REPAIR)
> -
>  /* External interface for __KERNEL__, stub is needed */
>  
>  #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \


Acked-by: Ivan Hu <ivan.hu at canonical.com>




More information about the fwts-devel mailing list