summaryrefslogtreecommitdiff
path: root/source/components/dispatcher/dspkginit.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/dispatcher/dspkginit.c')
-rw-r--r--source/components/dispatcher/dspkginit.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/components/dispatcher/dspkginit.c b/source/components/dispatcher/dspkginit.c
index 9e1cd6115fd4b..1e7e7383a0886 100644
--- a/source/components/dispatcher/dspkginit.c
+++ b/source/components/dispatcher/dspkginit.c
@@ -308,6 +308,32 @@ AcpiDsBuildInternalPackageObj (
{
if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
{
+ if (!Arg->Common.Node)
+ {
+ /*
+ * This is the case where an expression has returned a value.
+ * The use of expressions (TermArgs) within individual
+ * package elements is not supported by the AML interpreter,
+ * even though the ASL grammar supports it. Example:
+ *
+ * Name (INT1, 0x1234)
+ *
+ * Name (PKG3, Package () {
+ * Add (INT1, 0xAAAA0000)
+ * })
+ *
+ * 1) No known AML interpreter supports this type of construct
+ * 2) This fixes a fault if the construct is encountered
+ */
+ ACPI_EXCEPTION ((AE_INFO, AE_SUPPORT,
+ "Expressions within package elements are not supported"));
+
+ /* Cleanup the return object, it is not needed */
+
+ AcpiUtRemoveReference (WalkState->Results->Results.ObjDesc[0]);
+ return_ACPI_STATUS (AE_SUPPORT);
+ }
+
if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
{
/*