aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/nsaccess.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/nsaccess.c')
-rw-r--r--sys/contrib/dev/acpica/nsaccess.c63
1 files changed, 26 insertions, 37 deletions
diff --git a/sys/contrib/dev/acpica/nsaccess.c b/sys/contrib/dev/acpica/nsaccess.c
index bbc5b5a7af94..98a658ac6da3 100644
--- a/sys/contrib/dev/acpica/nsaccess.c
+++ b/sys/contrib/dev/acpica/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 128 $
+ * $Revision: 130 $
*
******************************************************************************/
@@ -177,7 +177,7 @@ AcpiNsRootInitialize (void)
/* Enter the pre-defined names in the name table */
- DEBUG_PRINTP (ACPI_INFO, ("Entering predefined entries into namespace\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Entering predefined entries into namespace\n"));
for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++)
{
@@ -187,8 +187,8 @@ AcpiNsRootInitialize (void)
if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */
{
- DEBUG_PRINTP (ACPI_ERROR,
- ("Could not create predefined name %s, %s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Could not create predefined name %s, %s\n",
InitVal->Name, AcpiFormatException (Status)));
}
@@ -230,23 +230,12 @@ AcpiNsRootInitialize (void)
case ACPI_TYPE_STRING:
- ObjDesc->String.Length = STRLEN (InitVal->Val);
-
/*
- * Allocate a buffer for the string. All
- * String.Pointers must be allocated buffers!
- * (makes deletion simpler)
+ * Build an object around the static string
*/
- ObjDesc->String.Pointer = ACPI_MEM_ALLOCATE (
- (ObjDesc->String.Length + 1));
- if (!ObjDesc->String.Pointer)
- {
- AcpiUtRemoveReference (ObjDesc);
- Status = AE_NO_MEMORY;
- goto UnlockAndExit;
- }
-
- STRCPY (ObjDesc->String.Pointer, InitVal->Val);
+ ObjDesc->String.Length = STRLEN (InitVal->Val);
+ ObjDesc->String.Pointer = InitVal->Val;
+ ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
break;
@@ -387,7 +376,7 @@ AcpiNsLookup (
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
- DEBUG_PRINTP (TRACE_NAMES, ("Null scope prefix, using root node (%p)\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Null scope prefix, using root node (%p)\n",
AcpiGbl_RootNode));
PrefixNode = AcpiGbl_RootNode;
@@ -438,8 +427,8 @@ AcpiNsLookup (
NumSegments = 0;
ThisNode = AcpiGbl_RootNode;
- DEBUG_PRINTP (TRACE_NAMES,
- ("Null Pathname (Zero segments), Flags=%x\n", Flags));
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Null Pathname (Zero segments), Flags=%x\n", Flags));
}
else
@@ -473,7 +462,7 @@ AcpiNsLookup (
Pathname++;
- DEBUG_PRINTP (TRACE_NAMES, ("Searching from root [%p]\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching from root [%p]\n",
CurrentNode));
/* Direct reference to root, "\" */
@@ -491,7 +480,7 @@ AcpiNsLookup (
CurrentNode = PrefixNode;
- DEBUG_PRINTP (TRACE_NAMES, ("Searching relative to pfx scope [%p]\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching relative to pfx scope [%p]\n",
PrefixNode));
/*
@@ -535,8 +524,8 @@ AcpiNsLookup (
Pathname++;
- DEBUG_PRINTP (TRACE_NAMES,
- ("Dual Pathname (2 segments, Flags=%X)\n", Flags));
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Dual Pathname (2 segments, Flags=%X)\n", Flags));
}
else if (*Pathname == AML_MULTI_NAME_PREFIX_OP)
@@ -547,8 +536,8 @@ AcpiNsLookup (
Pathname++;
- DEBUG_PRINTP (TRACE_NAMES,
- ("Multi Pathname (%d Segments, Flags=%X) \n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Multi Pathname (%d Segments, Flags=%X) \n",
NumSegments, Flags));
}
@@ -560,8 +549,8 @@ AcpiNsLookup (
*/
NumSegments = 1;
- DEBUG_PRINTP (TRACE_NAMES,
- ("Simple Pathname (1 segment, Flags=%X)\n", Flags));
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Simple Pathname (1 segment, Flags=%X)\n", Flags));
}
#ifdef ACPI_DEBUG
@@ -570,13 +559,13 @@ AcpiNsLookup (
/* Debug only: print the entire name that we are about to lookup */
- DEBUG_PRINTP (TRACE_NAMES, ("["));
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "["));
for (i = 0; i < NumSegments; i++)
{
- DEBUG_PRINT_RAW (TRACE_NAMES, ("%4.4s/", &Pathname[i * 4]));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%4.4s/", &Pathname[i * 4]));
}
- DEBUG_PRINT_RAW (TRACE_NAMES, ("]\n"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "]\n"));
#endif
}
@@ -619,8 +608,8 @@ AcpiNsLookup (
{
/* Name not found in ACPI namespace */
- DEBUG_PRINTP (TRACE_NAMES,
- ("Name [%4.4s] not found in scope %X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Name [%4.4s] not found in scope %X\n",
&SimpleName, CurrentNode));
}
@@ -676,7 +665,7 @@ AcpiNsLookup (
* and the next scope has not been allocated.
*/
- DEBUG_PRINTP (ACPI_INFO, ("Load mode=%X ThisNode=%X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Load mode=%X ThisNode=%X\n",
InterpreterMode, ThisNode));
}
@@ -723,7 +712,7 @@ CheckForNewScopeAndExit:
return_ACPI_STATUS (Status);
}
- DEBUG_PRINTP (ACPI_INFO, ("Set global scope to %p\n", ScopeToPush));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Set global scope to %p\n", ScopeToPush));
}
}