summaryrefslogtreecommitdiff
path: root/source/compiler/aslload.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslload.c')
-rw-r--r--source/compiler/aslload.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index a055bab0605f..d1523ab69cc8 100644
--- a/source/compiler/aslload.c
+++ b/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);
}