diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-05-09 22:49:10 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-05-09 22:49:10 +0000 |
commit | 08f4234e06d8d6855c0b79c95da98f267ca3554e (patch) | |
tree | 1ad7923ff2f449c959fe850588203300417861ab /source/compiler/aslload.c | |
parent | a4d090d50dca12716fbca0cc738e692a0db75068 (diff) |
Notes
Diffstat (limited to 'source/compiler/aslload.c')
-rw-r--r-- | source/compiler/aslload.c | 24 |
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); } |