diff options
Diffstat (limited to 'source/components/namespace/nsaccess.c')
-rw-r--r-- | source/components/namespace/nsaccess.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index af97c51feff5..11c652e0442b 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -421,6 +421,7 @@ AcpiNsLookup ( ACPI_OBJECT_TYPE ThisSearchType; UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT; UINT32 LocalFlags; + ACPI_INTERPRETER_MODE LocalInterpreterMode; ACPI_FUNCTION_TRACE (NsLookup); @@ -670,6 +671,7 @@ AcpiNsLookup ( */ ThisSearchType = ACPI_TYPE_ANY; CurrentNode = ThisNode; + while (NumSegments && CurrentNode) { NumSegments--; @@ -704,6 +706,16 @@ AcpiNsLookup ( } } + /* Handle opcodes that create a new NameSeg via a full NamePath */ + + LocalInterpreterMode = InterpreterMode; + if ((Flags & ACPI_NS_PREFIX_MUST_EXIST) && (NumSegments > 0)) + { + /* Every element of the path must exist (except for the final NameSeg) */ + + LocalInterpreterMode = ACPI_IMODE_EXECUTE; + } + /* Extract one ACPI name from the front of the pathname */ ACPI_MOVE_32_TO_32 (&SimpleName, Path); @@ -711,11 +723,18 @@ AcpiNsLookup ( /* Try to find the single (4 character) ACPI name */ Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode, - InterpreterMode, ThisSearchType, LocalFlags, &ThisNode); + LocalInterpreterMode, ThisSearchType, LocalFlags, &ThisNode); if (ACPI_FAILURE (Status)) { if (Status == AE_NOT_FOUND) { +#if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */ + if (Flags & ACPI_NS_PREFIX_MUST_EXIST) + { + AcpiOsPrintf (ACPI_MSG_BIOS_ERROR + "Object does not exist: %4.4s\n", &SimpleName); + } +#endif /* Name not found in ACPI namespace */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, |