Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: dbnames - Debugger commands for the acpi namespace * ******************************************************************************/ /* ! * Copyright (C) 2000 - 2011, 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: --- 3,13 ---- * Module Name: dbnames - Debugger commands for the acpi namespace * ******************************************************************************/ /* ! * Copyright (C) 2000 - 2014, 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:
*** 44,53 **** --- 44,54 ---- #include "acpi.h" #include "accommon.h" #include "acnamesp.h" #include "acdebug.h" + #include "acpredef.h" #ifdef ACPI_DEBUGGER #define _COMPONENT ACPI_CA_DEBUGGER
*** 100,110 **** /* * Arguments for the Objects command * These object types map directly to the ACPI_TYPES */ ! static ARGUMENT_INFO AcpiDbObjectTypes [] = { {"ANY"}, {"INTEGERS"}, {"STRINGS"}, {"BUFFERS"}, --- 101,111 ---- /* * Arguments for the Objects command * These object types map directly to the ACPI_TYPES */ ! static ACPI_DB_ARGUMENT_INFO AcpiDbObjectTypes [] = { {"ANY"}, {"INTEGERS"}, {"STRINGS"}, {"BUFFERS"},
*** 157,167 **** return; } AcpiDbPrepNamestring (Name); ! if (Name[0] == '\\') { /* Validate new scope from the root */ Status = AcpiNsGetNode (AcpiGbl_RootNode, Name, ACPI_NS_NO_UPSEARCH, &Node); --- 158,168 ---- return; } AcpiDbPrepNamestring (Name); ! if (ACPI_IS_ROOT_PREFIX (Name[0])) { /* Validate new scope from the root */ Status = AcpiNsGetNode (AcpiGbl_RootNode, Name, ACPI_NS_NO_UPSEARCH, &Node);
*** 168,179 **** if (ACPI_FAILURE (Status)) { goto ErrorExit; } ! ACPI_STRCPY (AcpiGbl_DbScopeBuf, Name); ! ACPI_STRCAT (AcpiGbl_DbScopeBuf, "\\"); } else { /* Validate new scope relative to old scope */ --- 169,179 ---- if (ACPI_FAILURE (Status)) { goto ErrorExit; } ! AcpiGbl_DbScopeBuf[0] = 0; } else { /* Validate new scope relative to old scope */
*** 181,195 **** &Node); if (ACPI_FAILURE (Status)) { goto ErrorExit; } ! ACPI_STRCAT (AcpiGbl_DbScopeBuf, Name); ! ACPI_STRCAT (AcpiGbl_DbScopeBuf, "\\"); } AcpiGbl_DbScopeNode = Node; AcpiOsPrintf ("New scope: %s\n", AcpiGbl_DbScopeBuf); return; ErrorExit: --- 181,208 ---- &Node); if (ACPI_FAILURE (Status)) { goto ErrorExit; } + } ! /* Build the final pathname */ ! ! if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf), ! Name)) ! { ! Status = AE_BUFFER_OVERFLOW; ! goto ErrorExit; } + if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf), + "\\")) + { + Status = AE_BUFFER_OVERFLOW; + goto ErrorExit; + } + AcpiGbl_DbScopeNode = Node; AcpiOsPrintf ("New scope: %s\n", AcpiGbl_DbScopeBuf); return; ErrorExit:
*** 253,262 **** --- 266,306 ---- } /******************************************************************************* * + * FUNCTION: AcpiDbDumpNamespacePaths + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump entire namespace with full object pathnames and object + * type information. Alternative to "namespace" command. + * + ******************************************************************************/ + + void + AcpiDbDumpNamespacePaths ( + void) + { + + AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT); + AcpiOsPrintf ("ACPI Namespace (from root):\n"); + + /* Display the entire namespace */ + + AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT); + AcpiNsDumpObjectPaths (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, + ACPI_UINT32_MAX, ACPI_OWNER_ID_MAX, AcpiGbl_RootNode); + + AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); + } + + + /******************************************************************************* + * * FUNCTION: AcpiDbDumpNamespaceByOwner * * PARAMETERS: OwnerArg - Owner ID whose nodes will be displayed * DepthArg - Maximum tree depth to be dumped *
*** 432,444 **** ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; UINT32 *Count = (UINT32 *) Context; const ACPI_PREDEFINED_INFO *Predefined; const ACPI_PREDEFINED_INFO *Package = NULL; char *Pathname; ! Predefined = AcpiNsCheckForPredefinedName (Node); if (!Predefined) { return (AE_OK); } --- 476,489 ---- ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; UINT32 *Count = (UINT32 *) Context; const ACPI_PREDEFINED_INFO *Predefined; const ACPI_PREDEFINED_INFO *Package = NULL; char *Pathname; + char StringBuffer[48]; ! Predefined = AcpiUtMatchPredefinedMethod (Node->Name.Ascii); if (!Predefined) { return (AE_OK); }
*** 448,478 **** return (AE_OK); } /* If method returns a package, the info is in the next table entry */ ! if (Predefined->Info.ExpectedBtypes & ACPI_BTYPE_PACKAGE) { Package = Predefined + 1; } ! AcpiOsPrintf ("%-32s arg %X ret %2.2X", Pathname, ! Predefined->Info.ParamCount, Predefined->Info.ExpectedBtypes); if (Package) { ! AcpiOsPrintf (" PkgType %2.2X ObjType %2.2X Count %2.2X", Package->RetInfo.Type, Package->RetInfo.ObjectType1, Package->RetInfo.Count1); } AcpiOsPrintf("\n"); ! AcpiNsCheckParameterCount (Pathname, Node, ACPI_UINT32_MAX, Predefined); ACPI_FREE (Pathname); (*Count)++; - return (AE_OK); } /******************************************************************************* --- 493,529 ---- return (AE_OK); } /* If method returns a package, the info is in the next table entry */ ! if (Predefined->Info.ExpectedBtypes & ACPI_RTYPE_PACKAGE) { Package = Predefined + 1; } ! AcpiUtGetExpectedReturnTypes (StringBuffer, ! Predefined->Info.ExpectedBtypes); + AcpiOsPrintf ("%-32s Arguments %X, Return Types: %s", Pathname, + METHOD_GET_ARG_COUNT (Predefined->Info.ArgumentList), + StringBuffer); + if (Package) { ! AcpiOsPrintf (" (PkgType %2.2X, ObjType %2.2X, Count %2.2X)", Package->RetInfo.Type, Package->RetInfo.ObjectType1, Package->RetInfo.Count1); } AcpiOsPrintf("\n"); ! /* Check that the declared argument count matches the ACPI spec */ ! ! AcpiNsCheckAcpiCompliance (Pathname, Node, Predefined); ! ACPI_FREE (Pathname); (*Count)++; return (AE_OK); } /*******************************************************************************
*** 661,671 **** AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n", Node, Node->Type); return (AE_OK); } ! if (!AcpiUtValidAcpiName (Node->Name.Integer)) { AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node); return (AE_OK); } --- 712,722 ---- AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n", Node, Node->Type); return (AE_OK); } ! if (!AcpiUtValidAcpiName (Node->Name.Ascii)) { AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node); return (AE_OK); }
*** 773,787 **** void AcpiDbFindReferences ( char *ObjectArg) { ACPI_OPERAND_OBJECT *ObjDesc; /* Convert string to object pointer */ ! ObjDesc = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16)); /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL); --- 824,840 ---- void AcpiDbFindReferences ( char *ObjectArg) { ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_SIZE Address; /* Convert string to object pointer */ ! Address = ACPI_STRTOUL (ObjectArg, NULL, 16); ! ObjDesc = ACPI_TO_POINTER (Address); /* Search all nodes in namespace */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL);