summaryrefslogtreecommitdiff
path: root/source/components/dispatcher/dspkginit.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2018-12-13 19:04:25 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2018-12-13 19:04:25 +0000
commitd28459aaaf532373b12c80aa5b869f8b591954e7 (patch)
tree22941844047df08d63d286d7dfbf38f3a8f79e0f /source/components/dispatcher/dspkginit.c
parent4d4b15a0e8524e15826ac932bd05252dbd246422 (diff)
Notes
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 9e1cd6115fd4..1e7e7383a088 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)
{
/*