Prefixed C library macros (MEMSET, etc.) with "ACPI_".

date	2002.02.13.18.54.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:23:12 +00:00
parent 69b3596c48
commit 8d97bd2ac0
2 changed files with 51 additions and 41 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 1.125 $
* $Revision: 1.127 $
*
*****************************************************************************/
@ -125,7 +125,7 @@
#define _COMPONENT ACPI_NAMESPACE
MODULE_NAME ("nsdump")
ACPI_MODULE_NAME ("nsdump")
#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
@ -146,7 +146,7 @@ AcpiNsPrintPathname (
UINT32 NumSegments,
char *Pathname)
{
PROC_NAME ("AcpiNsPrintPathname");
ACPI_FUNCTION_NAME ("AcpiNsPrintPathname");
if (!(AcpiDbgLevel & ACPI_LV_NAMES) || !(AcpiDbgLayer & ACPI_NAMESPACE))
@ -199,7 +199,7 @@ AcpiNsDumpPathname (
ACPI_STATUS Status;
FUNCTION_TRACE ("NsDumpPathname");
ACPI_FUNCTION_TRACE ("NsDumpPathname");
/* Do this only if the requested debug level and component are enabled */
@ -257,7 +257,7 @@ AcpiNsDumpOneObject (
UINT32 DbgLevel;
PROC_NAME ("NsDumpOneObject");
ACPI_FUNCTION_NAME ("NsDumpOneObject");
ThisNode = AcpiNsMapHandleToNode (ObjHandle);
@ -342,7 +342,7 @@ AcpiNsDumpOneObject (
if (!AcpiUtValidAcpiName (ThisNode->Name))
{
REPORT_WARNING (("Invalid ACPI Name %08X\n", ThisNode->Name));
ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n", ThisNode->Name));
}
/*
@ -390,8 +390,8 @@ AcpiNsDumpOneObject (
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" = %8.8X%8.8X\n",
HIDWORD (ObjDesc->Integer.Value),
LODWORD (ObjDesc->Integer.Value));
ACPI_HIDWORD (ObjDesc->Integer.Value),
ACPI_LODWORD (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_PACKAGE:
@ -431,8 +431,8 @@ AcpiNsDumpOneObject (
if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
{
AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n",
HIDWORD(ObjDesc->Region.Address),
LODWORD(ObjDesc->Region.Address),
ACPI_HIDWORD (ObjDesc->Region.Address),
ACPI_LODWORD (ObjDesc->Region.Address),
ObjDesc->Region.Length);
}
else
@ -524,8 +524,8 @@ AcpiNsDumpOneObject (
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" N:%X%X\n", HIDWORD(ObjDesc->Integer.Value),
LODWORD(ObjDesc->Integer.Value));
AcpiOsPrintf (" N:%X%X\n", ACPI_HIDWORD(ObjDesc->Integer.Value),
ACPI_LODWORD(ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
@ -611,7 +611,7 @@ AcpiNsDumpOneObject (
break;
}
DUMP_BUFFER (ObjDesc, BytesToDump);
ACPI_DUMP_BUFFER (ObjDesc, BytesToDump);
/* If value is NOT an internal object, we are done */
@ -697,7 +697,7 @@ AcpiNsDumpObjects (
ACPI_WALK_INFO Info;
FUNCTION_ENTRY ();
ACPI_FUNCTION_ENTRY ();
Info.DebugLevel = ACPI_LV_TABLES;
@ -705,7 +705,7 @@ AcpiNsDumpObjects (
Info.DisplayType = DisplayType;
AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, NS_WALK_NO_UNLOCK, AcpiNsDumpOneObject,
AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, ACPI_NS_WALK_NO_UNLOCK, AcpiNsDumpOneObject,
(void *) &Info, NULL);
}
@ -736,7 +736,7 @@ AcpiNsDumpOneDevice (
UINT32 i;
PROC_NAME ("NsDumpOneDevice");
ACPI_FUNCTION_NAME ("NsDumpOneDevice");
Status = AcpiNsDumpOneObject (ObjHandle, Level, Context, ReturnValue);
@ -750,7 +750,9 @@ AcpiNsDumpOneDevice (
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " HID: %s, ADR: %8.8X%8.8X, Status: %x\n",
Info.HardwareId, HIDWORD(Info.Address), LODWORD(Info.Address), Info.CurrentStatus));
Info.HardwareId,
ACPI_HIDWORD (Info.Address), ACPI_LODWORD (Info.Address),
Info.CurrentStatus));
}
return (Status);
@ -773,7 +775,7 @@ AcpiNsDumpRootDevices (void)
ACPI_HANDLE SysBusHandle;
PROC_NAME ("NsDumpRootDevices");
ACPI_FUNCTION_NAME ("NsDumpRootDevices");
/* Only dump the table if tracing is enabled */
@ -783,10 +785,10 @@ AcpiNsDumpRootDevices (void)
return;
}
AcpiGetHandle (0, NS_SYSTEM_BUS, &SysBusHandle);
AcpiGetHandle (0, ACPI_NS_SYSTEM_BUS, &SysBusHandle);
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Display of all devices in the namespace:\n"));
AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle, ACPI_UINT32_MAX, NS_WALK_NO_UNLOCK,
AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, SysBusHandle, ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
AcpiNsDumpOneDevice, NULL, NULL);
}
@ -813,7 +815,7 @@ AcpiNsDumpTables (
ACPI_HANDLE SearchHandle = SearchBase;
FUNCTION_TRACE ("NsDumpTables");
ACPI_FUNCTION_TRACE ("NsDumpTables");
if (!AcpiGbl_RootNode)
@ -826,7 +828,7 @@ AcpiNsDumpTables (
return_VOID;
}
if (NS_ALL == SearchBase)
if (ACPI_NS_ALL == SearchBase)
{
/* entire namespace */
@ -860,7 +862,7 @@ AcpiNsDumpEntry (
ACPI_WALK_INFO Info;
FUNCTION_ENTRY ();
ACPI_FUNCTION_ENTRY ();
Info.DebugLevel = DebugLevel;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
* $Revision: 1.32 $
* $Revision: 1.41 $
*
*****************************************************************************/
@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* All rights reserved.
*
* 2. License
@ -123,7 +123,7 @@
#include "acinterp.h"
#define _COMPONENT ACPI_NAMESPACE
MODULE_NAME ("nsinit")
ACPI_MODULE_NAME ("nsinit")
/*******************************************************************************
@ -147,7 +147,7 @@ AcpiNsInitializeObjects (
ACPI_INIT_WALK_INFO Info;
FUNCTION_TRACE ("NsInitializeObjects");
ACPI_FUNCTION_TRACE ("NsInitializeObjects");
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@ -209,7 +209,7 @@ AcpiNsInitializeDevices (
ACPI_DEVICE_WALK_INFO Info;
FUNCTION_TRACE ("NsInitializeDevices");
ACPI_FUNCTION_TRACE ("NsInitializeDevices");
Info.DeviceCount = 0;
@ -263,14 +263,14 @@ AcpiNsInitOneObject (
void *Context,
void **ReturnValue)
{
ACPI_OBJECT_TYPE8 Type;
ACPI_OBJECT_TYPE Type;
ACPI_STATUS Status;
ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ACPI_OPERAND_OBJECT *ObjDesc;
PROC_NAME ("NsInitOneObject");
ACPI_FUNCTION_NAME ("NsInitOneObject");
Info->ObjectCount++;
@ -279,7 +279,7 @@ AcpiNsInitOneObject (
/* And even then, we are only interested in a few object types */
Type = AcpiNsGetType (ObjHandle);
ObjDesc = Node->Object;
ObjDesc = AcpiNsGetAttachedObject (Node);
if (!ObjDesc)
{
return (AE_OK);
@ -319,7 +319,7 @@ AcpiNsInitOneObject (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"%s while getting region arguments [%4.4s]\n",
AcpiFormatException (Status), &Node->Name));
AcpiFormatException (Status), (char *) &Node->Name));
}
if (!(AcpiDbgLevel & ACPI_LV_INIT))
@ -345,7 +345,7 @@ AcpiNsInitOneObject (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"%s while getting buffer field arguments [%4.4s]\n",
AcpiFormatException (Status), &Node->Name));
AcpiFormatException (Status), (char *) &Node->Name));
}
if (!(AcpiDbgLevel & ACPI_LV_INIT))
{
@ -396,7 +396,7 @@ AcpiNsInitOneDevice (
ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context;
FUNCTION_TRACE ("NsInitOneDevice");
ACPI_FUNCTION_TRACE ("NsInitOneDevice");
if (!(AcpiDbgLevel & ACPI_LV_INIT))
@ -406,21 +406,29 @@ AcpiNsInitOneDevice (
Info->DeviceCount++;
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Node = AcpiNsMapHandleToNode (ObjHandle);
if (!Node)
{
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return (AE_BAD_PARAMETER);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
/*
* Run _STA to determine if we can run _INI on the device.
*/
DEBUG_EXEC (AcpiUtDisplayInitPathname (Node, "_STA [Method]"));
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (Node, "_STA [Method]"));
Status = AcpiUtExecute_STA (Node, &Flags);
if (ACPI_FAILURE (Status))
{
@ -442,7 +450,7 @@ AcpiNsInitOneDevice (
/*
* The device is present. Run _INI.
*/
DEBUG_EXEC (AcpiUtDisplayInitPathname (ObjHandle, "_INI [Method]"));
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ObjHandle, "_INI [Method]"));
Status = AcpiNsEvaluateRelative (ObjHandle, "_INI", NULL, NULL);
if (AE_NOT_FOUND == Status)
{
@ -456,7 +464,7 @@ AcpiNsInitOneDevice (
/* Ignore error and move on to next device */
#ifdef ACPI_DEBUG
NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (ObjHandle);
NATIVE_CHAR *ScopeName = AcpiNsGetExternalPathname (ObjHandle);
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
ScopeName, AcpiFormatException (Status)));