summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/utilities')
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utbuffer.c220
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utcopy.c23
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utdebug.c167
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utdelete.c13
-rw-r--r--sys/contrib/dev/acpica/components/utilities/uterror.c327
-rw-r--r--sys/contrib/dev/acpica/components/utilities/uteval.c5
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utexcep.c1
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utids.c3
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utmisc.c2
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utobject.c11
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utstring.c18
-rw-r--r--sys/contrib/dev/acpica/components/utilities/uttrack.c8
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utxferror.c317
13 files changed, 593 insertions, 522 deletions
diff --git a/sys/contrib/dev/acpica/components/utilities/utbuffer.c b/sys/contrib/dev/acpica/components/utilities/utbuffer.c
new file mode 100644
index 0000000..508a940
--- /dev/null
+++ b/sys/contrib/dev/acpica/components/utilities/utbuffer.c
@@ -0,0 +1,220 @@
+/******************************************************************************
+ *
+ * Module Name: utbuffer - Buffer dump routines
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2013, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#define __UTBUFFER_C__
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
+#define _COMPONENT ACPI_UTILITIES
+ ACPI_MODULE_NAME ("utbuffer")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtDumpBuffer
+ *
+ * PARAMETERS: Buffer - Buffer to dump
+ * Count - Amount to dump, in bytes
+ * Display - BYTE, WORD, DWORD, or QWORD display:
+ * DB_BYTE_DISPLAY
+ * DB_WORD_DISPLAY
+ * DB_DWORD_DISPLAY
+ * DB_QWORD_DISPLAY
+ * BaseOffset - Beginning buffer offset (display only)
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Generic dump buffer in both hex and ascii.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtDumpBuffer (
+ UINT8 *Buffer,
+ UINT32 Count,
+ UINT32 Display,
+ UINT32 BaseOffset)
+{
+ UINT32 i = 0;
+ UINT32 j;
+ UINT32 Temp32;
+ UINT8 BufChar;
+
+
+ if (!Buffer)
+ {
+ AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
+ return;
+ }
+
+ if ((Count < 4) || (Count & 0x01))
+ {
+ Display = DB_BYTE_DISPLAY;
+ }
+
+ /* Nasty little dump buffer routine! */
+
+ while (i < Count)
+ {
+ /* Print current offset */
+
+ AcpiOsPrintf ("%6.4X: ", (BaseOffset + i));
+
+ /* Print 16 hex chars */
+
+ for (j = 0; j < 16;)
+ {
+ if (i + j >= Count)
+ {
+ /* Dump fill spaces */
+
+ AcpiOsPrintf ("%*s", ((Display * 2) + 1), " ");
+ j += Display;
+ continue;
+ }
+
+ switch (Display)
+ {
+ case DB_BYTE_DISPLAY:
+ default: /* Default is BYTE display */
+
+ AcpiOsPrintf ("%02X ", Buffer[(ACPI_SIZE) i + j]);
+ break;
+
+ case DB_WORD_DISPLAY:
+
+ ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
+ AcpiOsPrintf ("%04X ", Temp32);
+ break;
+
+ case DB_DWORD_DISPLAY:
+
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
+ AcpiOsPrintf ("%08X ", Temp32);
+ break;
+
+ case DB_QWORD_DISPLAY:
+
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
+ AcpiOsPrintf ("%08X", Temp32);
+
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
+ AcpiOsPrintf ("%08X ", Temp32);
+ break;
+ }
+
+ j += Display;
+ }
+
+ /*
+ * Print the ASCII equivalent characters but watch out for the bad
+ * unprintable ones (printable chars are 0x20 through 0x7E)
+ */
+ AcpiOsPrintf (" ");
+ for (j = 0; j < 16; j++)
+ {
+ if (i + j >= Count)
+ {
+ AcpiOsPrintf ("\n");
+ return;
+ }
+
+ BufChar = Buffer[(ACPI_SIZE) i + j];
+ if (ACPI_IS_PRINT (BufChar))
+ {
+ AcpiOsPrintf ("%c", BufChar);
+ }
+ else
+ {
+ AcpiOsPrintf (".");
+ }
+ }
+
+ /* Done with that line. */
+
+ AcpiOsPrintf ("\n");
+ i += 16;
+ }
+
+ return;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtDebugDumpBuffer
+ *
+ * PARAMETERS: Buffer - Buffer to dump
+ * Count - Amount to dump, in bytes
+ * Display - BYTE, WORD, DWORD, or QWORD display:
+ * DB_BYTE_DISPLAY
+ * DB_WORD_DISPLAY
+ * DB_DWORD_DISPLAY
+ * DB_QWORD_DISPLAY
+ * ComponentID - Caller's component ID
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Generic dump buffer in both hex and ascii.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtDebugDumpBuffer (
+ UINT8 *Buffer,
+ UINT32 Count,
+ UINT32 Display,
+ UINT32 ComponentId)
+{
+
+ /* Only dump the buffer if tracing is enabled */
+
+ if (!((ACPI_LV_TABLES & AcpiDbgLevel) &&
+ (ComponentId & AcpiDbgLayer)))
+ {
+ return;
+ }
+
+ AcpiUtDumpBuffer (Buffer, Count, Display, 0);
+}
diff --git a/sys/contrib/dev/acpica/components/utilities/utcopy.c b/sys/contrib/dev/acpica/components/utilities/utcopy.c
index 696acf0..dacbc5c 100644
--- a/sys/contrib/dev/acpica/components/utilities/utcopy.c
+++ b/sys/contrib/dev/acpica/components/utilities/utcopy.c
@@ -172,7 +172,6 @@ AcpiUtCopyIsimpleToEsimple (
(ACPI_SIZE) InternalObject->String.Length + 1);
break;
-
case ACPI_TYPE_BUFFER:
ExternalObject->Buffer.Pointer = DataSpace;
@@ -185,13 +184,11 @@ AcpiUtCopyIsimpleToEsimple (
InternalObject->Buffer.Length);
break;
-
case ACPI_TYPE_INTEGER:
ExternalObject->Integer.Value = InternalObject->Integer.Value;
break;
-
case ACPI_TYPE_LOCAL_REFERENCE:
/* This is an object reference. */
@@ -199,7 +196,6 @@ AcpiUtCopyIsimpleToEsimple (
switch (InternalObject->Reference.Class)
{
case ACPI_REFCLASS_NAME:
-
/*
* For namepath, return the object handle ("reference")
* We are referring to the namespace node
@@ -218,7 +214,6 @@ AcpiUtCopyIsimpleToEsimple (
}
break;
-
case ACPI_TYPE_PROCESSOR:
ExternalObject->Processor.ProcId =
@@ -229,7 +224,6 @@ AcpiUtCopyIsimpleToEsimple (
InternalObject->Processor.Length;
break;
-
case ACPI_TYPE_POWER:
ExternalObject->PowerResource.SystemLevel =
@@ -239,7 +233,6 @@ AcpiUtCopyIsimpleToEsimple (
InternalObject->PowerResource.ResourceOrder;
break;
-
default:
/*
* There is no corresponding external object type
@@ -291,7 +284,6 @@ AcpiUtCopyIelementToEelement (
switch (ObjectType)
{
case ACPI_COPY_TYPE_SIMPLE:
-
/*
* This is a simple or null object
*/
@@ -303,9 +295,7 @@ AcpiUtCopyIelementToEelement (
}
break;
-
case ACPI_COPY_TYPE_PACKAGE:
-
/*
* Build the package object
*/
@@ -328,8 +318,8 @@ AcpiUtCopyIelementToEelement (
sizeof (ACPI_OBJECT));
break;
-
default:
+
return (AE_BAD_PARAMETER);
}
@@ -514,6 +504,7 @@ AcpiUtCopyEsimpleToIsimple (
return_ACPI_STATUS (AE_OK);
default:
+
/* All other types are not supported */
ACPI_ERROR ((AE_INFO,
@@ -546,7 +537,6 @@ AcpiUtCopyEsimpleToIsimple (
InternalObject->String.Length = ExternalObject->String.Length;
break;
-
case ACPI_TYPE_BUFFER:
InternalObject->Buffer.Pointer =
@@ -567,7 +557,6 @@ AcpiUtCopyEsimpleToIsimple (
InternalObject->Buffer.Flags |= AOPOBJ_DATA_VALID;
break;
-
case ACPI_TYPE_INTEGER:
InternalObject->Integer.Value = ExternalObject->Integer.Value;
@@ -582,7 +571,9 @@ AcpiUtCopyEsimpleToIsimple (
break;
default:
+
/* Other types can't get here */
+
break;
}
@@ -855,7 +846,9 @@ AcpiUtCopySimpleObject (
break;
default:
+
/* Nothing to do for other simple objects */
+
break;
}
@@ -929,9 +922,7 @@ AcpiUtCopyIelementToIelement (
}
break;
-
case ACPI_COPY_TYPE_PACKAGE:
-
/*
* This object is a package - go down another nesting level
* Create and build the package object
@@ -953,8 +944,8 @@ AcpiUtCopyIelementToIelement (
*ThisTargetPtr = TargetObject;
break;
-
default:
+
return (AE_BAD_PARAMETER);
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utdebug.c b/sys/contrib/dev/acpica/components/utilities/utdebug.c
index a299680..1780595 100644
--- a/sys/contrib/dev/acpica/components/utilities/utdebug.c
+++ b/sys/contrib/dev/acpica/components/utilities/utdebug.c
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Module Name: utdebug - Debug print routines
+ * Module Name: utdebug - Debug print/trace routines
*
*****************************************************************************/
@@ -613,168 +613,3 @@ AcpiUtPtrExit (
}
#endif
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtDumpBuffer
- *
- * PARAMETERS: Buffer - Buffer to dump
- * Count - Amount to dump, in bytes
- * Display - BYTE, WORD, DWORD, or QWORD display
- * Offset - Beginning buffer offset (display only)
- *
- * RETURN: None
- *
- * DESCRIPTION: Generic dump buffer in both hex and ascii.
- *
- ******************************************************************************/
-
-void
-AcpiUtDumpBuffer (
- UINT8 *Buffer,
- UINT32 Count,
- UINT32 Display,
- UINT32 BaseOffset)
-{
- UINT32 i = 0;
- UINT32 j;
- UINT32 Temp32;
- UINT8 BufChar;
-
-
- if (!Buffer)
- {
- AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
- return;
- }
-
- if ((Count < 4) || (Count & 0x01))
- {
- Display = DB_BYTE_DISPLAY;
- }
-
- /* Nasty little dump buffer routine! */
-
- while (i < Count)
- {
- /* Print current offset */
-
- AcpiOsPrintf ("%6.4X: ", (BaseOffset + i));
-
- /* Print 16 hex chars */
-
- for (j = 0; j < 16;)
- {
- if (i + j >= Count)
- {
- /* Dump fill spaces */
-
- AcpiOsPrintf ("%*s", ((Display * 2) + 1), " ");
- j += Display;
- continue;
- }
-
- switch (Display)
- {
- case DB_BYTE_DISPLAY:
- default: /* Default is BYTE display */
-
- AcpiOsPrintf ("%02X ", Buffer[(ACPI_SIZE) i + j]);
- break;
-
-
- case DB_WORD_DISPLAY:
-
- ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiOsPrintf ("%04X ", Temp32);
- break;
-
-
- case DB_DWORD_DISPLAY:
-
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiOsPrintf ("%08X ", Temp32);
- break;
-
-
- case DB_QWORD_DISPLAY:
-
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiOsPrintf ("%08X", Temp32);
-
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
- AcpiOsPrintf ("%08X ", Temp32);
- break;
- }
-
- j += Display;
- }
-
- /*
- * Print the ASCII equivalent characters but watch out for the bad
- * unprintable ones (printable chars are 0x20 through 0x7E)
- */
- AcpiOsPrintf (" ");
- for (j = 0; j < 16; j++)
- {
- if (i + j >= Count)
- {
- AcpiOsPrintf ("\n");
- return;
- }
-
- BufChar = Buffer[(ACPI_SIZE) i + j];
- if (ACPI_IS_PRINT (BufChar))
- {
- AcpiOsPrintf ("%c", BufChar);
- }
- else
- {
- AcpiOsPrintf (".");
- }
- }
-
- /* Done with that line. */
-
- AcpiOsPrintf ("\n");
- i += 16;
- }
-
- return;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtDebugDumpBuffer
- *
- * PARAMETERS: Buffer - Buffer to dump
- * Count - Amount to dump, in bytes
- * Display - BYTE, WORD, DWORD, or QWORD display
- * ComponentID - Caller's component ID
- *
- * RETURN: None
- *
- * DESCRIPTION: Generic dump buffer in both hex and ascii.
- *
- ******************************************************************************/
-
-void
-AcpiUtDebugDumpBuffer (
- UINT8 *Buffer,
- UINT32 Count,
- UINT32 Display,
- UINT32 ComponentId)
-{
-
- /* Only dump the buffer if tracing is enabled */
-
- if (!((ACPI_LV_TABLES & AcpiDbgLevel) &&
- (ComponentId & AcpiDbgLayer)))
- {
- return;
- }
-
- AcpiUtDumpBuffer (Buffer, Count, Display, 0);
-}
diff --git a/sys/contrib/dev/acpica/components/utilities/utdelete.c b/sys/contrib/dev/acpica/components/utilities/utdelete.c
index 94684c8..6f1f89b 100644
--- a/sys/contrib/dev/acpica/components/utilities/utdelete.c
+++ b/sys/contrib/dev/acpica/components/utilities/utdelete.c
@@ -118,7 +118,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_BUFFER:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "**** Buffer %p, ptr %p\n",
@@ -134,7 +133,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_PACKAGE:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, " **** Package of count %X\n",
@@ -150,7 +148,6 @@ AcpiUtDeleteInternalObj (
ObjPointer = Object->Package.Elements;
break;
-
/*
* These objects have a possible list of notify handlers.
* Device object also may have a GPE block.
@@ -178,7 +175,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_MUTEX:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -202,7 +198,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_EVENT:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -213,7 +208,6 @@ AcpiUtDeleteInternalObj (
Object->Event.OsSemaphore = NULL;
break;
-
case ACPI_TYPE_METHOD:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -229,7 +223,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_REGION:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -298,7 +291,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_BUFFER_FIELD:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -311,7 +303,6 @@ AcpiUtDeleteInternalObj (
}
break;
-
case ACPI_TYPE_LOCAL_BANK_FIELD:
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -324,8 +315,8 @@ AcpiUtDeleteInternalObj (
}
break;
-
default:
+
break;
}
@@ -557,7 +548,6 @@ AcpiUtUpdateObjectReference (
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
case ACPI_TYPE_THERMAL:
-
/*
* Update the notify objects for these types (if present)
* Two lists, system and device notify handlers.
@@ -668,6 +658,7 @@ AcpiUtUpdateObjectReference (
case ACPI_TYPE_REGION:
default:
+
break; /* No subobjects for all other types */
}
diff --git a/sys/contrib/dev/acpica/components/utilities/uterror.c b/sys/contrib/dev/acpica/components/utilities/uterror.c
new file mode 100644
index 0000000..b7aef18
--- /dev/null
+++ b/sys/contrib/dev/acpica/components/utilities/uterror.c
@@ -0,0 +1,327 @@
+/*******************************************************************************
+ *
+ * Module Name: uterror - Various internal error/warning output functions
+ *
+ ******************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2013, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#define __UTERROR_C__
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
+
+
+#define _COMPONENT ACPI_UTILITIES
+ ACPI_MODULE_NAME ("uterror")
+
+
+/*
+ * This module contains internal error functions that may
+ * be configured out.
+ */
+#if !defined (ACPI_NO_ERROR_MESSAGES)
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtPredefinedWarning
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * Pathname - Full pathname to the node
+ * NodeFlags - From Namespace node for the method/object
+ * Format - Printf format string + additional args
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Warnings for the predefined validation module. Messages are
+ * only emitted the first time a problem with a particular
+ * method/object is detected. This prevents a flood of error
+ * messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiUtPredefinedWarning (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ char *Pathname,
+ UINT8 NodeFlags,
+ const char *Format,
+ ...)
+{
+ va_list ArgList;
+
+
+ /*
+ * Warning messages for this method/object will be disabled after the
+ * first time a validation fails or an object is successfully repaired.
+ */
+ if (NodeFlags & ANOBJ_EVALUATED)
+ {
+ return;
+ }
+
+ AcpiOsPrintf (ACPI_MSG_WARNING "%s: ", Pathname);
+
+ va_start (ArgList, Format);
+ AcpiOsVprintf (Format, ArgList);
+ ACPI_MSG_SUFFIX;
+ va_end (ArgList);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtPredefinedInfo
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * Pathname - Full pathname to the node
+ * NodeFlags - From Namespace node for the method/object
+ * Format - Printf format string + additional args
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Info messages for the predefined validation module. Messages
+ * are only emitted the first time a problem with a particular
+ * method/object is detected. This prevents a flood of
+ * messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiUtPredefinedInfo (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ char *Pathname,
+ UINT8 NodeFlags,
+ const char *Format,
+ ...)
+{
+ va_list ArgList;
+
+
+ /*
+ * Warning messages for this method/object will be disabled after the
+ * first time a validation fails or an object is successfully repaired.
+ */
+ if (NodeFlags & ANOBJ_EVALUATED)
+ {
+ return;
+ }
+
+ AcpiOsPrintf (ACPI_MSG_INFO "%s: ", Pathname);
+
+ va_start (ArgList, Format);
+ AcpiOsVprintf (Format, ArgList);
+ ACPI_MSG_SUFFIX;
+ va_end (ArgList);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtPredefinedBiosError
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * Pathname - Full pathname to the node
+ * NodeFlags - From Namespace node for the method/object
+ * Format - Printf format string + additional args
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: BIOS error message for predefined names. Messages
+ * are only emitted the first time a problem with a particular
+ * method/object is detected. This prevents a flood of
+ * messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiUtPredefinedBiosError (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ char *Pathname,
+ UINT8 NodeFlags,
+ const char *Format,
+ ...)
+{
+ va_list ArgList;
+
+
+ /*
+ * Warning messages for this method/object will be disabled after the
+ * first time a validation fails or an object is successfully repaired.
+ */
+ if (NodeFlags & ANOBJ_EVALUATED)
+ {
+ return;
+ }
+
+ AcpiOsPrintf (ACPI_MSG_BIOS_ERROR "%s: ", Pathname);
+
+ va_start (ArgList, Format);
+ AcpiOsVprintf (Format, ArgList);
+ ACPI_MSG_SUFFIX;
+ va_end (ArgList);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtNamespaceError
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * InternalName - Name or path of the namespace node
+ * LookupStatus - Exception code from NS lookup
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print error message with the full pathname for the NS node.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtNamespaceError (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ const char *InternalName,
+ ACPI_STATUS LookupStatus)
+{
+ ACPI_STATUS Status;
+ UINT32 BadName;
+ char *Name = NULL;
+
+
+ ACPI_MSG_REDIRECT_BEGIN;
+ AcpiOsPrintf (ACPI_MSG_ERROR);
+
+ if (LookupStatus == AE_BAD_CHARACTER)
+ {
+ /* There is a non-ascii character in the name */
+
+ ACPI_MOVE_32_TO_32 (&BadName, ACPI_CAST_PTR (UINT32, InternalName));
+ AcpiOsPrintf ("[0x%.8X] (NON-ASCII)", BadName);
+ }
+ else
+ {
+ /* Convert path to external format */
+
+ Status = AcpiNsExternalizeName (ACPI_UINT32_MAX,
+ InternalName, NULL, &Name);
+
+ /* Print target name */
+
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiOsPrintf ("[%s]", Name);
+ }
+ else
+ {
+ AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]");
+ }
+
+ if (Name)
+ {
+ ACPI_FREE (Name);
+ }
+ }
+
+ AcpiOsPrintf (" Namespace lookup failure, %s",
+ AcpiFormatException (LookupStatus));
+
+ ACPI_MSG_SUFFIX;
+ ACPI_MSG_REDIRECT_END;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtMethodError
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * Message - Error message to use on failure
+ * PrefixNode - Prefix relative to the path
+ * Path - Path to the node (optional)
+ * MethodStatus - Execution status
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print error message with the full pathname for the method.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtMethodError (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ const char *Message,
+ ACPI_NAMESPACE_NODE *PrefixNode,
+ const char *Path,
+ ACPI_STATUS MethodStatus)
+{
+ ACPI_STATUS Status;
+ ACPI_NAMESPACE_NODE *Node = PrefixNode;
+
+
+ ACPI_MSG_REDIRECT_BEGIN;
+ AcpiOsPrintf (ACPI_MSG_ERROR);
+
+ if (Path)
+ {
+ Status = AcpiNsGetNode (PrefixNode, Path, ACPI_NS_NO_UPSEARCH,
+ &Node);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("[Could not get node by pathname]");
+ }
+ }
+
+ AcpiNsPrintNodePathname (Node, Message);
+ AcpiOsPrintf (", %s", AcpiFormatException (MethodStatus));
+
+ ACPI_MSG_SUFFIX;
+ ACPI_MSG_REDIRECT_END;
+}
+
+#endif /* ACPI_NO_ERROR_MESSAGES */
diff --git a/sys/contrib/dev/acpica/components/utilities/uteval.c b/sys/contrib/dev/acpica/components/utilities/uteval.c
index dfe2efa..d19210f 100644
--- a/sys/contrib/dev/acpica/components/utilities/uteval.c
+++ b/sys/contrib/dev/acpica/components/utilities/uteval.c
@@ -136,22 +136,27 @@ AcpiUtEvaluateObject (
switch ((Info->ReturnObject)->Common.Type)
{
case ACPI_TYPE_INTEGER:
+
ReturnBtype = ACPI_BTYPE_INTEGER;
break;
case ACPI_TYPE_BUFFER:
+
ReturnBtype = ACPI_BTYPE_BUFFER;
break;
case ACPI_TYPE_STRING:
+
ReturnBtype = ACPI_BTYPE_STRING;
break;
case ACPI_TYPE_PACKAGE:
+
ReturnBtype = ACPI_BTYPE_PACKAGE;
break;
default:
+
ReturnBtype = 0;
break;
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utexcep.c b/sys/contrib/dev/acpica/components/utilities/utexcep.c
index 84df77d..d69dbf0 100644
--- a/sys/contrib/dev/acpica/components/utilities/utexcep.c
+++ b/sys/contrib/dev/acpica/components/utilities/utexcep.c
@@ -167,6 +167,7 @@ AcpiUtValidateException (
break;
default:
+
break;
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utids.c b/sys/contrib/dev/acpica/components/utilities/utids.c
index c73c8ed..b001767 100644
--- a/sys/contrib/dev/acpica/components/utilities/utids.c
+++ b/sys/contrib/dev/acpica/components/utilities/utids.c
@@ -375,14 +375,17 @@ AcpiUtExecute_CID (
switch (CidObjects[i]->Common.Type)
{
case ACPI_TYPE_INTEGER:
+
StringAreaSize += ACPI_EISAID_STRING_SIZE;
break;
case ACPI_TYPE_STRING:
+
StringAreaSize += CidObjects[i]->String.Length + 1;
break;
default:
+
Status = AE_TYPE;
goto Cleanup;
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utmisc.c b/sys/contrib/dev/acpica/components/utilities/utmisc.c
index 7d013fc..6ff6b2a 100644
--- a/sys/contrib/dev/acpica/components/utilities/utmisc.c
+++ b/sys/contrib/dev/acpica/components/utilities/utmisc.c
@@ -429,10 +429,12 @@ AcpiUtDisplayInitPathname (
switch (Type)
{
case ACPI_TYPE_METHOD:
+
AcpiOsPrintf ("Executing ");
break;
default:
+
AcpiOsPrintf ("Initializing ");
break;
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utobject.c b/sys/contrib/dev/acpica/components/utilities/utobject.c
index daa8e40..46c3514 100644
--- a/sys/contrib/dev/acpica/components/utilities/utobject.c
+++ b/sys/contrib/dev/acpica/components/utilities/utobject.c
@@ -140,6 +140,7 @@ AcpiUtCreateInternalObjectDbg (
break;
default:
+
/* All others have no secondary object */
break;
}
@@ -397,6 +398,7 @@ AcpiUtValidInternalObject (
return (TRUE);
default:
+
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"%p is not not an ACPI operand obj [%s]\n",
Object, AcpiUtGetDescriptorName (Object)));
@@ -556,13 +558,11 @@ AcpiUtGetSimpleObjectSize (
Length += (ACPI_SIZE) InternalObject->String.Length + 1;
break;
-
case ACPI_TYPE_BUFFER:
Length += (ACPI_SIZE) InternalObject->Buffer.Length;
break;
-
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
@@ -571,13 +571,11 @@ AcpiUtGetSimpleObjectSize (
break;
-
case ACPI_TYPE_LOCAL_REFERENCE:
switch (InternalObject->Reference.Class)
{
case ACPI_REFCLASS_NAME:
-
/*
* Get the actual length of the full pathname to this object.
* The reference will be converted to the pathname to the object
@@ -592,7 +590,6 @@ AcpiUtGetSimpleObjectSize (
break;
default:
-
/*
* No other reference opcodes are supported.
* Notably, Locals and Args are not supported, but this may be
@@ -607,7 +604,6 @@ AcpiUtGetSimpleObjectSize (
}
break;
-
default:
ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
@@ -656,7 +652,6 @@ AcpiUtGetElementLength (
switch (ObjectType)
{
case ACPI_COPY_TYPE_SIMPLE:
-
/*
* Simple object - just get the size (Null object/entry is handled
* here also) and sum it into the running package length
@@ -670,7 +665,6 @@ AcpiUtGetElementLength (
Info->Length += ObjectSpace;
break;
-
case ACPI_COPY_TYPE_PACKAGE:
/* Package object - nothing much to do here, let the walk handle it */
@@ -679,7 +673,6 @@ AcpiUtGetElementLength (
State->Pkg.ThisTargetObj = NULL;
break;
-
default:
/* No other types allowed */
diff --git a/sys/contrib/dev/acpica/components/utilities/utstring.c b/sys/contrib/dev/acpica/components/utilities/utstring.c
index 49a47fe..4b1545e 100644
--- a/sys/contrib/dev/acpica/components/utilities/utstring.c
+++ b/sys/contrib/dev/acpica/components/utilities/utstring.c
@@ -220,10 +220,13 @@ AcpiUtStrtoul64 (
{
case ACPI_ANY_BASE:
case 16:
+
break;
default:
+
/* Invalid Base */
+
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -423,36 +426,44 @@ AcpiUtPrintString (
switch (String[i])
{
case 0x07:
+
AcpiOsPrintf ("\\a"); /* BELL */
break;
case 0x08:
+
AcpiOsPrintf ("\\b"); /* BACKSPACE */
break;
case 0x0C:
+
AcpiOsPrintf ("\\f"); /* FORMFEED */
break;
case 0x0A:
+
AcpiOsPrintf ("\\n"); /* LINEFEED */
break;
case 0x0D:
+
AcpiOsPrintf ("\\r"); /* CARRIAGE RETURN*/
break;
case 0x09:
+
AcpiOsPrintf ("\\t"); /* HORIZONTAL TAB */
break;
case 0x0B:
+
AcpiOsPrintf ("\\v"); /* VERTICAL TAB */
break;
case '\'': /* Single Quote */
case '\"': /* Double Quote */
case '\\': /* Backslash */
+
AcpiOsPrintf ("\\%c", (int) String[i]);
break;
@@ -530,7 +541,8 @@ AcpiUtValidAcpiChar (
*
* FUNCTION: AcpiUtValidAcpiName
*
- * PARAMETERS: Name - The name to be examined
+ * PARAMETERS: Name - The name to be examined. Does not have to
+ * be NULL terminated string.
*
* RETURN: TRUE if the name is valid, FALSE otherwise
*
@@ -543,7 +555,7 @@ AcpiUtValidAcpiChar (
BOOLEAN
AcpiUtValidAcpiName (
- UINT32 Name)
+ char *Name)
{
UINT32 i;
@@ -553,7 +565,7 @@ AcpiUtValidAcpiName (
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
- if (!AcpiUtValidAcpiChar ((ACPI_CAST_PTR (char, &Name))[i], i))
+ if (!AcpiUtValidAcpiChar (Name[i], i))
{
return (FALSE);
}
diff --git a/sys/contrib/dev/acpica/components/utilities/uttrack.c b/sys/contrib/dev/acpica/components/utilities/uttrack.c
index c829fb0..5c381f0 100644
--- a/sys/contrib/dev/acpica/components/utilities/uttrack.c
+++ b/sys/contrib/dev/acpica/components/utilities/uttrack.c
@@ -675,6 +675,7 @@ AcpiUtDumpAllocations (
switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
{
case ACPI_DESC_TYPE_OPERAND:
+
if (Element->Size == sizeof (ACPI_OPERAND_OBJECT))
{
DescriptorType = ACPI_DESC_TYPE_OPERAND;
@@ -682,6 +683,7 @@ AcpiUtDumpAllocations (
break;
case ACPI_DESC_TYPE_PARSER:
+
if (Element->Size == sizeof (ACPI_PARSE_OBJECT))
{
DescriptorType = ACPI_DESC_TYPE_PARSER;
@@ -689,6 +691,7 @@ AcpiUtDumpAllocations (
break;
case ACPI_DESC_TYPE_NAMED:
+
if (Element->Size == sizeof (ACPI_NAMESPACE_NODE))
{
DescriptorType = ACPI_DESC_TYPE_NAMED;
@@ -696,6 +699,7 @@ AcpiUtDumpAllocations (
break;
default:
+
break;
}
@@ -704,22 +708,26 @@ AcpiUtDumpAllocations (
switch (DescriptorType)
{
case ACPI_DESC_TYPE_OPERAND:
+
AcpiOsPrintf ("%12.12s RefCount 0x%04X\n",
AcpiUtGetTypeName (Descriptor->Object.Common.Type),
Descriptor->Object.Common.ReferenceCount);
break;
case ACPI_DESC_TYPE_PARSER:
+
AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
Descriptor->Op.Asl.AmlOpcode);
break;
case ACPI_DESC_TYPE_NAMED:
+
AcpiOsPrintf ("%4.4s\n",
AcpiUtGetNodeName (&Descriptor->Node));
break;
default:
+
AcpiOsPrintf ( "\n");
break;
}
diff --git a/sys/contrib/dev/acpica/components/utilities/utxferror.c b/sys/contrib/dev/acpica/components/utilities/utxferror.c
index e27d47b..8f11b29 100644
--- a/sys/contrib/dev/acpica/components/utilities/utxferror.c
+++ b/sys/contrib/dev/acpica/components/utilities/utxferror.c
@@ -45,7 +45,6 @@
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
-#include <contrib/dev/acpica/include/acnamesp.h>
#define _COMPONENT ACPI_UTILITIES
@@ -54,48 +53,7 @@
/*
* This module is used for the in-kernel ACPICA as well as the ACPICA
* tools/applications.
- *
- * For the iASL compiler case, the output is redirected to stderr so that
- * any of the various ACPI errors and warnings do not appear in the output
- * files, for either the compiler or disassembler portions of the tool.
- */
-#ifdef ACPI_ASL_COMPILER
-#include <stdio.h>
-
-extern FILE *AcpiGbl_OutputFile;
-
-#define ACPI_MSG_REDIRECT_BEGIN \
- FILE *OutputFile = AcpiGbl_OutputFile; \
- AcpiOsRedirectOutput (stderr);
-
-#define ACPI_MSG_REDIRECT_END \
- AcpiOsRedirectOutput (OutputFile);
-
-#else
-/*
- * non-iASL case - no redirection, nothing to do
- */
-#define ACPI_MSG_REDIRECT_BEGIN
-#define ACPI_MSG_REDIRECT_END
-#endif
-
-/*
- * Common message prefixes
- */
-#define ACPI_MSG_ERROR "ACPI Error: "
-#define ACPI_MSG_EXCEPTION "ACPI Exception: "
-#define ACPI_MSG_WARNING "ACPI Warning: "
-#define ACPI_MSG_INFO "ACPI: "
-
-#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
-#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
-
-/*
- * Common message suffix
*/
-#define ACPI_MSG_SUFFIX \
- AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)
-
/*******************************************************************************
*
@@ -336,278 +294,3 @@ AcpiBiosWarning (
}
ACPI_EXPORT_SYMBOL (AcpiBiosWarning)
-
-
-/*
- * The remainder of this module contains internal error functions that may
- * be configured out.
- */
-#if !defined (ACPI_NO_ERROR_MESSAGES) && !defined (ACPI_BIN_APP)
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtPredefinedWarning
- *
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * Pathname - Full pathname to the node
- * NodeFlags - From Namespace node for the method/object
- * Format - Printf format string + additional args
- *
- * RETURN: None
- *
- * DESCRIPTION: Warnings for the predefined validation module. Messages are
- * only emitted the first time a problem with a particular
- * method/object is detected. This prevents a flood of error
- * messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-AcpiUtPredefinedWarning (
- const char *ModuleName,
- UINT32 LineNumber,
- char *Pathname,
- UINT8 NodeFlags,
- const char *Format,
- ...)
-{
- va_list ArgList;
-
-
- /*
- * Warning messages for this method/object will be disabled after the
- * first time a validation fails or an object is successfully repaired.
- */
- if (NodeFlags & ANOBJ_EVALUATED)
- {
- return;
- }
-
- AcpiOsPrintf (ACPI_MSG_WARNING "%s: ", Pathname);
-
- va_start (ArgList, Format);
- AcpiOsVprintf (Format, ArgList);
- ACPI_MSG_SUFFIX;
- va_end (ArgList);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtPredefinedInfo
- *
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * Pathname - Full pathname to the node
- * NodeFlags - From Namespace node for the method/object
- * Format - Printf format string + additional args
- *
- * RETURN: None
- *
- * DESCRIPTION: Info messages for the predefined validation module. Messages
- * are only emitted the first time a problem with a particular
- * method/object is detected. This prevents a flood of
- * messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-AcpiUtPredefinedInfo (
- const char *ModuleName,
- UINT32 LineNumber,
- char *Pathname,
- UINT8 NodeFlags,
- const char *Format,
- ...)
-{
- va_list ArgList;
-
-
- /*
- * Warning messages for this method/object will be disabled after the
- * first time a validation fails or an object is successfully repaired.
- */
- if (NodeFlags & ANOBJ_EVALUATED)
- {
- return;
- }
-
- AcpiOsPrintf (ACPI_MSG_INFO "%s: ", Pathname);
-
- va_start (ArgList, Format);
- AcpiOsVprintf (Format, ArgList);
- ACPI_MSG_SUFFIX;
- va_end (ArgList);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtPredefinedBiosError
- *
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * Pathname - Full pathname to the node
- * NodeFlags - From Namespace node for the method/object
- * Format - Printf format string + additional args
- *
- * RETURN: None
- *
- * DESCRIPTION: BIOS error message for predefined names. Messages
- * are only emitted the first time a problem with a particular
- * method/object is detected. This prevents a flood of
- * messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-AcpiUtPredefinedBiosError (
- const char *ModuleName,
- UINT32 LineNumber,
- char *Pathname,
- UINT8 NodeFlags,
- const char *Format,
- ...)
-{
- va_list ArgList;
-
-
- /*
- * Warning messages for this method/object will be disabled after the
- * first time a validation fails or an object is successfully repaired.
- */
- if (NodeFlags & ANOBJ_EVALUATED)
- {
- return;
- }
-
- AcpiOsPrintf (ACPI_MSG_BIOS_ERROR "%s: ", Pathname);
-
- va_start (ArgList, Format);
- AcpiOsVprintf (Format, ArgList);
- ACPI_MSG_SUFFIX;
- va_end (ArgList);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtNamespaceError
- *
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * InternalName - Name or path of the namespace node
- * LookupStatus - Exception code from NS lookup
- *
- * RETURN: None
- *
- * DESCRIPTION: Print error message with the full pathname for the NS node.
- *
- ******************************************************************************/
-
-void
-AcpiUtNamespaceError (
- const char *ModuleName,
- UINT32 LineNumber,
- const char *InternalName,
- ACPI_STATUS LookupStatus)
-{
- ACPI_STATUS Status;
- UINT32 BadName;
- char *Name = NULL;
-
-
- ACPI_MSG_REDIRECT_BEGIN;
- AcpiOsPrintf (ACPI_MSG_ERROR);
-
- if (LookupStatus == AE_BAD_CHARACTER)
- {
- /* There is a non-ascii character in the name */
-
- ACPI_MOVE_32_TO_32 (&BadName, ACPI_CAST_PTR (UINT32, InternalName));
- AcpiOsPrintf ("[0x%.8X] (NON-ASCII)", BadName);
- }
- else
- {
- /* Convert path to external format */
-
- Status = AcpiNsExternalizeName (ACPI_UINT32_MAX,
- InternalName, NULL, &Name);
-
- /* Print target name */
-
- if (ACPI_SUCCESS (Status))
- {
- AcpiOsPrintf ("[%s]", Name);
- }
- else
- {
- AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]");
- }
-
- if (Name)
- {
- ACPI_FREE (Name);
- }
- }
-
- AcpiOsPrintf (" Namespace lookup failure, %s",
- AcpiFormatException (LookupStatus));
-
- ACPI_MSG_SUFFIX;
- ACPI_MSG_REDIRECT_END;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtMethodError
- *
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * Message - Error message to use on failure
- * PrefixNode - Prefix relative to the path
- * Path - Path to the node (optional)
- * MethodStatus - Execution status
- *
- * RETURN: None
- *
- * DESCRIPTION: Print error message with the full pathname for the method.
- *
- ******************************************************************************/
-
-void
-AcpiUtMethodError (
- const char *ModuleName,
- UINT32 LineNumber,
- const char *Message,
- ACPI_NAMESPACE_NODE *PrefixNode,
- const char *Path,
- ACPI_STATUS MethodStatus)
-{
- ACPI_STATUS Status;
- ACPI_NAMESPACE_NODE *Node = PrefixNode;
-
-
- ACPI_MSG_REDIRECT_BEGIN;
- AcpiOsPrintf (ACPI_MSG_ERROR);
-
- if (Path)
- {
- Status = AcpiNsGetNode (PrefixNode, Path, ACPI_NS_NO_UPSEARCH,
- &Node);
- if (ACPI_FAILURE (Status))
- {
- AcpiOsPrintf ("[Could not get node by pathname]");
- }
- }
-
- AcpiNsPrintNodePathname (Node, Message);
- AcpiOsPrintf (", %s", AcpiFormatException (MethodStatus));
-
- ACPI_MSG_SUFFIX;
- ACPI_MSG_REDIRECT_END;
-}
-
-#endif /* ACPI_NO_ERROR_MESSAGES */
OpenPOWER on IntegriCloud