mirror of
https://github.com/acpica/acpica/
synced 2025-01-16 22:39:17 +03:00
Extraneous spaces removed
date 2000.06.13.21.22.00; author rmoore1; state Exp;
This commit is contained in:
parent
51aa0b5d69
commit
d3005c15fb
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -129,7 +129,7 @@
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsRootCreateScope
|
||||
*
|
||||
* PARAMETERS: Entry - NTE for which a scope will be created
|
||||
@ -165,9 +165,9 @@ AcpiNsRootCreateScope (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/*
|
||||
* Init the scope first entry -- since it is the exemplar of
|
||||
* the scope (Some fields are duplicated to new entries!)
|
||||
/*
|
||||
* Init the scope first entry -- since it is the exemplar of
|
||||
* the scope (Some fields are duplicated to new entries!)
|
||||
*/
|
||||
AcpiNsInitializeTable (Entry->Scope, NULL, Entry);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
@ -177,7 +177,7 @@ AcpiNsRootCreateScope (
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsRootInitialize
|
||||
*
|
||||
* PARAMETERS: None
|
||||
@ -203,8 +203,8 @@ AcpiNsRootInitialize (void)
|
||||
|
||||
|
||||
AcpiCmAcquireMutex (MTX_NAMESPACE);
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* Root is initially NULL, so a non-NULL value indicates
|
||||
* that AcpiNsRootInitialize() has already been called; just return.
|
||||
*/
|
||||
@ -225,24 +225,24 @@ AcpiNsRootInitialize (void)
|
||||
}
|
||||
|
||||
/* Enter the pre-defined names in the name table */
|
||||
|
||||
|
||||
DEBUG_PRINT (ACPI_INFO, ("Entering predefined name table entries into namespace\n"));
|
||||
|
||||
for (InitVal = Acpi_GblPreDefinedNames; InitVal->Name; InitVal++)
|
||||
{
|
||||
Status = AcpiNsLookup (NULL, InitVal->Name, (OBJECT_TYPE_INTERNAL) InitVal->Type,
|
||||
Status = AcpiNsLookup (NULL, InitVal->Name, (OBJECT_TYPE_INTERNAL) InitVal->Type,
|
||||
IMODE_LOAD_PASS2, NS_NO_UPSEARCH, NULL, &NewEntry);
|
||||
|
||||
/*
|
||||
/*
|
||||
* if name entered successfully
|
||||
* && its entry in PreDefinedNames[] specifies an initial value
|
||||
*/
|
||||
|
||||
if ((Status == AE_OK) &&
|
||||
|
||||
if ((Status == AE_OK) &&
|
||||
NewEntry && InitVal->Val)
|
||||
{
|
||||
/* Entry requests an initial value, allocate a descriptor for it. */
|
||||
|
||||
|
||||
ObjDesc = AcpiCmCreateInternalObject ((OBJECT_TYPE_INTERNAL) InitVal->Type);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
@ -250,7 +250,7 @@ AcpiNsRootInitialize (void)
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Convert value string from table entry to internal representation.
|
||||
* Only types actually used for initial values are implemented here.
|
||||
*/
|
||||
@ -268,7 +268,7 @@ AcpiNsRootInitialize (void)
|
||||
|
||||
ObjDesc->String.Length = (UINT16) STRLEN (InitVal->Val);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Allocate a buffer for the string. All String.Pointers must be
|
||||
* allocated buffers! (makes deletion simpler)
|
||||
*/
|
||||
@ -316,7 +316,7 @@ AcpiNsRootInitialize (void)
|
||||
}
|
||||
|
||||
/* Store pointer to value descriptor in nte */
|
||||
|
||||
|
||||
AcpiNsAttachObject (NewEntry, ObjDesc, ObjDesc->Common.Type);
|
||||
}
|
||||
}
|
||||
@ -351,8 +351,8 @@ UnlockAndExit:
|
||||
ACPI_STATUS
|
||||
AcpiNsLookup (
|
||||
ACPI_GENERIC_STATE *ScopeInfo,
|
||||
char *Pathname,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
char *Pathname,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
OPERATING_MODE InterpreterMode,
|
||||
UINT32 Flags,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
@ -379,13 +379,13 @@ AcpiNsLookup (
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Acpi_GblNsLookupCount++;
|
||||
|
||||
*RetEntry = ENTRY_NOT_FOUND;
|
||||
if (!Acpi_GblRootObject->Scope)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the name space has not been initialized:
|
||||
* - In Pass1 of Load mode, we need to initialize it
|
||||
* before trying to define a name.
|
||||
@ -406,9 +406,9 @@ AcpiNsLookup (
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Get the prefix scope.
|
||||
* A null scope means use the root scope
|
||||
* A null scope means use the root scope
|
||||
*/
|
||||
|
||||
if ((!ScopeInfo) ||
|
||||
@ -465,7 +465,7 @@ AcpiNsLookup (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Valid name pointer (Internal name format)
|
||||
*
|
||||
* Check for prefixes. As represented in the AML stream, a Pathname consists
|
||||
@ -485,11 +485,11 @@ AcpiNsLookup (
|
||||
if (*Pathname == AML_ROOT_PREFIX)
|
||||
{
|
||||
/* Pathname is fully qualified, look in root name table */
|
||||
|
||||
|
||||
EntryToSearch = Acpi_GblRootObject->Scope;
|
||||
Pathname++; /* point to segment part */
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Searching from root [%p]\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Searching from root [%p]\n",
|
||||
EntryToSearch));
|
||||
|
||||
/* Direct reference to root, "\" */
|
||||
@ -500,11 +500,11 @@ AcpiNsLookup (
|
||||
goto CheckForNewScopeAndExit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/* Pathname is relative to current scope, start there */
|
||||
|
||||
|
||||
EntryToSearch = PrefixScope;
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Searching relative to pfx scope [%p]\n",
|
||||
@ -514,18 +514,18 @@ AcpiNsLookup (
|
||||
|
||||
while (*Pathname == AML_PARENT_PREFIX)
|
||||
{
|
||||
|
||||
|
||||
/* Point to segment part or next ParentPrefix */
|
||||
|
||||
Pathname++;
|
||||
Pathname++;
|
||||
|
||||
/* Backup to the parent's scope */
|
||||
|
||||
|
||||
EntryToSearch = EntryToSearch->ParentEntry;
|
||||
if (!EntryToSearch)
|
||||
{
|
||||
/* Current scope has no parent scope */
|
||||
|
||||
|
||||
REPORT_ERROR ("NsLookup: Too many parent prefixes or scope has no parent");
|
||||
|
||||
return_ACPI_STATUS (AE_NOT_FOUND);
|
||||
@ -545,18 +545,18 @@ AcpiNsLookup (
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Dual Pathname (2 segments, Flags=%X)\n", Flags));
|
||||
}
|
||||
|
||||
|
||||
else if (*Pathname == AML_MULTI_NAME_PREFIX_OP)
|
||||
{
|
||||
NumSegments = (INT32)* (UINT8 *) ++Pathname;
|
||||
Pathname++; /* point to first segment */
|
||||
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Multi Pathname (%d Segments, Flags=%X) \n", NumSegments, Flags));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* No Dual or Multi prefix, hence there is only one
|
||||
* segment and Pathname is already pointing to it.
|
||||
*/
|
||||
@ -585,7 +585,7 @@ AcpiNsLookup (
|
||||
|
||||
while (NumSegments-- && EntryToSearch)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Search for the current segment in the table where it should be.
|
||||
* Type is significant only at the last (topmost) level.
|
||||
*/
|
||||
@ -604,7 +604,7 @@ AcpiNsLookup (
|
||||
{
|
||||
/* Name not in ACPI namespace */
|
||||
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
IMODE_LOAD_PASS2 == InterpreterMode)
|
||||
{
|
||||
REPORT_ERROR ("Name table overflow");
|
||||
@ -630,7 +630,7 @@ AcpiNsLookup (
|
||||
/* Complain about type mismatch */
|
||||
|
||||
REPORT_WARNING ("Type mismatch");
|
||||
DEBUG_PRINT (ACPI_WARN, ("NsLookup: %4.4s, type 0x%X, checking for type 0x%X\n",
|
||||
DEBUG_PRINT (ACPI_WARN, ("NsLookup: %4.4s, type 0x%X, checking for type 0x%X\n",
|
||||
&SimpleName, ThisEntry->Type, TypeToCheckFor));
|
||||
}
|
||||
|
||||
@ -647,18 +647,18 @@ AcpiNsLookup (
|
||||
if ((NumSegments || AcpiNsOpensScope (Type)) &&
|
||||
(ThisEntry->Scope == NULL))
|
||||
{
|
||||
/*
|
||||
* More segments or the type implies enclosed scope,
|
||||
/*
|
||||
* More segments or the type implies enclosed scope,
|
||||
* and the next scope has not been allocated.
|
||||
*/
|
||||
|
||||
DEBUG_PRINT (ACPI_INFO, ("NsLookup: Load mode=%d ThisEntry=%x\n", InterpreterMode, ThisEntry));
|
||||
|
||||
if ((IMODE_LOAD_PASS1 == InterpreterMode) ||
|
||||
if ((IMODE_LOAD_PASS1 == InterpreterMode) ||
|
||||
(IMODE_LOAD_PASS2 == InterpreterMode))
|
||||
{
|
||||
{
|
||||
/* First or second pass load mode ==> locate the next scope */
|
||||
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsLookup: Creating and adding a new scope\n"));
|
||||
ThisEntry->Scope = AcpiNsAllocateNameTable (NS_TABLE_SIZE);
|
||||
|
||||
@ -669,10 +669,10 @@ AcpiNsLookup (
|
||||
}
|
||||
|
||||
/* Now complain if there is no next scope */
|
||||
|
||||
|
||||
if (ThisEntry->Scope == NULL)
|
||||
{
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
IMODE_LOAD_PASS2 == InterpreterMode)
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("NsLookup: ***Error - No child scope at entry %p\n", ThisEntry));
|
||||
@ -688,7 +688,7 @@ AcpiNsLookup (
|
||||
|
||||
/* Scope table initialization */
|
||||
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
if (IMODE_LOAD_PASS1 == InterpreterMode ||
|
||||
IMODE_LOAD_PASS2 == InterpreterMode)
|
||||
{
|
||||
/* Initialize the new table */
|
||||
@ -704,14 +704,14 @@ AcpiNsLookup (
|
||||
|
||||
|
||||
/*
|
||||
* Always check if we need to open a new scope
|
||||
* Always check if we need to open a new scope
|
||||
*/
|
||||
|
||||
CheckForNewScopeAndExit:
|
||||
|
||||
if (!(Flags & NS_DONT_OPEN_SCOPE) && (WalkState))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If entry is a type which opens a scope,
|
||||
* push the new scope on the scope stack.
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsalloc - Namespace allocation and deletion utilities
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -153,18 +153,18 @@ AcpiNsAllocateNameTable (
|
||||
|
||||
AllocSize = (ACPI_SIZE) NteCount * sizeof (NAME_TABLE_ENTRY);
|
||||
|
||||
|
||||
|
||||
/* Allow room for link to appendage */
|
||||
|
||||
|
||||
AllocSize += sizeof (NAME_TABLE_ENTRY *);
|
||||
|
||||
|
||||
|
||||
NameTable = AcpiCmCallocate (AllocSize);
|
||||
if (NameTable)
|
||||
{
|
||||
/* Move past the appendage pointer */
|
||||
|
||||
NameTable = (NAME_TABLE_ENTRY *) (((UINT8 *) NameTable) +
|
||||
|
||||
NameTable = (NAME_TABLE_ENTRY *) (((UINT8 *) NameTable) +
|
||||
sizeof (NAME_TABLE_ENTRY *));
|
||||
}
|
||||
|
||||
@ -203,8 +203,8 @@ AcpiNsDeleteNamespaceSubtree (
|
||||
ChildHandle = 0;
|
||||
Level = 1;
|
||||
|
||||
/*
|
||||
* Traverse the tree of objects until we bubble back up
|
||||
/*
|
||||
* Traverse the tree of objects until we bubble back up
|
||||
* to where we started.
|
||||
*/
|
||||
|
||||
@ -253,8 +253,8 @@ AcpiNsDeleteNamespaceSubtree (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
* No more children in this object.
|
||||
/*
|
||||
* No more children in this object.
|
||||
* We will move up to the grandparent.
|
||||
*/
|
||||
Level--;
|
||||
@ -281,7 +281,7 @@ AcpiNsDeleteNamespaceSubtree (
|
||||
}
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -314,7 +314,7 @@ AcpiNsRemoveReference (
|
||||
Entry->Scope = NULL;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Decrement the reference count(s) of all parents up to the root,
|
||||
* And delete anything with zero remaining references.
|
||||
*/
|
||||
@ -382,8 +382,8 @@ AcpiNsDeleteNamespaceByOwner (
|
||||
ChildHandle = 0;
|
||||
Level = 1;
|
||||
|
||||
/*
|
||||
* Traverse the tree of objects until we bubble back up
|
||||
/*
|
||||
* Traverse the tree of objects until we bubble back up
|
||||
* to where we started.
|
||||
*/
|
||||
|
||||
@ -425,8 +425,8 @@ AcpiNsDeleteNamespaceByOwner (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
* No more children in this object.
|
||||
/*
|
||||
* No more children in this object.
|
||||
* We will move up to the grandparent.
|
||||
*/
|
||||
Level--;
|
||||
@ -456,7 +456,7 @@ AcpiNsDeleteNamespaceByOwner (
|
||||
}
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -497,7 +497,7 @@ AcpiNsDeleteScope (
|
||||
*/
|
||||
do
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Create the original allocated pointer (backup to before appendage ptr),
|
||||
* and get the next appendage pointer. This ptr is null at end-of-list.
|
||||
*/
|
||||
@ -506,13 +506,13 @@ AcpiNsDeleteScope (
|
||||
ThisTable = NEXTSEG (ThisTable);
|
||||
|
||||
DEBUG_PRINT (ACPI_INFO, ("NsDeleteScope: Deleting Name Table at %p \n", AllocatedTable));
|
||||
|
||||
|
||||
/* Now we can free the table */
|
||||
|
||||
AcpiCmFree (AllocatedTable);
|
||||
AcpiCmFree (AllocatedTable);
|
||||
|
||||
} while (ThisTable);
|
||||
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -39,9 +39,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -49,11 +49,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -87,7 +87,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -132,7 +132,7 @@
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpPathname
|
||||
* FUNCTION: AcpiNsDumpPathname
|
||||
*
|
||||
* PARAMETERS: Handle - Object
|
||||
* Msg - Prefix message
|
||||
@ -146,15 +146,15 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsDumpPathname (
|
||||
ACPI_HANDLE Handle,
|
||||
char *Msg,
|
||||
UINT32 Level,
|
||||
ACPI_HANDLE Handle,
|
||||
char *Msg,
|
||||
UINT32 Level,
|
||||
UINT32 Component)
|
||||
{
|
||||
char *Buffer;
|
||||
UINT32 Length;
|
||||
|
||||
|
||||
|
||||
FUNCTION_TRACE ("NsDumpPathname");
|
||||
|
||||
/* Do this only if the requested debug level and component are enabled */
|
||||
@ -186,7 +186,7 @@ AcpiNsDumpPathname (
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpOneObject
|
||||
* FUNCTION: AcpiNsDumpOneObject
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* Level - Nesting level of the handle
|
||||
@ -199,8 +199,8 @@ AcpiNsDumpPathname (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsDumpOneObject (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
@ -229,7 +229,7 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
|
||||
if (!ObjHandle)
|
||||
{
|
||||
DEBUG_PRINT (ACPI_INFO, ("Null object handle\n"));
|
||||
@ -255,7 +255,7 @@ AcpiNsDumpOneObject (
|
||||
if (LevelTmp)
|
||||
{
|
||||
if (DownstreamSiblingMask & WhichBit)
|
||||
{
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("|"));
|
||||
}
|
||||
|
||||
@ -263,10 +263,10 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" "));
|
||||
}
|
||||
|
||||
|
||||
WhichBit <<= 1;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
if (AcpiNsExistDownstreamSibling (ThisEntry + 1, Size, Appendage))
|
||||
@ -285,13 +285,13 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("-"));
|
||||
}
|
||||
|
||||
|
||||
else if (AcpiNsExistDownstreamSibling (ThisEntry->Scope, NS_TABLE_SIZE,
|
||||
NEXTSEG (ThisEntry->Scope)))
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("+"));
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("-"));
|
||||
@ -306,7 +306,7 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
Type = INTERNAL_TYPE_DEF_ANY; /* prints as *ERROR* */
|
||||
}
|
||||
|
||||
|
||||
if (!AcpiCmValidAcpiName (ThisEntry->Name))
|
||||
{
|
||||
REPORT_WARNING ("Invalid Name");
|
||||
@ -334,16 +334,16 @@ AcpiNsDumpOneObject (
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
/* Name is a Method and its AML offset/length are set */
|
||||
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" M:%p-%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Method.Pcode,
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Method.PcodeLength));
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Method.PcodeLength));
|
||||
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case ACPI_TYPE_NUMBER:
|
||||
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" N:%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Number.Value));
|
||||
break;
|
||||
@ -370,7 +370,7 @@ AcpiNsDumpOneObject (
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* If debug turned off, done */
|
||||
|
||||
if (!(DebugLevel & TRACE_VALUES))
|
||||
@ -419,7 +419,7 @@ AcpiNsDumpOneObject (
|
||||
|
||||
else
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [%s])\n",
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [%s])\n",
|
||||
ObjType, AcpiCmGetTypeName (ObjType)));
|
||||
BytesToDump = ObjDesc->Common.Size;
|
||||
}
|
||||
@ -441,7 +441,7 @@ AcpiNsDumpOneObject (
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Valid object, get the pointer to next level, if any
|
||||
*/
|
||||
switch (ObjType)
|
||||
@ -493,7 +493,7 @@ Cleanup:
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpObjects
|
||||
* FUNCTION: AcpiNsDumpObjects
|
||||
*
|
||||
* PARAMETERS: Type - Object type to be dumped
|
||||
* MaxDepth - Maximum depth of dump. Use ACPI_UINT32_MAX
|
||||
@ -509,8 +509,8 @@ Cleanup:
|
||||
|
||||
void
|
||||
AcpiNsDumpObjects (
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
UINT32 MaxDepth,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
UINT32 MaxDepth,
|
||||
UINT32 OwnerId,
|
||||
ACPI_HANDLE StartHandle)
|
||||
{
|
||||
@ -520,14 +520,14 @@ AcpiNsDumpObjects (
|
||||
Info.DebugLevel = TRACE_TABLES;
|
||||
Info.OwnerId = OwnerId;
|
||||
|
||||
AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, NS_WALK_NO_UNLOCK, AcpiNsDumpOneObject,
|
||||
AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, NS_WALK_NO_UNLOCK, AcpiNsDumpOneObject,
|
||||
(void *) &Info, NULL);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpOneDevice
|
||||
* FUNCTION: AcpiNsDumpOneDevice
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* Level - Nesting level of the handle
|
||||
@ -540,8 +540,8 @@ AcpiNsDumpObjects (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsDumpOneDevice (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
@ -571,7 +571,7 @@ AcpiNsDumpOneDevice (
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpRootDevices
|
||||
* FUNCTION: AcpiNsDumpRootDevices
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -595,13 +595,13 @@ AcpiNsDumpRootDevices (void)
|
||||
AcpiGetHandle (0, NS_SYSTEM_BUS, &SysBusHandle);
|
||||
|
||||
DEBUG_PRINT (TRACE_TABLES, ("Display of all devices in the namespace:\n"));
|
||||
AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle, ACPI_INT32_MAX, NS_WALK_NO_UNLOCK,
|
||||
AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle, ACPI_INT32_MAX, NS_WALK_NO_UNLOCK,
|
||||
AcpiNsDumpOneDevice, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpTables
|
||||
*
|
||||
* PARAMETERS: SearchBase - Root of subtree to be dumped, or
|
||||
@ -615,7 +615,7 @@ AcpiNsDumpRootDevices (void)
|
||||
|
||||
void
|
||||
AcpiNsDumpTables (
|
||||
ACPI_HANDLE SearchBase,
|
||||
ACPI_HANDLE SearchBase,
|
||||
INT32 MaxDepth)
|
||||
{
|
||||
ACPI_HANDLE SearchHandle = SearchBase;
|
||||
@ -625,8 +625,8 @@ AcpiNsDumpTables (
|
||||
|
||||
|
||||
if (!Acpi_GblRootObject->Scope)
|
||||
{
|
||||
/*
|
||||
{
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* there is nothing to dump.
|
||||
*/
|
||||
@ -650,7 +650,7 @@ AcpiNsDumpTables (
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpEntry
|
||||
* FUNCTION: AcpiNsDumpEntry
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* DebugLevel - Output level
|
||||
@ -673,10 +673,10 @@ AcpiNsDumpEntry (
|
||||
Info.OwnerId = ACPI_UINT32_MAX;
|
||||
|
||||
AcpiNsDumpOneObject (Handle, 1, &Info, NULL);
|
||||
|
||||
|
||||
DEBUG_PRINT (TRACE_EXEC, ("leave AcpiNsDumpEntry %p\n", Handle));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nseval - Object evaluation interfaces -- includes control
|
||||
* method lookup and execution.
|
||||
*
|
||||
@ -39,9 +39,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -49,11 +49,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -88,7 +88,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -138,9 +138,9 @@
|
||||
* *Pathname - Name of method to execute, If NULL, the
|
||||
* handle is the object to execute
|
||||
* **Params - List of parameters to pass to the method,
|
||||
* terminated by NULL. Params itself may be
|
||||
* terminated by NULL. Params itself may be
|
||||
* NULL if no parameters are being passed.
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -154,8 +154,8 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateRelative (
|
||||
NAME_TABLE_ENTRY *Handle,
|
||||
char *Pathname,
|
||||
NAME_TABLE_ENTRY *Handle,
|
||||
char *Pathname,
|
||||
ACPI_OBJECT_INTERNAL **Params,
|
||||
ACPI_OBJECT_INTERNAL **ReturnObject)
|
||||
{
|
||||
@ -172,7 +172,7 @@ AcpiNsEvaluateRelative (
|
||||
/*
|
||||
* Must have a valid object handle
|
||||
*/
|
||||
if (!Handle)
|
||||
if (!Handle)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -200,7 +200,7 @@ AcpiNsEvaluateRelative (
|
||||
/* Lookup the name in the namespace */
|
||||
|
||||
ScopeInfo.Scope.Entry = RelObjEntry->Scope;
|
||||
Status = AcpiNsLookup (&ScopeInfo, InternalPath, ACPI_TYPE_ANY, IMODE_EXECUTE,
|
||||
Status = AcpiNsLookup (&ScopeInfo, InternalPath, ACPI_TYPE_ANY, IMODE_EXECUTE,
|
||||
NS_NO_UPSEARCH, NULL, &ObjEntry);
|
||||
AcpiCmReleaseMutex (MTX_NAMESPACE);
|
||||
|
||||
@ -239,12 +239,12 @@ Cleanup:
|
||||
* FUNCTION: AcpiNsEvaluateByName
|
||||
*
|
||||
* PARAMETERS: Pathname - Fully qualified pathname to the object
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
* **Params - List of parameters to pass to the method,
|
||||
* terminated by NULL. Params itself may be
|
||||
* terminated by NULL. Params itself may be
|
||||
* NULL if no parameters are being passed.
|
||||
*
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Find and execute the requested method passing the given
|
||||
@ -256,7 +256,7 @@ Cleanup:
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateByName (
|
||||
char *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OBJECT_INTERNAL **Params,
|
||||
ACPI_OBJECT_INTERNAL **ReturnObject)
|
||||
{
|
||||
@ -264,7 +264,7 @@ AcpiNsEvaluateByName (
|
||||
NAME_TABLE_ENTRY *ObjEntry = NULL;
|
||||
char *InternalPath = NULL;
|
||||
|
||||
|
||||
|
||||
FUNCTION_TRACE ("NsEvaluateByName");
|
||||
|
||||
|
||||
@ -283,7 +283,7 @@ AcpiNsEvaluateByName (
|
||||
|
||||
/* Lookup the name in the namespace */
|
||||
|
||||
Status = AcpiNsLookup (NULL, InternalPath, ACPI_TYPE_ANY, IMODE_EXECUTE,
|
||||
Status = AcpiNsLookup (NULL, InternalPath, ACPI_TYPE_ANY, IMODE_EXECUTE,
|
||||
NS_NO_UPSEARCH, NULL, &ObjEntry);
|
||||
AcpiCmReleaseMutex (MTX_NAMESPACE);
|
||||
|
||||
@ -326,10 +326,10 @@ Cleanup:
|
||||
* FUNCTION: AcpiNsEvaluateByHandle
|
||||
*
|
||||
* PARAMETERS: ObjEntry - NTE of method to execute
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
* **Params - List of parameters to pass to the method,
|
||||
* terminated by NULL. Params itself may be
|
||||
* terminated by NULL. Params itself may be
|
||||
* NULL if no parameters are being passed.
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -342,11 +342,11 @@ Cleanup:
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateByHandle (
|
||||
NAME_TABLE_ENTRY *Handle,
|
||||
NAME_TABLE_ENTRY *Handle,
|
||||
ACPI_OBJECT_INTERNAL **Params,
|
||||
ACPI_OBJECT_INTERNAL **ReturnObject)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ObjEntry;
|
||||
NAME_TABLE_ENTRY *ObjEntry;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_INTERNAL *LocalReturnObject;
|
||||
|
||||
@ -406,18 +406,18 @@ AcpiNsEvaluateByHandle (
|
||||
else
|
||||
{
|
||||
/* Case 2) Object is NOT a method, just return its current value */
|
||||
|
||||
|
||||
Status = AcpiNsGetObjectValue (ObjEntry, &LocalReturnObject);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if there is a return value on the stack that must be dealt with
|
||||
* Check if there is a return value on the stack that must be dealt with
|
||||
*/
|
||||
|
||||
if (Status == AE_CTRL_RETURN_VALUE)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the Method returned a value and the caller provided a place
|
||||
* to store a returned value, Copy the returned value to the object
|
||||
* descriptor provided by the caller.
|
||||
@ -457,7 +457,7 @@ UnlockAndExit:
|
||||
*
|
||||
* PARAMETERS: MethodEntry - The Nte of the object/method
|
||||
* **Params - List of parameters to pass to the method,
|
||||
* terminated by NULL. Params itself may be
|
||||
* terminated by NULL. Params itself may be
|
||||
* NULL if no parameters are being passed.
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -470,7 +470,7 @@ UnlockAndExit:
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsExecuteControlMethod (
|
||||
NAME_TABLE_ENTRY *MethodEntry,
|
||||
NAME_TABLE_ENTRY *MethodEntry,
|
||||
ACPI_OBJECT_INTERNAL **Params,
|
||||
ACPI_OBJECT_INTERNAL **ReturnObjDesc)
|
||||
{
|
||||
@ -490,7 +490,7 @@ AcpiNsExecuteControlMethod (
|
||||
return_ACPI_STATUS (AE_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Valid method, Set the current scope to that of the Method, and execute it.
|
||||
*/
|
||||
|
||||
@ -498,13 +498,13 @@ AcpiNsExecuteControlMethod (
|
||||
ObjDesc->Method.Pcode + 1,
|
||||
ObjDesc->Method.PcodeLength - 1));
|
||||
|
||||
DUMP_PATHNAME (MethodEntry, "NsExecuteControlMethod: Executing",
|
||||
DUMP_PATHNAME (MethodEntry, "NsExecuteControlMethod: Executing",
|
||||
TRACE_NAMES, _COMPONENT);
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("At offset %8XH\n", ObjDesc->Method.Pcode + 1));
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* Unlock the namespace before execution. This allows namespace access
|
||||
* via the external Acpi* interfaces while a method is being executed.
|
||||
* However, any namespace deletion must acquire both the namespace and
|
||||
@ -514,7 +514,7 @@ AcpiNsExecuteControlMethod (
|
||||
|
||||
AcpiCmReleaseMutex (MTX_NAMESPACE);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Excecute the method via the interpreter
|
||||
*/
|
||||
Status = AcpiAmlExecuteMethod (MethodEntry, Params, ReturnObjDesc);
|
||||
@ -555,7 +555,7 @@ AcpiNsGetObjectValue (
|
||||
*/
|
||||
|
||||
if ((ObjectEntry->Type == ACPI_TYPE_PROCESSOR) ||
|
||||
(ObjectEntry->Type == ACPI_TYPE_POWER))
|
||||
(ObjectEntry->Type == ACPI_TYPE_POWER))
|
||||
{
|
||||
|
||||
/*
|
||||
@ -585,14 +585,14 @@ AcpiNsGetObjectValue (
|
||||
|
||||
MEMCPY (&ObjDesc->Common.FirstNonCommonByte, &ValDesc->Common.FirstNonCommonByte,
|
||||
(sizeof(ACPI_OBJECT_COMMON) - sizeof(ObjDesc->Common.FirstNonCommonByte)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Other objects require a reference object wrapper which we then attempt to resolve.
|
||||
*/
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
/* Create an Reference object to contain the object */
|
||||
|
||||
ObjDesc = AcpiCmCreateInternalObject (INTERNAL_TYPE_REFERENCE);
|
||||
@ -607,15 +607,15 @@ AcpiNsGetObjectValue (
|
||||
ObjDesc->Reference.OpCode = (UINT8) AML_NAME_OP;
|
||||
ObjDesc->Reference.Object = (void *) ObjectEntry;
|
||||
|
||||
/*
|
||||
* Use AcpiAmlResolveToValue() to get the associated value. The call to AcpiAmlResolveToValue causes
|
||||
/*
|
||||
* Use AcpiAmlResolveToValue() to get the associated value. The call to AcpiAmlResolveToValue causes
|
||||
* ObjDesc (allocated above) to always be deleted.
|
||||
*/
|
||||
|
||||
Status = AcpiAmlResolveToValue (&ObjDesc);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* If AcpiAmlResolveToValue() succeeded, the return value was placed in ObjDesc.
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsload - namespace loading procedures
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -167,7 +167,7 @@ AcpiNsParseTable (
|
||||
|
||||
/* Pass 1: Parse everything except control method bodies */
|
||||
|
||||
Status = AcpiPsParseAml (Acpi_GblParsedNamespaceRoot, TableDesc->AmlPointer, TableDesc->AmlLength, 0);
|
||||
Status = AcpiPsParseAml (Acpi_GblParsedNamespaceRoot, TableDesc->AmlPointer, TableDesc->AmlLength, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -243,10 +243,10 @@ AcpiNsLoadTable (
|
||||
|
||||
|
||||
/*
|
||||
* Parse the table and load the namespace with all named objects found within.
|
||||
* Control methods are NOT parsed at this time. In fact, the control methods
|
||||
* cannot be parsed until the entire namespace is loaded, because if a control
|
||||
* method makes a forward reference (call) to another control method, we can't
|
||||
* Parse the table and load the namespace with all named objects found within.
|
||||
* Control methods are NOT parsed at this time. In fact, the control methods
|
||||
* cannot be parsed until the entire namespace is loaded, because if a control
|
||||
* method makes a forward reference (call) to another control method, we can't
|
||||
* continue parsing because we don't know how many arguments to parse next!
|
||||
*/
|
||||
|
||||
@ -279,7 +279,7 @@ AcpiNsLoadTable (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsLoadTableByType
|
||||
*
|
||||
* PARAMETERS: TableType - Id of the table type to load
|
||||
@ -301,7 +301,7 @@ AcpiNsLoadTableByType (
|
||||
ACPI_TABLE_HEADER *TablePtr;
|
||||
ACPI_TABLE_DESC *TableDesc;
|
||||
|
||||
|
||||
|
||||
FUNCTION_TRACE ("NsLoadTableByType");
|
||||
|
||||
|
||||
@ -332,7 +332,7 @@ AcpiNsLoadTableByType (
|
||||
TableDesc->TableId = TABLE_ID_DSDT;
|
||||
|
||||
/* Initialize the root of the namespace tree */
|
||||
|
||||
|
||||
Status = AcpiNsRootInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsnames - Name manipulation and search
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -126,7 +126,7 @@
|
||||
MODULE_NAME ("nsnames");
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsNameOfScope
|
||||
@ -158,7 +158,7 @@ AcpiNsNameOfScope (
|
||||
|
||||
if (!Acpi_GblRootObject->Scope || !EntryToSearch)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* this function should not have been called.
|
||||
*/
|
||||
@ -166,7 +166,7 @@ AcpiNsNameOfScope (
|
||||
}
|
||||
|
||||
/* Calculate required buffer size based on depth below root NT */
|
||||
|
||||
|
||||
for (Size = 1, Temp = EntryToSearch;
|
||||
Temp->ParentEntry;
|
||||
Temp = Temp->ParentEntry)
|
||||
@ -183,10 +183,10 @@ AcpiNsNameOfScope (
|
||||
REPORT_ERROR ("NsNameOfScope: allocation failure");
|
||||
return_PTR (NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Store terminator byte, then build name backwards */
|
||||
|
||||
|
||||
NameBuffer[Size] = '\0';
|
||||
while ((Size > ACPI_NAME_SIZE) && EntryToSearch->ParentEntry)
|
||||
{
|
||||
@ -235,7 +235,7 @@ AcpiNsNameOfCurrentScope (
|
||||
ScopeName = AcpiNsNameOfScope (WalkState->ScopeInfo->Scope.Entry);
|
||||
return_PTR (ScopeName);
|
||||
}
|
||||
|
||||
|
||||
REPORT_ERROR ("Current scope pointer is invalid");
|
||||
|
||||
return_PTR (NULL);
|
||||
@ -247,7 +247,7 @@ AcpiNsNameOfCurrentScope (
|
||||
* FUNCTION: AcpiNsHandleToPathname
|
||||
*
|
||||
* PARAMETERS: TargetHandle - Handle of nte whose name is to be found
|
||||
* BufSize - Size of the buffer provided
|
||||
* BufSize - Size of the buffer provided
|
||||
* UserBuffer - Where the pathname is returned
|
||||
*
|
||||
* RETURN: Status, Buffer is filled with pathname if status == AE_OK
|
||||
@ -260,8 +260,8 @@ AcpiNsNameOfCurrentScope (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsHandleToPathname (
|
||||
ACPI_HANDLE TargetHandle,
|
||||
UINT32 *BufSize,
|
||||
ACPI_HANDLE TargetHandle,
|
||||
UINT32 *BufSize,
|
||||
char *UserBuffer)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
@ -279,7 +279,7 @@ AcpiNsHandleToPathname (
|
||||
|
||||
if (!Acpi_GblRootObject->Scope || !TargetHandle)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* this function should not have been called.
|
||||
*/
|
||||
@ -299,7 +299,7 @@ AcpiNsHandleToPathname (
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Compute length of pathname as 5 * number of name segments.
|
||||
* Go back up the parent tree to the root
|
||||
*/
|
||||
@ -323,9 +323,9 @@ AcpiNsHandleToPathname (
|
||||
Status = AE_BUFFER_OVERFLOW;
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
|
||||
/* Store null terminator */
|
||||
|
||||
|
||||
UserBuffer[Size] = '\0';
|
||||
Size -= ACPI_NAME_SIZE;
|
||||
|
||||
@ -335,22 +335,22 @@ AcpiNsHandleToPathname (
|
||||
UserBuffer[--Size] = PATH_SEPARATOR;
|
||||
|
||||
/* Build name backwards, putting "." between segments */
|
||||
|
||||
|
||||
while ((Size > ACPI_NAME_SIZE) && EntryToSearch)
|
||||
{
|
||||
Size -= ACPI_NAME_SIZE;
|
||||
Name = AcpiNsFindParentName (EntryToSearch);
|
||||
STORE32 ((UserBuffer + Size), &Name);
|
||||
|
||||
|
||||
UserBuffer[--Size] = PATH_SEPARATOR;
|
||||
EntryToSearch = EntryToSearch->ParentEntry;
|
||||
}
|
||||
|
||||
/* Overlay the "." preceding the first segment with the root name "\" */
|
||||
|
||||
|
||||
UserBuffer[Size] = '\\';
|
||||
|
||||
DEBUG_PRINT (TRACE_EXEC, ("NsHandleToPathname: Len=%d, %s \n",
|
||||
DEBUG_PRINT (TRACE_EXEC, ("NsHandleToPathname: Len=%d, %s \n",
|
||||
PathLength, UserBuffer));
|
||||
|
||||
|
||||
@ -367,7 +367,7 @@ UnlockAndExit:
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsPatternMatch
|
||||
*
|
||||
* PARAMETERS: ObjEntry - A namespace entry
|
||||
@ -381,7 +381,7 @@ UnlockAndExit:
|
||||
|
||||
BOOLEAN
|
||||
AcpiNsPatternMatch (
|
||||
NAME_TABLE_ENTRY *ObjEntry,
|
||||
NAME_TABLE_ENTRY *ObjEntry,
|
||||
char *SearchFor)
|
||||
{
|
||||
INT32 i;
|
||||
@ -405,7 +405,7 @@ AcpiNsPatternMatch (
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsNameCompare
|
||||
*
|
||||
* PARAMETERS: ObjHandle - A namespace entry
|
||||
@ -420,8 +420,8 @@ AcpiNsPatternMatch (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsNameCompare (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
@ -433,7 +433,7 @@ AcpiNsNameCompare (
|
||||
if (AcpiNsPatternMatch ((NAME_TABLE_ENTRY *) ObjHandle, Find->SearchFor))
|
||||
{
|
||||
/* Name matches pattern */
|
||||
|
||||
|
||||
if (Find->List)
|
||||
{
|
||||
DEBUG_PRINT (TRACE_NAMES, ("FindName: Match found: %.4s\n",
|
||||
@ -441,7 +441,7 @@ AcpiNsNameCompare (
|
||||
|
||||
Find->List[*(Find->Count)] = ObjHandle;
|
||||
}
|
||||
|
||||
|
||||
++*(Find->Count);
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ AcpiNsNameCompare (
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsLowFindNames
|
||||
*
|
||||
* PARAMETERS: *ThisEntry - Table to be searched
|
||||
@ -472,10 +472,10 @@ AcpiNsNameCompare (
|
||||
|
||||
void
|
||||
AcpiNsLowFindNames (
|
||||
NAME_TABLE_ENTRY *ThisEntry,
|
||||
NAME_TABLE_ENTRY *ThisEntry,
|
||||
char *SearchFor,
|
||||
INT32 *Count,
|
||||
ACPI_HANDLE List[],
|
||||
INT32 *Count,
|
||||
ACPI_HANDLE List[],
|
||||
INT32 MaxDepth)
|
||||
{
|
||||
FIND_CONTEXT Find;
|
||||
@ -486,11 +486,11 @@ AcpiNsLowFindNames (
|
||||
|
||||
if (0 == MaxDepth || !ThisEntry || !SearchFor || !Count)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Zero requested depth, nothing to search,
|
||||
* nothing to search for, or count pointer bad
|
||||
* nothing to search for, or count pointer bad
|
||||
*/
|
||||
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@ -502,13 +502,13 @@ AcpiNsLowFindNames (
|
||||
|
||||
/* Walk the namespace and find all matches */
|
||||
|
||||
AcpiNsWalkNamespace (ACPI_TYPE_ANY, (ACPI_HANDLE) ThisEntry, MaxDepth, NS_WALK_NO_UNLOCK,
|
||||
AcpiNsWalkNamespace (ACPI_TYPE_ANY, (ACPI_HANDLE) ThisEntry, MaxDepth, NS_WALK_NO_UNLOCK,
|
||||
AcpiNsNameCompare, &Find, NULL);
|
||||
|
||||
if (List)
|
||||
{
|
||||
/* null-terminate the output array */
|
||||
|
||||
|
||||
List[*Count] = (ACPI_HANDLE) 0;
|
||||
}
|
||||
|
||||
@ -541,8 +541,8 @@ AcpiNsLowFindNames (
|
||||
|
||||
ACPI_HANDLE *
|
||||
AcpiNsFindNames (
|
||||
char *SearchFor,
|
||||
ACPI_HANDLE StartHandle,
|
||||
char *SearchFor,
|
||||
ACPI_HANDLE StartHandle,
|
||||
INT32 MaxDepth)
|
||||
{
|
||||
ACPI_HANDLE *List = NULL;
|
||||
@ -554,7 +554,7 @@ AcpiNsFindNames (
|
||||
|
||||
if (!Acpi_GblRootObject->Scope)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* there surely are no matching names.
|
||||
*/
|
||||
@ -567,17 +567,17 @@ AcpiNsFindNames (
|
||||
|
||||
StartHandle = Acpi_GblRootObject;
|
||||
}
|
||||
|
||||
|
||||
else if (((NAME_TABLE_ENTRY *) StartHandle)->Scope)
|
||||
{
|
||||
/* base has children to search */
|
||||
|
||||
StartHandle = ((NAME_TABLE_ENTRY *) StartHandle)->Scope;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If base is not the root and has no children,
|
||||
* there is nothing to search.
|
||||
*/
|
||||
@ -591,12 +591,12 @@ AcpiNsFindNames (
|
||||
SearchFor = "????";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Pass 1. Get required buffer size, don't try to build list */
|
||||
|
||||
|
||||
Count = 0;
|
||||
AcpiNsLowFindNames (StartHandle, SearchFor, &Count, NULL, MaxDepth);
|
||||
|
||||
|
||||
if (0 == Count)
|
||||
{
|
||||
return_PTR (NULL);
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsobject - Utilities for objects attached to namespace table entries
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -138,7 +138,7 @@
|
||||
* Type - Type of object, or ACPI_TYPE_ANY if not known
|
||||
*
|
||||
* DESCRIPTION: Record the given object as the value associated with the
|
||||
* name whose ACPI_HANDLE is passed. If Object is NULL
|
||||
* name whose ACPI_HANDLE is passed. If Object is NULL
|
||||
* and Type is ACPI_TYPE_ANY, set the name as having no value.
|
||||
*
|
||||
* MUTEX: Assumes namespace is locked
|
||||
@ -147,8 +147,8 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsAttachObject (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE Object,
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE Object,
|
||||
OBJECT_TYPE_INTERNAL Type)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ThisEntry = (NAME_TABLE_ENTRY *) Handle;
|
||||
@ -173,7 +173,7 @@ AcpiNsAttachObject (
|
||||
REPORT_ERROR ("NsAttachObject: Name space not initialized");
|
||||
return_ACPI_STATUS (AE_NO_NAMESPACE);
|
||||
}
|
||||
|
||||
|
||||
if (!Handle)
|
||||
{
|
||||
/* Invalid handle */
|
||||
@ -181,7 +181,7 @@ AcpiNsAttachObject (
|
||||
REPORT_ERROR ("NsAttachObject: Null name handle");
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
if (!Object && (ACPI_TYPE_ANY != Type))
|
||||
{
|
||||
/* Null object */
|
||||
@ -189,7 +189,7 @@ AcpiNsAttachObject (
|
||||
REPORT_ERROR ("NsAttachObject: Null object, but type not ACPI_TYPE_ANY");
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
if (!VALID_DESCRIPTOR_TYPE (Handle, DESC_TYPE_NTE))
|
||||
{
|
||||
/* Not a name handle */
|
||||
@ -204,7 +204,7 @@ AcpiNsAttachObject (
|
||||
{
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsAttachObject: Obj %p already installed in NTE %p\n",
|
||||
Object, Handle));
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -224,14 +224,14 @@ AcpiNsAttachObject (
|
||||
}
|
||||
|
||||
/*
|
||||
* If the object is an NTE with an attached object,
|
||||
* If the object is an NTE with an attached object,
|
||||
* we will use that (attached) object
|
||||
*/
|
||||
|
||||
else if (VALID_DESCRIPTOR_TYPE (Object, DESC_TYPE_NTE) &&
|
||||
else if (VALID_DESCRIPTOR_TYPE (Object, DESC_TYPE_NTE) &&
|
||||
((NAME_TABLE_ENTRY *) Object)->Object)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Value passed is a name handle and that name has a non-null value.
|
||||
* Use that name's value and type.
|
||||
*/
|
||||
@ -266,7 +266,7 @@ AcpiNsAttachObject (
|
||||
ObjType = Type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Type is TYPE_Any, we must try to determinte the actual type of the object */
|
||||
|
||||
/*
|
||||
@ -275,7 +275,7 @@ AcpiNsAttachObject (
|
||||
else if (AcpiTbSystemTablePointer (Object))
|
||||
{
|
||||
/* Object points into the AML stream. Set a flag bit in the NTE to indicate this */
|
||||
|
||||
|
||||
Flags |= NTE_AML_ATTACHMENT;
|
||||
|
||||
/* The next byte (perhaps the next two bytes) will be the AML opcode */
|
||||
@ -293,12 +293,12 @@ AcpiNsAttachObject (
|
||||
if (Opcode != AML_REVISION_OP)
|
||||
{
|
||||
/* OpPrefix is unrecognized unless part of RevisionOp */
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* Else fall through to set type as Number */
|
||||
|
||||
|
||||
|
||||
case AML_ZERO_OP: case AML_ONES_OP: case AML_ONE_OP:
|
||||
case AML_BYTE_OP: case AML_WORD_OP: case AML_DWORD_OP:
|
||||
@ -342,14 +342,14 @@ AcpiNsAttachObject (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Cannot figure out the type -- set to DefAny which will print as an
|
||||
* error in the name table dump
|
||||
*/
|
||||
|
||||
if (GetDebugLevel () > 0)
|
||||
{
|
||||
DUMP_PATHNAME (Handle, "NsAttachObject confused: setting bogus type for ",
|
||||
DUMP_PATHNAME (Handle, "NsAttachObject confused: setting bogus type for ",
|
||||
ACPI_INFO, _COMPONENT);
|
||||
|
||||
if (AcpiTbSystemTablePointer (Object))
|
||||
@ -357,12 +357,12 @@ AcpiNsAttachObject (
|
||||
DEBUG_PRINT (ACPI_INFO,
|
||||
("AML-stream code %02x\n", *(UINT8 *) Object));
|
||||
}
|
||||
|
||||
|
||||
else if (VALID_DESCRIPTOR_TYPE (Object, DESC_TYPE_NTE))
|
||||
{
|
||||
DUMP_PATHNAME (Object, "name ", ACPI_INFO, _COMPONENT);
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
DUMP_PATHNAME (Object, "object ", ACPI_INFO, _COMPONENT);
|
||||
@ -378,7 +378,7 @@ AcpiNsAttachObject (
|
||||
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsAttachObject: Installing obj %p into NTE %p\n",
|
||||
ObjDesc, Handle));
|
||||
|
||||
|
||||
|
||||
/* Must increment the new value's reference count (if it is an internal object) */
|
||||
|
||||
@ -395,8 +395,8 @@ AcpiNsAttachObject (
|
||||
ThisEntry->Flags = Flags;
|
||||
|
||||
|
||||
/*
|
||||
* Delete an existing attached object.
|
||||
/*
|
||||
* Delete an existing attached object.
|
||||
*/
|
||||
|
||||
if (PreviousObjDesc)
|
||||
@ -426,8 +426,8 @@ AcpiNsAttachObject (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsAttachMethod (
|
||||
ACPI_HANDLE Handle,
|
||||
UINT8 *PcodeAddr,
|
||||
ACPI_HANDLE Handle,
|
||||
UINT8 *PcodeAddr,
|
||||
UINT32 PcodeLength)
|
||||
{
|
||||
ACPI_OBJECT_INTERNAL *ObjDesc;
|
||||
@ -447,7 +447,7 @@ AcpiNsAttachMethod (
|
||||
REPORT_ERROR ("NsAttachMethod: name space uninitialized");
|
||||
return_ACPI_STATUS (AE_NO_NAMESPACE);
|
||||
}
|
||||
|
||||
|
||||
if (!Handle)
|
||||
{
|
||||
/* Null name handle */
|
||||
@ -456,7 +456,7 @@ AcpiNsAttachMethod (
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Allocate a method descriptor */
|
||||
|
||||
ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_METHOD);
|
||||
@ -481,7 +481,7 @@ AcpiNsAttachMethod (
|
||||
ThisEntry->Object = ObjDesc;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Delete an existing object. Don't try to re-use in case it is shared
|
||||
*/
|
||||
if (PreviousObjDesc)
|
||||
@ -520,7 +520,7 @@ AcpiNsDetachObject (
|
||||
NAME_TABLE_ENTRY *Entry = Object;
|
||||
ACPI_OBJECT_INTERNAL *ObjDesc;
|
||||
|
||||
|
||||
|
||||
FUNCTION_TRACE ("NsDetachObject");
|
||||
|
||||
ObjDesc = Entry->Object;
|
||||
@ -532,10 +532,10 @@ AcpiNsDetachObject (
|
||||
/* Clear the entry in all cases */
|
||||
|
||||
Entry->Object = NULL;
|
||||
|
||||
|
||||
/* Found a valid value */
|
||||
|
||||
DEBUG_PRINT (ACPI_INFO, ("NsDetachObject: Object=%p Value=%p Name %4.4s\n",
|
||||
DEBUG_PRINT (ACPI_INFO, ("NsDetachObject: Object=%p Value=%p Name %4.4s\n",
|
||||
Entry, ObjDesc, &Entry->Name));
|
||||
|
||||
/* Not every value is an object allocated via AcpiCmCallocate, must check */
|
||||
@ -581,7 +581,7 @@ AcpiNsGetAttachedObject (
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AcpiNsCompareObject
|
||||
*
|
||||
* PARAMETERS: ObjHandle - A namespace entry
|
||||
@ -598,8 +598,8 @@ AcpiNsGetAttachedObject (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsCompareObject (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *ObjDesc,
|
||||
void **ReturnValue)
|
||||
{
|
||||
@ -641,8 +641,8 @@ AcpiNsCompareObject (
|
||||
|
||||
ACPI_HANDLE
|
||||
AcpiNsFindAttachedObject (
|
||||
ACPI_OBJECT_INTERNAL *ObjDesc,
|
||||
ACPI_HANDLE StartHandle,
|
||||
ACPI_OBJECT_INTERNAL *ObjDesc,
|
||||
ACPI_HANDLE StartHandle,
|
||||
INT32 MaxDepth)
|
||||
{
|
||||
ACPI_HANDLE RetObject;
|
||||
@ -666,7 +666,7 @@ AcpiNsFindAttachedObject (
|
||||
|
||||
if (!Acpi_GblRootObject->Scope)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* there surely are no matching values.
|
||||
*/
|
||||
@ -677,10 +677,10 @@ AcpiNsFindAttachedObject (
|
||||
{
|
||||
StartHandle = Acpi_GblRootObject;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If base is not the root and has no children,
|
||||
* there is nothing to search.
|
||||
*/
|
||||
@ -688,12 +688,12 @@ AcpiNsFindAttachedObject (
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Walk namespace until a match is found.
|
||||
* Either the matching object is returned, or NULL in case
|
||||
* of no match.
|
||||
*/
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartHandle, MaxDepth, NS_WALK_NO_UNLOCK, AcpiNsCompareObject,
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartHandle, MaxDepth, NS_WALK_NO_UNLOCK, AcpiNsCompareObject,
|
||||
ObjDesc, &RetObject);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nssearch - Namespace search
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -149,10 +149,10 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsSearchOneScope (
|
||||
UINT32 EntryName,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY **RetEntry,
|
||||
UINT32 EntryName,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY **RetEntry,
|
||||
NS_SEARCH_DATA *RetInfo)
|
||||
{
|
||||
UINT32 Position;
|
||||
@ -174,11 +174,11 @@ AcpiNsSearchOneScope (
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Name tables are built (and subsequently dumped) in the
|
||||
* order in which the names are encountered during the namespace load;
|
||||
*
|
||||
* All namespace searching will be linear; If a table overflows an
|
||||
* All namespace searching will be linear; If a table overflows an
|
||||
* additional segment will be allocated and added (chained).
|
||||
*
|
||||
* Start linear search at top of table
|
||||
@ -193,7 +193,7 @@ AcpiNsSearchOneScope (
|
||||
RetInfo->NameTable = NameTable;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Search for name in table, starting at Position. Stop searching upon
|
||||
* finding an unused entry or after examining all entries in the table.
|
||||
*
|
||||
@ -208,40 +208,40 @@ AcpiNsSearchOneScope (
|
||||
|
||||
if (NameTable[Position].Name == EntryName)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Found matching entry. Capture type if appropriate before
|
||||
* returning the entry.
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* The DefFieldDefn and BankFieldDefn cases are actually
|
||||
* looking up the Region in which the field will be defined
|
||||
*/
|
||||
|
||||
if ((INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
if ((INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
(INTERNAL_TYPE_BANK_FIELD_DEFN == Type))
|
||||
{
|
||||
Type = ACPI_TYPE_REGION;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Scope, DefAny, and IndexFieldDefn are bogus "types" which do
|
||||
* not actually have anything to do with the type of the name
|
||||
* being looked up. For any other value of Type, if the type
|
||||
* stored in the entry is Any (i.e. unknown), save the actual type.
|
||||
*/
|
||||
|
||||
if (Type != INTERNAL_TYPE_SCOPE &&
|
||||
if (Type != INTERNAL_TYPE_SCOPE &&
|
||||
Type != INTERNAL_TYPE_DEF_ANY &&
|
||||
Type != INTERNAL_TYPE_INDEX_FIELD_DEFN &&
|
||||
Type != INTERNAL_TYPE_INDEX_FIELD_DEFN &&
|
||||
NameTable[Position].Type == ACPI_TYPE_ANY)
|
||||
{
|
||||
NameTable[Position].Type = (UINT8) Type;
|
||||
}
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchOneScope: Name %4.4s (actual type 0x%X) found at %p\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchOneScope: Name %4.4s (actual type 0x%X) found at %p\n",
|
||||
&EntryName, NameTable[Position].Type, &NameTable[Position]));
|
||||
|
||||
|
||||
*RetEntry = &NameTable[Position];
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
@ -252,14 +252,14 @@ AcpiNsSearchOneScope (
|
||||
|
||||
RetInfo->PreviousEntry = &NameTable[Position];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Done with this table? */
|
||||
|
||||
if ((1 == Tries) &&
|
||||
if ((1 == Tries) &&
|
||||
(NEXTSEG (NameTable)))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Just examined last slot, but table has an appendage.
|
||||
* All appendages, even to the root NT, contain NS_DEFAULT_TABLE_SIZE entries.
|
||||
*/
|
||||
@ -269,7 +269,7 @@ AcpiNsSearchOneScope (
|
||||
Position = 0;
|
||||
Tries += NS_TABLE_SIZE;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
++Position;
|
||||
@ -279,7 +279,7 @@ AcpiNsSearchOneScope (
|
||||
|
||||
/* Searched entire table, not found */
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchOneScope: Name %4.4s (type 0x%X) not found at %p\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchOneScope: Name %4.4s (type 0x%X) not found at %p\n",
|
||||
&EntryName, Type, &NameTable[Position]));
|
||||
|
||||
|
||||
@ -298,7 +298,7 @@ AcpiNsSearchOneScope (
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsSearchParentTree
|
||||
* FUNCTION: AcpiNsSearchParentTree
|
||||
*
|
||||
* PARAMETERS: *EntryName - Ascii ACPI name to search for
|
||||
* *NameTable - Starting table where search will begin
|
||||
@ -308,15 +308,15 @@ AcpiNsSearchOneScope (
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Called when a name has not been found in the current namespace
|
||||
* table. Before adding it or giving up, ACPI scope rules require
|
||||
* table. Before adding it or giving up, ACPI scope rules require
|
||||
* searching enclosing scopes in cases identified by AcpiNsLocal().
|
||||
*
|
||||
* "A name is located by finding the matching name in the current
|
||||
* name space, and then in the parent name space. If the parent
|
||||
* name space does not contain the name, the search continues
|
||||
* recursively until either the name is found or the name space
|
||||
* does not have a parent (the root of the name space). This
|
||||
* indicates that the name is not found" (From ACPI Specification,
|
||||
* "A name is located by finding the matching name in the current
|
||||
* name space, and then in the parent name space. If the parent
|
||||
* name space does not contain the name, the search continues
|
||||
* recursively until either the name is found or the name space
|
||||
* does not have a parent (the root of the name space). This
|
||||
* indicates that the name is not found" (From ACPI Specification,
|
||||
* section 5.3)
|
||||
*
|
||||
***************************************************************************/
|
||||
@ -324,9 +324,9 @@ AcpiNsSearchOneScope (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsSearchParentTree (
|
||||
UINT32 EntryName,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
UINT32 EntryName,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY **RetEntry)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
@ -336,18 +336,18 @@ AcpiNsSearchParentTree (
|
||||
FUNCTION_TRACE ("NsSearchParentTree");
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* NameTable[0] will be an unused entry if the table being searched is empty,
|
||||
* However, its ParentEntry member will have been filled in
|
||||
* when the table was allocated (unless it is the root name table).
|
||||
*/
|
||||
|
||||
|
||||
if (!AcpiNsLocal (Type) &&
|
||||
|
||||
if (!AcpiNsLocal (Type) &&
|
||||
NameTable[0].ParentEntry)
|
||||
{
|
||||
ParentEntry = NameTable[0].ParentEntry;
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: Searching parent for %4.4s\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: Searching parent for %4.4s\n",
|
||||
&EntryName));
|
||||
|
||||
/* Search parents until found or we have backed up to the root */
|
||||
@ -370,7 +370,7 @@ AcpiNsSearchParentTree (
|
||||
|
||||
/* Not found in parent tree */
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
@ -379,13 +379,13 @@ AcpiNsSearchParentTree (
|
||||
|
||||
if (!NameTable[0].ParentEntry)
|
||||
{
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: [%4.4s] has no parent\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: [%4.4s] has no parent\n",
|
||||
&EntryName));
|
||||
}
|
||||
|
||||
else if (AcpiNsLocal (Type))
|
||||
{
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: [%4.4s] (type 0x%X) is local (no search)\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchParentTree: [%4.4s] (type 0x%X) is local (no search)\n",
|
||||
&EntryName, Type));
|
||||
}
|
||||
}
|
||||
@ -406,7 +406,7 @@ AcpiNsSearchParentTree (
|
||||
* DESCRIPTION: Allocate a new namespace table, initialize it, and link it
|
||||
* into the parent table.
|
||||
*
|
||||
* NOTE: We are in the first or second pass load mode, want to
|
||||
* NOTE: We are in the first or second pass load mode, want to
|
||||
* add a new table entry, and the current table is full.
|
||||
*
|
||||
***************************************************************************/
|
||||
@ -436,7 +436,7 @@ AcpiNsCreateAndLinkNewTable (
|
||||
|
||||
|
||||
/*
|
||||
* We can use the parent entries from the start of the current table
|
||||
* We can use the parent entries from the start of the current table
|
||||
* Since the parent information remains the same.
|
||||
*/
|
||||
|
||||
@ -444,7 +444,7 @@ AcpiNsCreateAndLinkNewTable (
|
||||
|
||||
|
||||
/* Allocate and chain an appendage to the filled table */
|
||||
|
||||
|
||||
NewTable = AcpiNsAllocateNameTable (NS_TABLE_SIZE);
|
||||
if (!NewTable)
|
||||
{
|
||||
@ -454,13 +454,13 @@ AcpiNsCreateAndLinkNewTable (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Allocation successful. Init the new table.
|
||||
*/
|
||||
NEXTSEG (NameTable) = NewTable;
|
||||
AcpiNsInitializeTable (NewTable, ParentEntry->Scope, ParentEntry);
|
||||
|
||||
DEBUG_PRINT (TRACE_EXEC,
|
||||
DEBUG_PRINT (TRACE_EXEC,
|
||||
("NsCreateAndLinkNewTable: NewTable=%p, ParentEntry=%p, Scope=%p\n",
|
||||
NewTable, ParentEntry, NameTable->Scope));
|
||||
}
|
||||
@ -486,8 +486,8 @@ AcpiNsCreateAndLinkNewTable (
|
||||
|
||||
void
|
||||
AcpiNsInitializeTable (
|
||||
NAME_TABLE_ENTRY *NewTable,
|
||||
NAME_TABLE_ENTRY *ParentScope,
|
||||
NAME_TABLE_ENTRY *NewTable,
|
||||
NAME_TABLE_ENTRY *ParentScope,
|
||||
NAME_TABLE_ENTRY *ParentEntry)
|
||||
{
|
||||
|
||||
@ -519,10 +519,10 @@ AcpiNsInitializeTable (
|
||||
void
|
||||
AcpiNsInitializeEntry (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
UINT32 Position,
|
||||
UINT32 EntryName,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
UINT32 Position,
|
||||
UINT32 EntryName,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY *PreviousEntry)
|
||||
{
|
||||
NAME_TABLE_ENTRY *NewEntry;
|
||||
@ -532,9 +532,9 @@ AcpiNsInitializeEntry (
|
||||
FUNCTION_TRACE ("NsInitializeEntry");
|
||||
|
||||
|
||||
/*
|
||||
* Get the owner ID from the Walk state
|
||||
* The owner ID is used to track table deletion and deletion of objects created by methods
|
||||
/*
|
||||
* Get the owner ID from the Walk state
|
||||
* The owner ID is used to track table deletion and deletion of objects created by methods
|
||||
*/
|
||||
if (WalkState)
|
||||
{
|
||||
@ -553,7 +553,7 @@ AcpiNsInitializeEntry (
|
||||
NewEntry->OwnerId = OwnerId;
|
||||
NewEntry->ReferenceCount = 1;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Set forward and back links.
|
||||
* Important: These are the links that tie the tables together
|
||||
* so that when walking the links, it is invisible that their
|
||||
@ -567,16 +567,16 @@ AcpiNsInitializeEntry (
|
||||
NewEntry->PrevEntry = PreviousEntry;
|
||||
NewEntry->NextEntry = NULL;
|
||||
|
||||
/*
|
||||
/*
|
||||
* If adding a name with unknown type, or having to add the region in
|
||||
* order to define fields in it, we have a forward reference.
|
||||
*/
|
||||
|
||||
if ((ACPI_TYPE_ANY == Type) ||
|
||||
(INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
if ((ACPI_TYPE_ANY == Type) ||
|
||||
(INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
(INTERNAL_TYPE_BANK_FIELD_DEFN == Type))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* We don't want to abort here, however!
|
||||
* We will fill in the actual type when the real definition
|
||||
* is found later.
|
||||
@ -587,34 +587,34 @@ AcpiNsInitializeEntry (
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* The DefFieldDefn and BankFieldDefn cases are actually
|
||||
* looking up the Region in which the field will be defined
|
||||
*/
|
||||
|
||||
if ((INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
if ((INTERNAL_TYPE_DEF_FIELD_DEFN == Type) ||
|
||||
(INTERNAL_TYPE_BANK_FIELD_DEFN == Type))
|
||||
{
|
||||
Type = ACPI_TYPE_REGION;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Scope, DefAny, and IndexFieldDefn are bogus "types" which do
|
||||
* not actually have anything to do with the type of the name
|
||||
* being looked up. Save any other value of Type as the type of
|
||||
* the entry.
|
||||
*/
|
||||
|
||||
if ((Type != INTERNAL_TYPE_SCOPE) &&
|
||||
(Type != INTERNAL_TYPE_DEF_ANY) &&
|
||||
if ((Type != INTERNAL_TYPE_SCOPE) &&
|
||||
(Type != INTERNAL_TYPE_DEF_ANY) &&
|
||||
(Type != INTERNAL_TYPE_INDEX_FIELD_DEFN))
|
||||
{
|
||||
NewEntry->Type = (UINT8) Type;
|
||||
}
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsInitializeEntry: %4.4s added to %p at %p\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsInitializeEntry: %4.4s added to %p at %p\n",
|
||||
&EntryName, NameTable, NewEntry));
|
||||
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@ -644,11 +644,11 @@ AcpiNsInitializeEntry (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsSearchAndEnter (
|
||||
UINT32 EntryName,
|
||||
UINT32 EntryName,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
NAME_TABLE_ENTRY *NameTable,
|
||||
OPERATING_MODE InterpreterMode,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
OPERATING_MODE InterpreterMode,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
UINT32 Flags,
|
||||
NAME_TABLE_ENTRY **RetEntry)
|
||||
{
|
||||
@ -674,7 +674,7 @@ AcpiNsSearchAndEnter (
|
||||
|
||||
if (!AcpiCmValidAcpiName (EntryName))
|
||||
{
|
||||
DEBUG_PRINT (ACPI_ERROR, ("NsSearchAndEnter: *** Bad char in name: %08lx *** \n",
|
||||
DEBUG_PRINT (ACPI_ERROR, ("NsSearchAndEnter: *** Bad char in name: %08lx *** \n",
|
||||
EntryName));
|
||||
|
||||
return_ACPI_STATUS (AE_BAD_CHARACTER);
|
||||
@ -695,7 +695,7 @@ AcpiNsSearchAndEnter (
|
||||
|
||||
/*
|
||||
* Not found in the table. If we are NOT performing the first pass (name entry) of
|
||||
* loading the namespace, search the parent tree (all the way to the root if necessary.)
|
||||
* loading the namespace, search the parent tree (all the way to the root if necessary.)
|
||||
* We don't want to perform the parent search when the namespace is actually being loaded.
|
||||
* We want to perform the search when namespace references are being resolved (load pass 2)
|
||||
* and during the execution phase.
|
||||
@ -720,14 +720,14 @@ AcpiNsSearchAndEnter (
|
||||
|
||||
if (InterpreterMode == IMODE_EXECUTE)
|
||||
{
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchAndEnter: %4.4s Not found in %p [Not adding]\n",
|
||||
DEBUG_PRINT (TRACE_NAMES, ("NsSearchAndEnter: %4.4s Not found in %p [Not adding]\n",
|
||||
&EntryName, NameTable));
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Extract the pertinent info from the search result struct.
|
||||
* NameTable and position might now point to an appendage
|
||||
*/
|
||||
@ -735,7 +735,7 @@ AcpiNsSearchAndEnter (
|
||||
Position = SearchInfo.Position;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* This block handles the case where the existing table is full.
|
||||
* we must allocate a new table before we can initialize a new entry
|
||||
*/
|
||||
@ -760,7 +760,7 @@ AcpiNsSearchAndEnter (
|
||||
* Initialize the new entry
|
||||
*/
|
||||
|
||||
AcpiNsInitializeEntry (WalkState, NameTable, Position, EntryName, Type,
|
||||
AcpiNsInitializeEntry (WalkState, NameTable, Position, EntryName, Type,
|
||||
SearchInfo.PreviousEntry);
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsutils - Utilities for accessing ACPI namespace
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -261,7 +261,7 @@ AcpiNsInternalizeName (
|
||||
FUNCTION_TRACE ("NsInternalizeName");
|
||||
|
||||
|
||||
if ((!ExternalName) ||
|
||||
if ((!ExternalName) ||
|
||||
(*ExternalName == 0) ||
|
||||
(!ConvertedName))
|
||||
{
|
||||
@ -269,9 +269,9 @@ AcpiNsInternalizeName (
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* For the internal name, the required length is 4 bytes per segment,
|
||||
* plus 1 each for RootPrefix, MultiNamePrefixOp, segment count, trailing null
|
||||
/*
|
||||
* For the internal name, the required length is 4 bytes per segment,
|
||||
* plus 1 each for RootPrefix, MultiNamePrefixOp, segment count, trailing null
|
||||
* (which is not really needed, but no there's harm in putting it there)
|
||||
*
|
||||
* strlen() + 1 covers the first NameSeg, which has no path separator
|
||||
@ -284,13 +284,13 @@ AcpiNsInternalizeName (
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Determine the number of ACPI name "segments" by counting the number
|
||||
* of path separators within the string. Start with one segment since
|
||||
* the segment count is (# separators) + 1, and zero separators is ok.
|
||||
*/
|
||||
|
||||
NumSegments = 1;
|
||||
NumSegments = 1;
|
||||
for (i = 0; ExternalName[i]; i++)
|
||||
{
|
||||
if (AcpiNsValidPathSeparator (ExternalName[i]))
|
||||
@ -366,7 +366,7 @@ AcpiNsInternalizeName (
|
||||
Result += ACPI_NAME_SIZE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Return the completed name */
|
||||
|
||||
*Result = 0; /* Terminate the string! */
|
||||
@ -375,13 +375,13 @@ AcpiNsInternalizeName (
|
||||
|
||||
if (FullyQualified)
|
||||
{
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsInternalizeName: returning [%p] (abs) \"\\%s\"\n",
|
||||
InternalName, &InternalName[3]));
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsInternalizeName: returning [%p] (abs) \"\\%s\"\n",
|
||||
InternalName, &InternalName[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsInternalizeName: returning [%p] (rel) \"%s\"\n",
|
||||
InternalName, &InternalName[2]));
|
||||
DEBUG_PRINT (TRACE_EXEC,("NsInternalizeName: returning [%p] (rel) \"%s\"\n",
|
||||
InternalName, &InternalName[2]));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
@ -450,7 +450,7 @@ AcpiNsExternalizeName (
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for object names. Note that there could be 0-255 of these
|
||||
* Check for object names. Note that there could be 0-255 of these
|
||||
* 4-byte elements.
|
||||
*/
|
||||
if (PrefixLength < InternalNameLength)
|
||||
@ -491,9 +491,9 @@ AcpiNsExternalizeName (
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Calculate the length of ConvertedName, which equals the length
|
||||
* of the prefix, length of all object names, length of any required
|
||||
* of the prefix, length of all object names, length of any required
|
||||
* punctuation ('.') between object names, plus the NULL terminator.
|
||||
*/
|
||||
*ConvertedNameLength = PrefixLength + (4 * NamesCount) + ((NamesCount > 0) ? (NamesCount - 1) : 0) + 1;
|
||||
@ -501,14 +501,14 @@ AcpiNsExternalizeName (
|
||||
/*
|
||||
* Check to see if we're still in bounds. If not, there's a problem
|
||||
* with InternalName (invalid format).
|
||||
*/
|
||||
*/
|
||||
if (*ConvertedNameLength > InternalNameLength)
|
||||
{
|
||||
REPORT_ERROR ("NsExternalizeName: Invalid internal name.\n");
|
||||
return_ACPI_STATUS (AE_BAD_PATHNAME);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Build ConvertedName...
|
||||
*/
|
||||
|
||||
@ -562,9 +562,9 @@ AcpiNsConvertHandleToEntry (
|
||||
ACPI_HANDLE Handle)
|
||||
{
|
||||
|
||||
/*
|
||||
/*
|
||||
* Simple implementation for now;
|
||||
* TBD: [Future] Real integer handles allow for more verification
|
||||
* TBD: [Future] Real integer handles allow for more verification
|
||||
* and keep all pointers within this subsystem!
|
||||
*/
|
||||
|
||||
@ -607,9 +607,9 @@ AcpiNsConvertEntryToHandle(NAME_TABLE_ENTRY *Nte)
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Simple implementation for now;
|
||||
* TBD: [Future] Real integer handles allow for more verification
|
||||
* TBD: [Future] Real integer handles allow for more verification
|
||||
* and keep all pointers within this subsystem!
|
||||
*/
|
||||
|
||||
@ -617,7 +617,7 @@ AcpiNsConvertEntryToHandle(NAME_TABLE_ENTRY *Nte)
|
||||
|
||||
|
||||
/* ---------------------------------------------------
|
||||
|
||||
|
||||
if (!Nte)
|
||||
{
|
||||
return NULL;
|
||||
@ -683,8 +683,8 @@ AcpiNsTerminate (void)
|
||||
DEBUG_PRINT (ACPI_INFO, ("NsTerminate: Namespace freed\n"));
|
||||
|
||||
|
||||
/*
|
||||
* 2) Now we can delete the ACPI tables
|
||||
/*
|
||||
* 2) Now we can delete the ACPI tables
|
||||
*/
|
||||
|
||||
AcpiTbDeleteAcpiTables ();
|
||||
@ -694,5 +694,5 @@ AcpiNsTerminate (void)
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nswalk - Functions for walking the APCI namespace
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -38,9 +38,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -48,11 +48,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -86,7 +86,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -132,22 +132,22 @@
|
||||
*
|
||||
* PARAMETERS: Type - Type of object to be searched for
|
||||
* Parent - Parent object whose children we are getting
|
||||
* LastChild - Previous child that was found.
|
||||
* LastChild - Previous child that was found.
|
||||
* The NEXT child will be returned
|
||||
* RetHandle - Where handle to the next object is placed
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Return the next peer object within the namespace. If Handle is
|
||||
* valid, Scope is ignored. Otherwise, the first object within
|
||||
* valid, Scope is ignored. Otherwise, the first object within
|
||||
* Scope is returned.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NAME_TABLE_ENTRY *
|
||||
AcpiNsGetNextObject (
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY *Parent,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
NAME_TABLE_ENTRY *Parent,
|
||||
NAME_TABLE_ENTRY *Child)
|
||||
{
|
||||
NAME_TABLE_ENTRY *ThisEntry;
|
||||
@ -217,7 +217,7 @@ AcpiNsGetNextObject (
|
||||
* PARAMETERS: Type - ACPI_OBJECT_TYPE to search for
|
||||
* StartObject - Handle in namespace where search begins
|
||||
* MaxDepth - Depth to which search is to reach
|
||||
* UnlockBeforeCallback- Whether to unlock the NS before invoking the
|
||||
* UnlockBeforeCallback- Whether to unlock the NS before invoking the
|
||||
* callback routine
|
||||
* UserFunction - Called when an object of "Type" is found
|
||||
* Context - Passed to user function
|
||||
@ -233,21 +233,21 @@ AcpiNsGetNextObject (
|
||||
* value is returned to the caller.
|
||||
*
|
||||
* The point of this procedure is to provide a generic namespace
|
||||
* walk routine that can be called from multiple places to
|
||||
* walk routine that can be called from multiple places to
|
||||
* provide multiple services; the User Function can be tailored
|
||||
* to each task, whether it is a print function, a compare
|
||||
* to each task, whether it is a print function, a compare
|
||||
* function, etc.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsWalkNamespace (
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
ACPI_HANDLE StartObject,
|
||||
OBJECT_TYPE_INTERNAL Type,
|
||||
ACPI_HANDLE StartObject,
|
||||
UINT32 MaxDepth,
|
||||
BOOLEAN UnlockBeforeCallback,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
@ -274,9 +274,9 @@ AcpiNsWalkNamespace (
|
||||
ChildType = ACPI_TYPE_ANY;
|
||||
Level = 1;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Traverse the tree of objects until we bubble back up to where we
|
||||
* started. When Level is zero, the loop is done because we have
|
||||
* started. When Level is zero, the loop is done because we have
|
||||
* bubbled up to (and passed) the original parent handle (StartHandle)
|
||||
*/
|
||||
|
||||
@ -328,7 +328,7 @@ AcpiNsWalkNamespace (
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Depth first search:
|
||||
* Attempt to go down another level in the namespace if we are allowed to.
|
||||
* Don't go any further if we have reached the caller specified maximum depth
|
||||
@ -350,8 +350,8 @@ AcpiNsWalkNamespace (
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
* No more children in this object (AcpiNsGetNextObject failed),
|
||||
/*
|
||||
* No more children in this object (AcpiNsGetNextObject failed),
|
||||
* go back upwards in the namespace tree to the object's parent.
|
||||
*/
|
||||
Level--;
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsapinam - Public interfaces to the ACPI subsystem
|
||||
* ACPI Namespace oriented interfaces
|
||||
*
|
||||
@ -39,9 +39,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -49,11 +49,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -87,7 +87,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -175,7 +175,7 @@ AcpiLoadNamespace (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Load the namespace. The DSDT is required,
|
||||
* but the SSDT and PSDT tables are optional.
|
||||
*/
|
||||
@ -192,7 +192,7 @@ AcpiLoadNamespace (
|
||||
AcpiNsLoadTableByType (TABLE_PSDT);
|
||||
|
||||
|
||||
DEBUG_PRINT_RAW (ACPI_OK, ("ACPI Namespace successfully loaded at root 0x%p\n",
|
||||
DEBUG_PRINT_RAW (ACPI_OK, ("ACPI Namespace successfully loaded at root 0x%p\n",
|
||||
Acpi_GblRootObject->Scope));
|
||||
|
||||
|
||||
@ -217,15 +217,15 @@ AcpiLoadNamespace (
|
||||
*
|
||||
* DESCRIPTION: This routine will search for a caller specified name in the
|
||||
* name space. The caller can restrict the search region by
|
||||
* specifying a non NULL parent. The parent value is itself a
|
||||
* namespace handle.
|
||||
* specifying a non NULL parent. The parent value is itself a
|
||||
* namespace handle.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS
|
||||
AcpiGetHandle (
|
||||
ACPI_HANDLE Parent,
|
||||
ACPI_STRING Pathname,
|
||||
ACPI_HANDLE Parent,
|
||||
ACPI_STRING Pathname,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
@ -239,12 +239,12 @@ AcpiGetHandle (
|
||||
}
|
||||
|
||||
if (Parent)
|
||||
{
|
||||
{
|
||||
AcpiCmAcquireMutex (MTX_NAMESPACE);
|
||||
|
||||
|
||||
ThisEntry = AcpiNsConvertHandleToEntry (Parent);
|
||||
if (!ThisEntry)
|
||||
{
|
||||
{
|
||||
AcpiCmReleaseMutex (MTX_NAMESPACE);
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
@ -285,14 +285,14 @@ AcpiGetHandle (
|
||||
* RETURN: Pointer to a string containing the fully qualified Name.
|
||||
*
|
||||
* DESCRIPTION: This routine returns the fully qualified name associated with
|
||||
* the Handle parameter. This and the AcpiPathnameToHandle are
|
||||
* the Handle parameter. This and the AcpiPathnameToHandle are
|
||||
* complementary functions.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS
|
||||
AcpiGetName (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE Handle,
|
||||
UINT32 NameType,
|
||||
ACPI_BUFFER *RetPathPtr)
|
||||
{
|
||||
@ -323,9 +323,9 @@ AcpiGetName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wants the single segment ACPI name.
|
||||
* Validate handle and convert to an NTE
|
||||
/*
|
||||
* Wants the single segment ACPI name.
|
||||
* Validate handle and convert to an NTE
|
||||
*/
|
||||
|
||||
AcpiCmAcquireMutex (MTX_NAMESPACE);
|
||||
@ -375,7 +375,7 @@ UnlockAndExit:
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetObjectInfo (
|
||||
ACPI_HANDLE Device,
|
||||
ACPI_HANDLE Device,
|
||||
ACPI_DEVICE_INFO *Info)
|
||||
{
|
||||
DEVICE_ID Hid;
|
||||
@ -455,9 +455,9 @@ AcpiGetObjectInfo (
|
||||
Info->Valid |= ACPI_VALID_UID;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Execute the _STA method and save the result
|
||||
* _STA is not always present
|
||||
* _STA is not always present
|
||||
*/
|
||||
|
||||
Status = AcpiCmExecute_STA (DeviceEntry, &DeviceStatus);
|
||||
@ -467,7 +467,7 @@ AcpiGetObjectInfo (
|
||||
Info->Valid |= ACPI_VALID_STA;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Execute the _ADR method and save result if successful
|
||||
* _ADR is not always present
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: nsapiobj - Public interfaces to the ACPI subsystem
|
||||
* ACPI Object oriented interfaces
|
||||
*
|
||||
@ -39,9 +39,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -49,11 +49,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -87,7 +87,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -138,7 +138,7 @@
|
||||
* Params itself may be NULL
|
||||
* if no parameters are being
|
||||
* passed.
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* *ReturnObject - Where to put method's return value (if
|
||||
* any). If NULL, no value is returned.
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -151,8 +151,8 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvaluateObject (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_STRING Pathname,
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_STRING Pathname,
|
||||
ACPI_OBJECT_LIST *ParamObjects,
|
||||
ACPI_BUFFER *ReturnBuffer)
|
||||
{
|
||||
@ -171,14 +171,14 @@ AcpiEvaluateObject (
|
||||
FUNCTION_TRACE ("AcpiEvaluateObject");
|
||||
|
||||
|
||||
/*
|
||||
* If there are parameters to be passed to the object (which must be a control method),
|
||||
/*
|
||||
* If there are parameters to be passed to the object (which must be a control method),
|
||||
* the external objects must be converted to internal objects
|
||||
*/
|
||||
|
||||
if (ParamObjects && ParamObjects->Count)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Allocate a new parameter block for the internal objects
|
||||
* Add 1 to count to allow for null terminated internal list
|
||||
* TBD: [Restructure] merge into single allocation!
|
||||
@ -206,7 +206,7 @@ AcpiEvaluateObject (
|
||||
ParamPtr[i] = &ObjectPtr[i];
|
||||
AcpiCmInitStaticObject (&ObjectPtr[i]);
|
||||
}
|
||||
ParamPtr[Count] = NULL;
|
||||
ParamPtr[Count] = NULL;
|
||||
|
||||
/*
|
||||
* Convert each external object in the list to an internal object
|
||||
@ -225,12 +225,12 @@ AcpiEvaluateObject (
|
||||
|
||||
/*
|
||||
* Three major cases:
|
||||
* 1) Fully qualified pathname
|
||||
* 1) Fully qualified pathname
|
||||
* 2) No handle, not fully qualified pathname (error)
|
||||
* 3) Valid handle
|
||||
* 3) Valid handle
|
||||
*/
|
||||
|
||||
if ((Pathname) &&
|
||||
if ((Pathname) &&
|
||||
(AcpiNsValidRootPrefix (Pathname[0])))
|
||||
{
|
||||
/*
|
||||
@ -259,7 +259,7 @@ AcpiEvaluateObject (
|
||||
Status = AE_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
else
|
||||
else
|
||||
{
|
||||
/*
|
||||
* We get here if we have a handle -- and if we have a pathname it is relative.
|
||||
@ -284,9 +284,9 @@ AcpiEvaluateObject (
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* If we are expecting a return value, and all went well above,
|
||||
|
||||
/*
|
||||
* If we are expecting a return value, and all went well above,
|
||||
* copy the return value to an external object.
|
||||
*/
|
||||
|
||||
@ -299,7 +299,7 @@ AcpiEvaluateObject (
|
||||
{
|
||||
if (VALID_DESCRIPTOR_TYPE (ReturnObj, DESC_TYPE_NTE))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* If we got an NTE as a return object, this means the object we are evaluating has nothing
|
||||
* interesting to return (such as a mutex, etc.) We return an error because these types
|
||||
* are essentially unsupported by this interface. We don't check up front because this makes
|
||||
@ -320,7 +320,7 @@ AcpiEvaluateObject (
|
||||
{
|
||||
/* Check if there is enough room in the caller's buffer */
|
||||
|
||||
if (UserBufferLength < BufferSpaceNeeded)
|
||||
if (UserBufferLength < BufferSpaceNeeded)
|
||||
{
|
||||
/*
|
||||
* Caller's buffer is too small, can't give him partial results
|
||||
@ -380,23 +380,23 @@ AcpiEvaluateObject (
|
||||
*
|
||||
* PARAMETERS: Type - Type of object to be searched for
|
||||
* Parent - Parent object whose children we are getting
|
||||
* LastChild - Previous child that was found.
|
||||
* LastChild - Previous child that was found.
|
||||
* The NEXT child will be returned
|
||||
* RetHandle - Where handle to the next object is placed
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Return the next peer object within the namespace. If Handle is
|
||||
* valid, Scope is ignored. Otherwise, the first object within
|
||||
* valid, Scope is ignored. Otherwise, the first object within
|
||||
* Scope is returned.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetNextObject (
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE Parent,
|
||||
ACPI_HANDLE Child,
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE Parent,
|
||||
ACPI_HANDLE Child,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
@ -478,7 +478,7 @@ UnlockAndExit:
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS
|
||||
AcpiGetType (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_OBJECT_TYPE *RetType)
|
||||
@ -536,12 +536,12 @@ AcpiGetType (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetParent (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_HANDLE *RetHandle)
|
||||
{
|
||||
NAME_TABLE_ENTRY *Object;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
|
||||
/* No trace macro, too verbose */
|
||||
|
||||
@ -570,7 +570,7 @@ AcpiGetParent (
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Get the parent entry */
|
||||
|
||||
*RetHandle = AcpiNsConvertEntryToHandle(Object->ParentEntry);
|
||||
@ -611,20 +611,20 @@ UnlockAndExit:
|
||||
* value is returned to the caller.
|
||||
*
|
||||
* The point of this procedure is to provide a generic namespace
|
||||
* walk routine that can be called from multiple places to
|
||||
* walk routine that can be called from multiple places to
|
||||
* provide multiple services; the User Function can be tailored
|
||||
* to each task, whether it is a print function, a compare
|
||||
* to each task, whether it is a print function, a compare
|
||||
* function, etc.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiWalkNamespace (
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE StartObject,
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_HANDLE StartObject,
|
||||
UINT32 MaxDepth,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
@ -636,7 +636,7 @@ AcpiWalkNamespace (
|
||||
/* Parameter validation */
|
||||
|
||||
if ((Type > ACPI_TYPE_MAX) ||
|
||||
(!MaxDepth) ||
|
||||
(!MaxDepth) ||
|
||||
(!UserFunction))
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
@ -649,7 +649,7 @@ AcpiWalkNamespace (
|
||||
*/
|
||||
|
||||
AcpiCmAcquireMutex (MTX_NAMESPACE);
|
||||
Status = AcpiNsWalkNamespace ((OBJECT_TYPE_INTERNAL) Type, StartObject, MaxDepth, NS_WALK_UNLOCK,
|
||||
Status = AcpiNsWalkNamespace ((OBJECT_TYPE_INTERNAL) Type, StartObject, MaxDepth, NS_WALK_UNLOCK,
|
||||
UserFunction, Context, ReturnValue);
|
||||
AcpiCmReleaseMutex (MTX_NAMESPACE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user