summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c
diff options
context:
space:
mode:
authorMike Gerdts <mike.gerdts@joyent.com>2018-01-18 15:37:09 +0000
committerMike Gerdts <mike.gerdts@joyent.com>2018-02-13 16:56:03 +0000
commited0e03ac24c4a80fc1dca6c059801da8356cd81a (patch)
tree9b520f8bd6948b706dd7363726f44942659fa74c /usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c
parent59e5084aaf2a76c156e349393b383154de8f2e16 (diff)
downloadillumos-joyent-ed0e03ac24c4a80fc1dca6c059801da8356cd81a.tar.gz
OS-6465 add iasl
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approvced by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c')
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c250
1 files changed, 0 insertions, 250 deletions
diff --git a/usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c b/usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c
deleted file mode 100644
index adeb448c42..0000000000
--- a/usr/src/uts/intel/io/acpica/dispatcher/dsdebug.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/******************************************************************************
- *
- * Module Name: dsdebug - Parser/Interpreter interface - debugging
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2016, 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.
- */
-
-#include "acpi.h"
-#include "accommon.h"
-#include "acdispat.h"
-#include "acnamesp.h"
-#include "acdisasm.h"
-#include "acinterp.h"
-
-
-#define _COMPONENT ACPI_DISPATCHER
- ACPI_MODULE_NAME ("dsdebug")
-
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-
-/* Local prototypes */
-
-static void
-AcpiDsPrintNodePathname (
- ACPI_NAMESPACE_NODE *Node,
- const char *Message);
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsPrintNodePathname
- *
- * PARAMETERS: Node - Object
- * Message - Prefix message
- *
- * DESCRIPTION: Print an object's full namespace pathname
- * Manages allocation/freeing of a pathname buffer
- *
- ******************************************************************************/
-
-static void
-AcpiDsPrintNodePathname (
- ACPI_NAMESPACE_NODE *Node,
- const char *Message)
-{
- ACPI_BUFFER Buffer;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (DsPrintNodePathname);
-
- if (!Node)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "[NULL NAME]"));
- return_VOID;
- }
-
- /* Convert handle to full pathname and print it (with supplied message) */
-
- Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-
- Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE);
- if (ACPI_SUCCESS (Status))
- {
- if (Message)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "%s ", Message));
- }
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "[%s] (Node %p)",
- (char *) Buffer.Pointer, Node));
- ACPI_FREE (Buffer.Pointer);
- }
-
- return_VOID;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsDumpMethodStack
- *
- * PARAMETERS: Status - Method execution status
- * WalkState - Current state of the parse tree walk
- * Op - Executing parse op
- *
- * RETURN: None
- *
- * DESCRIPTION: Called when a method has been aborted because of an error.
- * Dumps the method execution stack.
- *
- ******************************************************************************/
-
-void
-AcpiDsDumpMethodStack (
- ACPI_STATUS Status,
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op)
-{
- ACPI_PARSE_OBJECT *Next;
- ACPI_THREAD_STATE *Thread;
- ACPI_WALK_STATE *NextWalkState;
- ACPI_NAMESPACE_NODE *PreviousMethod = NULL;
- ACPI_OPERAND_OBJECT *MethodDesc;
-
-
- ACPI_FUNCTION_TRACE (DsDumpMethodStack);
-
- /* Ignore control codes, they are not errors */
-
- if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
- {
- return_VOID;
- }
-
- /* We may be executing a deferred opcode */
-
- if (WalkState->DeferredNode)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "Executing subtree for Buffer/Package/Region\n"));
- return_VOID;
- }
-
- /*
- * If there is no Thread, we are not actually executing a method.
- * This can happen when the iASL compiler calls the interpreter
- * to perform constant folding.
- */
- Thread = WalkState->Thread;
- if (!Thread)
- {
- return_VOID;
- }
-
- /* Display exception and method name */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "\n**** Exception %s during execution of method ",
- AcpiFormatException (Status)));
-
- AcpiDsPrintNodePathname (WalkState->MethodNode, NULL);
-
- /* Display stack of executing methods */
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH,
- "\n\nMethod Execution Stack:\n"));
- NextWalkState = Thread->WalkStateList;
-
- /* Walk list of linked walk states */
-
- while (NextWalkState)
- {
- MethodDesc = NextWalkState->MethodDesc;
- if (MethodDesc)
- {
- AcpiExStopTraceMethod (
- (ACPI_NAMESPACE_NODE *) MethodDesc->Method.Node,
- MethodDesc, WalkState);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- " Method [%4.4s] executing: ",
- AcpiUtGetNodeName (NextWalkState->MethodNode)));
-
- /* First method is the currently executing method */
-
- if (NextWalkState == WalkState)
- {
- if (Op)
- {
- /* Display currently executing ASL statement */
-
- Next = Op->Common.Next;
- Op->Common.Next = NULL;
-
-#ifdef ACPI_DISASSEMBLER
- AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
-#endif
- Op->Common.Next = Next;
- }
- }
- else
- {
- /*
- * This method has called another method
- * NOTE: the method call parse subtree is already deleted at
- * this point, so we cannot disassemble the method invocation.
- */
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Call to method "));
- AcpiDsPrintNodePathname (PreviousMethod, NULL);
- }
-
- PreviousMethod = NextWalkState->MethodNode;
- NextWalkState = NextWalkState->Next;
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "\n"));
- }
-
- return_VOID;
-}
-
-#else
-
-void
-AcpiDsDumpMethodStack (
- ACPI_STATUS Status,
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op)
-{
- return;
-}
-
-#endif