| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: dspkginit - Completion of deferred package initialization |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 152 | 152 | */ |
|---|
| 153 | 153 | for (i = 0; arg && (i < element_count); i++) { |
|---|
| 154 | 154 | if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { |
|---|
| 155 | + if (!arg->common.node) { |
|---|
| 156 | + /* |
|---|
| 157 | + * This is the case where an expression has returned a value. |
|---|
| 158 | + * The use of expressions (term_args) within individual |
|---|
| 159 | + * package elements is not supported by the AML interpreter, |
|---|
| 160 | + * even though the ASL grammar supports it. Example: |
|---|
| 161 | + * |
|---|
| 162 | + * Name (INT1, 0x1234) |
|---|
| 163 | + * |
|---|
| 164 | + * Name (PKG3, Package () { |
|---|
| 165 | + * Add (INT1, 0xAAAA0000) |
|---|
| 166 | + * }) |
|---|
| 167 | + * |
|---|
| 168 | + * 1) No known AML interpreter supports this type of construct |
|---|
| 169 | + * 2) This fixes a fault if the construct is encountered |
|---|
| 170 | + */ |
|---|
| 171 | + ACPI_EXCEPTION((AE_INFO, AE_SUPPORT, |
|---|
| 172 | + "Expressions within package elements are not supported")); |
|---|
| 173 | + |
|---|
| 174 | + /* Cleanup the return object, it is not needed */ |
|---|
| 175 | + |
|---|
| 176 | + acpi_ut_remove_reference(walk_state->results-> |
|---|
| 177 | + results.obj_desc[0]); |
|---|
| 178 | + return_ACPI_STATUS(AE_SUPPORT); |
|---|
| 179 | + } |
|---|
| 180 | + |
|---|
| 155 | 181 | if (arg->common.node->type == ACPI_TYPE_METHOD) { |
|---|
| 156 | 182 | /* |
|---|
| 157 | 183 | * A method reference "looks" to the parser to be a method |
|---|