This commit was generated by cvs2svn to compensate for changes in r104470,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
6a8b238332
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdebug.h - ACPI/AML debugger
|
||||
* $Revision: 63 $
|
||||
* $Revision: 64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -288,6 +288,10 @@ AcpiDbDecodeAndDisplayObject (
|
||||
NATIVE_CHAR *Target,
|
||||
NATIVE_CHAR *OutputType);
|
||||
|
||||
void
|
||||
AcpiDbDecodeNode (
|
||||
ACPI_NAMESPACE_NODE *Node);
|
||||
|
||||
void
|
||||
AcpiDbDisplayResultObject (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
|
||||
* $Revision: 63 $
|
||||
* $Revision: 64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -233,8 +233,9 @@
|
||||
#define AE_AML_ALIGNMENT (ACPI_STATUS) (0x001D | AE_CODE_AML)
|
||||
#define AE_AML_NO_RESOURCE_END_TAG (ACPI_STATUS) (0x001E | AE_CODE_AML)
|
||||
#define AE_AML_BAD_RESOURCE_VALUE (ACPI_STATUS) (0x001F | AE_CODE_AML)
|
||||
#define AE_AML_CIRCULAR_REFERENCE (ACPI_STATUS) (0x0020 | AE_CODE_AML)
|
||||
|
||||
#define AE_CODE_AML_MAX 0x001F
|
||||
#define AE_CODE_AML_MAX 0x0020
|
||||
|
||||
/*
|
||||
* Internal exceptions used for control
|
||||
@ -249,8 +250,9 @@
|
||||
#define AE_CTRL_TRANSFER (ACPI_STATUS) (0x0008 | AE_CODE_CONTROL)
|
||||
#define AE_CTRL_BREAK (ACPI_STATUS) (0x0009 | AE_CODE_CONTROL)
|
||||
#define AE_CTRL_CONTINUE (ACPI_STATUS) (0x000A | AE_CODE_CONTROL)
|
||||
#define AE_CTRL_SKIP (ACPI_STATUS) (0x000B | AE_CODE_CONTROL)
|
||||
|
||||
#define AE_CODE_CTRL_MAX 0x000A
|
||||
#define AE_CODE_CTRL_MAX 0x000B
|
||||
|
||||
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
@ -346,7 +348,8 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
|
||||
"AE_AML_NO_WHILE",
|
||||
"AE_AML_ALIGNMENT",
|
||||
"AE_AML_NO_RESOURCE_END_TAG",
|
||||
"AE_AML_BAD_RESOURCE_VALUE"
|
||||
"AE_AML_BAD_RESOURCE_VALUE",
|
||||
"AE_AML_CIRCULAR_REFERENCE"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Ctrl[] =
|
||||
@ -360,7 +363,8 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Ctrl[] =
|
||||
"AE_CTRL_END",
|
||||
"AE_CTRL_TRANSFER",
|
||||
"AE_CTRL_BREAK",
|
||||
"AE_CTRL_CONTINUE"
|
||||
"AE_CTRL_CONTINUE",
|
||||
"AE_CTRL_SKIP"
|
||||
};
|
||||
|
||||
#endif /* ACPI GLOBALS */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
* $Revision: 130 $
|
||||
* $Revision: 131 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -227,6 +227,7 @@ ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
|
||||
|
||||
extern BOOLEAN AcpiGbl_Shutdown;
|
||||
extern UINT32 AcpiGbl_StartupFlags;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
|
||||
* $Revision: 138 $
|
||||
* $Revision: 139 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -285,6 +285,13 @@ AcpiExGetObjectReference (
|
||||
ACPI_OPERAND_OBJECT **ReturnDesc,
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExResolveMultiple (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_OPERAND_OBJECT *Operand,
|
||||
ACPI_OBJECT_TYPE *ReturnType,
|
||||
ACPI_OPERAND_OBJECT **ReturnDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExConcatTemplate (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: aclocal.h - Internal data types used across the ACPI subsystem
|
||||
* $Revision: 175 $
|
||||
* $Revision: 176 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -758,8 +758,8 @@ typedef struct acpi_parseobj_asl
|
||||
UINT32 AmlSubtreeLength;
|
||||
UINT32 FinalAmlLength;
|
||||
UINT32 FinalAmlOffset;
|
||||
UINT32 CompileFlags;
|
||||
UINT16 ParseOpcode;
|
||||
UINT16 CompileFlags;
|
||||
UINT8 AmlOpcodeLength;
|
||||
UINT8 AmlPkgLenBytes;
|
||||
UINT8 Extra;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 128 $
|
||||
* $Revision: 130 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -456,6 +456,7 @@
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_WARNING(fp) {AcpiUtReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError(_THIS_MODULE,__LINE__,_COMPONENT, s, e);
|
||||
|
||||
#else
|
||||
|
||||
@ -465,6 +466,7 @@
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_WARNING(fp) {AcpiUtReportWarning("ACPI",__LINE__,_COMPONENT); \
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError("ACPI",__LINE__,_COMPONENT, s, e);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
|
||||
* $Revision: 126 $
|
||||
* $Revision: 127 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -513,6 +513,14 @@ UINT32
|
||||
AcpiNsLocal (
|
||||
ACPI_OBJECT_TYPE Type);
|
||||
|
||||
void
|
||||
AcpiNsReportError (
|
||||
NATIVE_CHAR *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *InternalName,
|
||||
ACPI_STATUS LookupStatus);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsBuildInternalName (
|
||||
ACPI_NAMESTRING_INFO *Info);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
|
||||
* $Revision: 61 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -135,6 +135,7 @@
|
||||
#define ACPI_PARSE_EXECUTE 0x0030
|
||||
#define ACPI_PARSE_MODE_MASK 0x0030
|
||||
|
||||
#define ACPI_PARSE_DEFERRED_OP 0x0100
|
||||
|
||||
/* Parser external interfaces */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
|
||||
* $Revision: 27 $
|
||||
* $Revision: 28 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -230,8 +230,8 @@ typedef struct
|
||||
UINT16 Plvl3Lat; /* Worst case HW latency to enter/exit C3 state */
|
||||
UINT16 FlushSize; /* Number of flush strides that need to be read */
|
||||
UINT16 FlushStride; /* Processor's memory cache line width, in bytes */
|
||||
UINT8 DutyOffset; /* Processor’s duty cycle index in processor's P_CNT reg*/
|
||||
UINT8 DutyWidth; /* Processor’s duty cycle value bit width in P_CNT register.*/
|
||||
UINT8 DutyOffset; /* Processor's duty cycle index in processor's P_CNT reg*/
|
||||
UINT8 DutyWidth; /* Processor's duty cycle value bit width in P_CNT register.*/
|
||||
UINT8 DayAlrm; /* Index to day-of-month alarm in RTC CMOS RAM */
|
||||
UINT8 MonAlrm; /* Index to month-of-year alarm in RTC CMOS RAM */
|
||||
UINT8 Century; /* Index to century in RTC CMOS RAM */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actypes.h - Common data types for the entire ACPI subsystem
|
||||
* $Revision: 238 $
|
||||
* $Revision: 239 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -1306,7 +1306,7 @@ typedef struct AcpiResource
|
||||
|
||||
#define ACPI_SIZEOF_RESOURCE(Type) (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (Type))
|
||||
|
||||
#define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->length)
|
||||
#define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
|
||||
|
||||
#ifdef _HW_ALIGNMENT_SUPPORT
|
||||
#define ACPI_ALIGN_RESOURCE_SIZE(Length) (Length)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbdisply - debug display commands
|
||||
* $Revision: 78 $
|
||||
* $Revision: 79 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -358,7 +358,7 @@ DumpNte:
|
||||
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf ("Object (%p) Pathname: %s\n", Node, RetBuf.Pointer);
|
||||
AcpiOsPrintf ("Object (%p) Pathname: %s\n", Node, (char *) RetBuf.Pointer);
|
||||
}
|
||||
|
||||
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
|
||||
@ -407,7 +407,7 @@ AcpiDbDecodeInternalObject (
|
||||
|
||||
if (!ObjDesc)
|
||||
{
|
||||
AcpiOsPrintf (" Uninitialized\n");
|
||||
AcpiOsPrintf (" Uninitialized");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ AcpiDbDisplayInternalObject (
|
||||
Type = ACPI_GET_OBJECT_TYPE (ObjDesc);
|
||||
if (Type > INTERNAL_TYPE_MAX)
|
||||
{
|
||||
AcpiOsPrintf (" Type %hX [Invalid Type]", Type);
|
||||
AcpiOsPrintf (" Type %X [Invalid Type]", (UINT32) Type);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -591,13 +591,20 @@ AcpiDbDisplayInternalObject (
|
||||
case AML_INDEX_OP:
|
||||
|
||||
AcpiOsPrintf ("[Index] ");
|
||||
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
|
||||
if (!ObjDesc->Reference.Where)
|
||||
{
|
||||
AcpiOsPrintf ("Uninitialized WHERE ptr");
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiDbDecodeInternalObject (*(ObjDesc->Reference.Where));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_REF_OF_OP:
|
||||
|
||||
AcpiOsPrintf ("[Reference] ");
|
||||
AcpiOsPrintf ("[RefOf] ");
|
||||
|
||||
/* Reference can be to a Node or an Operand object */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbexec - debugger control method execution
|
||||
* $Revision: 44 $
|
||||
* $Revision: 45 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -363,7 +363,8 @@ AcpiDbExecute (
|
||||
if (ReturnObj.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
|
||||
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer, ReturnObj.Length);
|
||||
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
|
||||
(UINT32) ReturnObj.Length);
|
||||
AcpiDbDumpObject (ReturnObj.Pointer, 1);
|
||||
}
|
||||
else
|
||||
@ -408,7 +409,7 @@ AcpiDbMethodThread (
|
||||
if (ReturnObj.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
|
||||
Info->Pathname, ReturnObj.Pointer, ReturnObj.Length);
|
||||
Info->Pathname, ReturnObj.Pointer, (UINT32) ReturnObj.Length);
|
||||
AcpiDbDumpObject (ReturnObj.Pointer, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbinput - user front-end to the AML debugger
|
||||
* $Revision: 87 $
|
||||
* $Revision: 88 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -341,7 +341,7 @@ AcpiDbDisplayHelp (
|
||||
return;
|
||||
|
||||
default:
|
||||
AcpiOsPrintf ("Unrecognized Command Class: %X\n", HelpType);
|
||||
AcpiOsPrintf ("Unrecognized Command Class: %s\n", HelpType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbstats - Generation and display of ACPI table statistics
|
||||
* $Revision: 61 $
|
||||
* $Revision: 63 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -115,9 +115,9 @@
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include <acpi.h>
|
||||
#include <acdebug.h>
|
||||
#include <acnamesp.h>
|
||||
#include "acpi.h"
|
||||
#include "acdebug.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
@ -412,7 +412,7 @@ AcpiDbDisplayStatistics (
|
||||
|
||||
AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
|
||||
|
||||
AcpiOsPrintf ("%16.16s % 10.10s % 10.10s\n", "ACPI_TYPE", "NODES", "OBJECTS");
|
||||
AcpiOsPrintf ("%16.16s %10.10s %10.10s\n", "ACPI_TYPE", "NODES", "OBJECTS");
|
||||
|
||||
for (i = 0; i < INTERNAL_TYPE_NODE_MAX; i++)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
|
||||
* $Revision: 3 $
|
||||
* $Revision: 4 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -145,7 +145,19 @@ AcpiDmValidateName (
|
||||
char *Name,
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
|
||||
#if 0
|
||||
if ((!Name) ||
|
||||
(!Op->Common.Parent))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Op->Common.Node)
|
||||
{
|
||||
AcpiOsPrintf (" /**** Name not found or not accessible from this scope ****/ ");
|
||||
}
|
||||
|
||||
ACPI_PARSE_OBJECT *TargetOp;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsfield - Dispatcher field routines
|
||||
* $Revision: 66 $
|
||||
* $Revision: 68 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -204,6 +204,7 @@ AcpiDsCreateBufferField (
|
||||
Flags, WalkState, &(Node));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -350,13 +351,13 @@ AcpiDsGetFieldNames (
|
||||
WalkState, &Info->FieldNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR ((char *) &Arg->Named.Name, Status);
|
||||
if (Status != AE_ALREADY_EXISTS)
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
|
||||
&Arg->Named.Name));
|
||||
/* Already exists, ignore error */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -380,7 +381,7 @@ AcpiDsGetFieldNames (
|
||||
if (Position > ACPI_UINT32_MAX)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n",
|
||||
&Info->FieldNode->Name));
|
||||
(char *) &Info->FieldNode->Name));
|
||||
return_ACPI_STATUS (AE_SUPPORT);
|
||||
}
|
||||
|
||||
@ -440,6 +441,7 @@ AcpiDsCreateField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -527,14 +529,12 @@ AcpiDsInitFieldObjects (
|
||||
WalkState, &Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR ((char *) &Arg->Named.Name, Status);
|
||||
if (Status != AE_ALREADY_EXISTS)
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
|
||||
&Arg->Named.Name));
|
||||
|
||||
/* Name already exists, just ignore this error */
|
||||
|
||||
Status = AE_OK;
|
||||
@ -590,6 +590,7 @@ AcpiDsCreateBankField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.Name, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
@ -602,6 +603,7 @@ AcpiDsCreateBankField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -662,6 +664,7 @@ AcpiDsCreateIndexField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -673,6 +676,7 @@ AcpiDsCreateIndexField (
|
||||
ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -681,7 +685,6 @@ AcpiDsCreateIndexField (
|
||||
Arg = Arg->Common.Next;
|
||||
Info.FieldFlags = Arg->Common.Value.Integer8;
|
||||
|
||||
|
||||
/* Each remaining arg is a Named Field */
|
||||
|
||||
Info.FieldType = INTERNAL_TYPE_INDEX_FIELD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsobject - Dispatcher object management routines
|
||||
* $Revision: 106 $
|
||||
* $Revision: 108 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -339,12 +339,12 @@ AcpiDsBuildInternalObject (
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_STATUS Status;
|
||||
char *Name;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsBuildInternalObject");
|
||||
|
||||
|
||||
*ObjDescPtr = NULL;
|
||||
if (Op->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
|
||||
{
|
||||
/*
|
||||
@ -361,28 +361,8 @@ AcpiDsBuildInternalObject (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
if (Status == AE_NOT_FOUND)
|
||||
{
|
||||
Name = NULL;
|
||||
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String, NULL, &Name);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
ACPI_REPORT_WARNING (("Reference %s at AML %X not found\n",
|
||||
Name, Op->Common.AmlOffset));
|
||||
ACPI_MEM_FREE (Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_REPORT_WARNING (("Reference %s at AML %X not found\n",
|
||||
Op->Common.Value.String, Op->Common.AmlOffset));
|
||||
}
|
||||
|
||||
*ObjDescPtr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
ACPI_REPORT_NSERROR (Op->Common.Value.String, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -881,9 +861,10 @@ AcpiDsInitObjectFromOp (
|
||||
|
||||
ObjDesc->Reference.Opcode = AML_LOCAL_OP;
|
||||
ObjDesc->Reference.Offset = Opcode - AML_LOCAL_OP;
|
||||
|
||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
||||
AcpiDsMethodDataGetNode (AML_LOCAL_OP, ObjDesc->Reference.Offset,
|
||||
WalkState, (ACPI_NAMESPACE_NODE **) &ObjDesc->Reference.Object);
|
||||
Status = AcpiDsMethodDataGetNode (AML_LOCAL_OP, ObjDesc->Reference.Offset,
|
||||
WalkState, (ACPI_NAMESPACE_NODE **) &ObjDesc->Reference.Object);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dsopcode - Dispatcher Op Region support and handling of
|
||||
* "control" opcodes
|
||||
* $Revision: 81 $
|
||||
* $Revision: 82 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -188,7 +188,7 @@ AcpiDsExecuteArguments (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
WalkState->ParseFlags = 0;
|
||||
WalkState->ParseFlags = ACPI_PARSE_DEFERRED_OP;
|
||||
|
||||
/* Pass1: Parse the entire declaration */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsutils - Dispatcher utilities
|
||||
* $Revision: 94 $
|
||||
* $Revision: 95 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -405,7 +405,6 @@ AcpiDsCreateOperand (
|
||||
UINT32 ArgIndex)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_STATUS Status2;
|
||||
NATIVE_CHAR *NameString;
|
||||
UINT32 NameLength;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
@ -413,7 +412,6 @@ AcpiDsCreateOperand (
|
||||
UINT16 Opcode;
|
||||
ACPI_INTERPRETER_MODE InterpreterMode;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
char *Name;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("DsCreateOperand", Arg);
|
||||
@ -496,18 +494,14 @@ AcpiDsCreateOperand (
|
||||
* very serious error at this point
|
||||
*/
|
||||
Status = AE_AML_NAME_NOT_FOUND;
|
||||
|
||||
Name = NULL;
|
||||
Status2 = AcpiNsExternalizeName (ACPI_UINT32_MAX, NameString, NULL, &Name);
|
||||
if (ACPI_SUCCESS (Status2))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Object name [%s] was not found in namespace\n", Name));
|
||||
ACPI_MEM_FREE (Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (NameString, Status);
|
||||
}
|
||||
|
||||
/* Free the namestring created above */
|
||||
|
||||
ACPI_MEM_FREE (NameString);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswload - Dispatcher namespace load callbacks
|
||||
* $Revision: 70 $
|
||||
* $Revision: 75 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -202,25 +202,30 @@ AcpiDsLoad1BeginOp (
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_TYPE ObjectType;
|
||||
NATIVE_CHAR *Path;
|
||||
UINT32 Flags;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("DsLoad1BeginOp");
|
||||
|
||||
|
||||
Op = WalkState->Op;
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
|
||||
if (Op && (Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
}
|
||||
|
||||
/* We are only interested in opcodes that have an associated name */
|
||||
|
||||
if (Op)
|
||||
{
|
||||
if (!(WalkState->OpInfo->Flags & AML_NAMED))
|
||||
{
|
||||
#if 0
|
||||
if ((WalkState->OpInfo->Class == AML_CLASS_EXECUTE) ||
|
||||
(WalkState->OpInfo->Class == AML_CLASS_CONTROL))
|
||||
{
|
||||
AcpiOsPrintf ("\n\n***EXECUTABLE OPCODE %s***\n\n", WalkState->OpInfo->Name);
|
||||
*OutOp = Op;
|
||||
return (AE_CTRL_SKIP);
|
||||
}
|
||||
#endif
|
||||
*OutOp = Op;
|
||||
return (AE_OK);
|
||||
}
|
||||
@ -241,7 +246,33 @@ AcpiDsLoad1BeginOp (
|
||||
ObjectType = WalkState->OpInfo->ObjectType;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"State=%p Op=%p Type=%X\n", WalkState, Op, ObjectType));
|
||||
"State=%p Op=%p [%s] ", WalkState, Op, AcpiUtGetTypeName (ObjectType)));
|
||||
|
||||
/*
|
||||
* Setup the search flags.
|
||||
*
|
||||
* Since we are entering a name into the namespace, we do not want to
|
||||
* enable the search-to-root upsearch.
|
||||
*
|
||||
* There are only two conditions where it is acceptable that the name
|
||||
* already exists:
|
||||
* 1) the Scope() operator can reopen a scoping object that was
|
||||
* previously defined (Scope, Method, Device, etc.)
|
||||
* 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer,
|
||||
* BufferField, or Package), the name of the object is already
|
||||
* in the namespace.
|
||||
*/
|
||||
Flags = ACPI_NS_NO_UPSEARCH;
|
||||
if ((WalkState->Opcode != AML_SCOPE_OP) &&
|
||||
(!(WalkState->ParseFlags & ACPI_PARSE_DEFERRED_OP)))
|
||||
{
|
||||
Flags |= ACPI_NS_ERROR_IF_FOUND;
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Cannot already exist\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Both Find or Create allowed\n"));
|
||||
}
|
||||
|
||||
/*
|
||||
* Enter the named type into the internal namespace. We enter the name
|
||||
@ -249,13 +280,62 @@ AcpiDsLoad1BeginOp (
|
||||
* arguments to the opcode must be created as we go back up the parse tree later.
|
||||
*/
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
|
||||
ACPI_IMODE_LOAD_PASS1, ACPI_NS_NO_UPSEARCH, WalkState, &(Node));
|
||||
|
||||
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &(Node));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Path, Status);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* For the scope op, we must check to make sure that the target is
|
||||
* one of the opcodes that actually opens a scope
|
||||
*/
|
||||
if (WalkState->Opcode == AML_SCOPE_OP)
|
||||
{
|
||||
switch (Node->Type)
|
||||
{
|
||||
case ACPI_TYPE_ANY: /* Scope nodes are untyped (ANY) */
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_POWER:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
|
||||
/* These are acceptable types */
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
/*
|
||||
* These types we will allow, but we will change the type. This
|
||||
* enables some existing code of the form:
|
||||
*
|
||||
* Name (DEB, 0)
|
||||
* Scope (DEB) { ... }
|
||||
*
|
||||
* Note: silently change the type here. On the second pass, we will report a warning
|
||||
*/
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
Path, AcpiUtGetTypeName (Node->Type)));
|
||||
|
||||
Node->Type = ACPI_TYPE_ANY;
|
||||
WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* All other types are an error */
|
||||
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n",
|
||||
AcpiUtGetTypeName (Node->Type), Path));
|
||||
|
||||
return (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Op)
|
||||
{
|
||||
/* Create a new op */
|
||||
@ -314,10 +394,10 @@ AcpiDsLoad1EndOp (
|
||||
|
||||
ACPI_FUNCTION_NAME ("DsLoad1EndOp");
|
||||
|
||||
|
||||
Op = WalkState->Op;
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
|
||||
/* We are only interested in opcodes that have an associated name */
|
||||
|
||||
if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_FIELD)))
|
||||
@ -504,37 +584,87 @@ AcpiDsLoad2BeginOp (
|
||||
ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, WalkState, &(Node));
|
||||
}
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_NSERROR (BufferPtr, Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* For the scope op, we must check to make sure that the target is
|
||||
* one of the opcodes that actually opens a scope
|
||||
*/
|
||||
if (WalkState->Opcode == AML_SCOPE_OP)
|
||||
{
|
||||
switch (Node->Type)
|
||||
{
|
||||
case ACPI_TYPE_ANY: /* Scope nodes are untyped (ANY) */
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_POWER:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
|
||||
/* These are acceptable types */
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
/*
|
||||
* These types we will allow, but we will change the type. This
|
||||
* enables some existing code of the form:
|
||||
*
|
||||
* Name (DEB, 0)
|
||||
* Scope (DEB) { ... }
|
||||
*/
|
||||
|
||||
ACPI_REPORT_WARNING (("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
BufferPtr, AcpiUtGetTypeName (Node->Type)));
|
||||
|
||||
Node->Type = ACPI_TYPE_ANY;
|
||||
WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* All other types are an error */
|
||||
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
|
||||
AcpiUtGetTypeName (Node->Type), BufferPtr));
|
||||
|
||||
return (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Op)
|
||||
{
|
||||
/* Create a new op */
|
||||
|
||||
Op = AcpiPsAllocOp (WalkState->Opcode);
|
||||
if (!Op)
|
||||
{
|
||||
/* Create a new op */
|
||||
|
||||
Op = AcpiPsAllocOp (WalkState->Opcode);
|
||||
if (!Op)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Initialize the new op */
|
||||
|
||||
if (Node)
|
||||
{
|
||||
Op->Named.Name = Node->Name.Integer;
|
||||
}
|
||||
if (OutOp)
|
||||
{
|
||||
*OutOp = Op;
|
||||
}
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the Node in the "op" object that the parser uses, so we
|
||||
* can get it again quickly when this scope is closed
|
||||
*/
|
||||
Op->Common.Node = Node;
|
||||
/* Initialize the new op */
|
||||
|
||||
if (Node)
|
||||
{
|
||||
Op->Named.Name = Node->Name.Integer;
|
||||
}
|
||||
if (OutOp)
|
||||
{
|
||||
*OutOp = Op;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the Node in the "op" object that the parser uses, so we
|
||||
* can get it again quickly when this scope is closed
|
||||
*/
|
||||
Op->Common.Node = Node;
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -856,7 +986,10 @@ AcpiDsLoad2EndOp (
|
||||
*/
|
||||
Op->Common.Node = NewNode;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ACPI_REPORT_NSERROR (Arg->Common.Value.String, Status);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswscope - Scope stack manipulation
|
||||
* $Revision: 52 $
|
||||
* $Revision: 53 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -156,7 +156,7 @@ AcpiDsScopeStackClear (
|
||||
WalkState->ScopeInfo = ScopeInfo->Scope.Next;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Popped object type %X\n", ScopeInfo->Common.Value));
|
||||
"Popped object type (%s)\n", AcpiUtGetTypeName (ScopeInfo->Common.Value)));
|
||||
AcpiUtDeleteGenericState (ScopeInfo);
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,7 @@ AcpiDsScopeStackPop (
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Popped object type %X\n", ScopeInfo->Common.Value));
|
||||
"Popped object type (%s)\n", AcpiUtGetTypeName (ScopeInfo->Common.Value)));
|
||||
|
||||
AcpiUtDeleteGenericState (ScopeInfo);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
|
||||
* $Revision: 90 $
|
||||
* $Revision: 92 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -234,6 +234,7 @@ AcpiEvHandlerInitialize (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
AcpiGbl_EventsInitialized = TRUE;
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -301,8 +302,8 @@ AcpiEvFixedEventDetect (
|
||||
void)
|
||||
{
|
||||
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
UINT32 GpeStatus;
|
||||
UINT32 GpeEnable;
|
||||
UINT32 FixedStatus;
|
||||
UINT32 FixedEnable;
|
||||
NATIVE_UINT_MAX32 i;
|
||||
|
||||
|
||||
@ -313,12 +314,12 @@ AcpiEvFixedEventDetect (
|
||||
* Read the fixed feature status and enable registers, as all the cases
|
||||
* depend on their values. Ignore errors here.
|
||||
*/
|
||||
(void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, &GpeStatus);
|
||||
(void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, &GpeEnable);
|
||||
(void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, &FixedStatus);
|
||||
(void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
|
||||
"Fixed AcpiEvent Block: Enable %08X Status %08X\n",
|
||||
GpeEnable, GpeStatus));
|
||||
FixedEnable, FixedStatus));
|
||||
|
||||
/*
|
||||
* Check for all possible Fixed Events and dispatch those that are active
|
||||
@ -327,8 +328,8 @@ AcpiEvFixedEventDetect (
|
||||
{
|
||||
/* Both the status and enable bits must be on for this event */
|
||||
|
||||
if ((GpeStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) &&
|
||||
(GpeEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
|
||||
if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) &&
|
||||
(FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
|
||||
{
|
||||
/* Found an active (signalled) event */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evmisc - Miscellaneous event manager support functions
|
||||
* $Revision: 56 $
|
||||
* $Revision: 57 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -667,7 +667,7 @@ AcpiEvReleaseGlobalLock (void)
|
||||
*
|
||||
* RETURN: none
|
||||
*
|
||||
* DESCRIPTION: free memory allocated for table storage.
|
||||
* DESCRIPTION: Disable events and free memory allocated for table storage.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -680,45 +680,49 @@ AcpiEvTerminate (void)
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvTerminate");
|
||||
|
||||
/*
|
||||
* Disable all event-related functionality.
|
||||
* In all cases, on error, print a message but obviously we don't abort.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Disable all fixed events
|
||||
*/
|
||||
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
|
||||
if (AcpiGbl_EventsInitialized)
|
||||
{
|
||||
Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Failed to disable fixed event %d.\n", i));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Disable all event-related functionality.
|
||||
* In all cases, on error, print a message but obviously we don't abort.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Disable all GPEs
|
||||
*/
|
||||
for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
|
||||
{
|
||||
if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
|
||||
/*
|
||||
* Disable all fixed events
|
||||
*/
|
||||
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
|
||||
{
|
||||
Status = AcpiHwDisableGpe(i);
|
||||
Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Failed to disable GPE %d.\n", i));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove SCI handler
|
||||
*/
|
||||
Status = AcpiEvRemoveSciHandler();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unable to remove SCI handler.\n"));
|
||||
/*
|
||||
* Disable all GPEs
|
||||
*/
|
||||
for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
|
||||
{
|
||||
if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
|
||||
{
|
||||
Status = AcpiHwDisableGpe(i);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove SCI handler
|
||||
*/
|
||||
Status = AcpiEvRemoveSciHandler();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not remove SCI handler\n"));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -729,7 +733,7 @@ AcpiEvTerminate (void)
|
||||
Status = AcpiDisable ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiDisable failed.\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiDisable failed\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconvrt - Object conversion routines
|
||||
* $Revision: 37 $
|
||||
* $Revision: 39 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -273,7 +273,7 @@ AcpiExConvertToInteger (
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Convert an ACPI Object to an Buffer
|
||||
* DESCRIPTION: Convert an ACPI Object to a Buffer
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -335,7 +335,34 @@ AcpiExConvertToBuffer (
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
*ResultDesc = ObjDesc;
|
||||
/*
|
||||
* Create a new Buffer object
|
||||
*/
|
||||
RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
|
||||
if (!RetDesc)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Need enough space for one integer */
|
||||
|
||||
NewBuf = ACPI_MEM_CALLOCATE (ObjDesc->String.Length);
|
||||
if (!NewBuf)
|
||||
{
|
||||
ACPI_REPORT_ERROR
|
||||
(("ExConvertToBuffer: Buffer allocation failure\n"));
|
||||
AcpiUtRemoveReference (RetDesc);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
ACPI_STRNCPY ((char *) NewBuf, (char *) ObjDesc->String.Pointer, ObjDesc->String.Length);
|
||||
RetDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
|
||||
RetDesc->Buffer.Pointer = NewBuf;
|
||||
RetDesc->Buffer.Length = ObjDesc->String.Length;
|
||||
|
||||
/* Return the new buffer descriptor */
|
||||
|
||||
*ResultDesc = RetDesc;
|
||||
break;
|
||||
|
||||
|
||||
@ -359,11 +386,13 @@ AcpiExConvertToBuffer (
|
||||
*
|
||||
* FUNCTION: AcpiExConvertAscii
|
||||
*
|
||||
* PARAMETERS: Integer
|
||||
* PARAMETERS: Integer - Value to be converted
|
||||
* Base - 10 or 16
|
||||
* String - Where the string is returned
|
||||
*
|
||||
* RETURN: Actual string length
|
||||
*
|
||||
* DESCRIPTION: Convert an ACPI Integer to a hex string
|
||||
* DESCRIPTION: Convert an ACPI Integer to a hex or decimal string
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -706,8 +735,8 @@ AcpiExConvertToTargetType (
|
||||
|
||||
if (DestinationType != ACPI_GET_OBJECT_TYPE (SourceDesc))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Target does not allow conversion of type %s to %s\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Explicit operator, will store (%s) over existing type (%s)\n",
|
||||
AcpiUtGetObjectTypeName (SourceDesc),
|
||||
AcpiUtGetTypeName (DestinationType)));
|
||||
Status = AE_TYPE;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: excreate - Named object creation
|
||||
* $Revision: 93 $
|
||||
* $Revision: 94 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -146,7 +146,8 @@ ACPI_STATUS
|
||||
AcpiExCreateAlias (
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *SourceNode;
|
||||
ACPI_NAMESPACE_NODE *TargetNode;
|
||||
ACPI_NAMESPACE_NODE *AliasNode;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
@ -155,25 +156,63 @@ AcpiExCreateAlias (
|
||||
|
||||
/* Get the source/alias operands (both namespace nodes) */
|
||||
|
||||
SourceNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[1];
|
||||
AliasNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
|
||||
TargetNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[1];
|
||||
|
||||
|
||||
/* Attach the original source object to the new Alias Node */
|
||||
|
||||
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) WalkState->Operands[0],
|
||||
AcpiNsGetAttachedObject (SourceNode),
|
||||
SourceNode->Type);
|
||||
if (TargetNode->Type == INTERNAL_TYPE_ALIAS)
|
||||
{
|
||||
/*
|
||||
* Dereference an existing alias so that we don't create a chain
|
||||
* of aliases. With this code, we guarantee that an alias is
|
||||
* always exactly one level of indirection away from the
|
||||
* actual aliased name.
|
||||
*/
|
||||
TargetNode = (ACPI_NAMESPACE_NODE *) TargetNode->Object;
|
||||
}
|
||||
|
||||
/*
|
||||
* The new alias assumes the type of the source, but it points
|
||||
* to the same object. The reference count of the object has an
|
||||
* additional reference to prevent deletion out from under either the
|
||||
* source or the alias Node
|
||||
* For objects that can never change (i.e., the NS node will
|
||||
* permanently point to the same object), we can simply attach
|
||||
* the object to the new NS node. For other objects (such as
|
||||
* Integers, buffers, etc.), we have to point the Alias node
|
||||
* to the original Node.
|
||||
*/
|
||||
switch (TargetNode->Type)
|
||||
{
|
||||
case ACPI_TYPE_INTEGER:
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
/*
|
||||
* The new alias has the type ALIAS and points to the original
|
||||
* NS node, not the object itself. This is because for these
|
||||
* types, the object can change dynamically via a Store.
|
||||
*/
|
||||
AliasNode->Type = INTERNAL_TYPE_ALIAS;
|
||||
AliasNode->Object = (ACPI_OPERAND_OBJECT *) TargetNode;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* Attach the original source object to the new Alias Node */
|
||||
|
||||
/*
|
||||
* The new alias assumes the type of the target, and it points
|
||||
* to the same object. The reference count of the object has an
|
||||
* additional reference to prevent deletion out from under either the
|
||||
* target node or the alias Node
|
||||
*/
|
||||
Status = AcpiNsAttachObject (AliasNode,
|
||||
AcpiNsGetAttachedObject (TargetNode),
|
||||
TargetNode->Type);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Since both operands are Nodes, we don't need to delete them */
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exdump - Interpreter debug output routines
|
||||
* $Revision: 159 $
|
||||
* $Revision: 160 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -687,6 +687,14 @@ AcpiExDumpObjectDescriptor (
|
||||
}
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
AcpiExDumpNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
|
||||
AcpiOsPrintf ("\nAttached Object (%p):\n", ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
|
||||
AcpiExDumpObjectDescriptor (((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
|
||||
{
|
||||
AcpiOsPrintf ("ExDumpObjectDescriptor: %p is not a valid ACPI object\n", ObjDesc);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
|
||||
* $Revision: 108 $
|
||||
* $Revision: 109 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -121,7 +121,6 @@
|
||||
#include "acpi.h"
|
||||
#include "acinterp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acdispat.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_EXECUTER
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
|
||||
* $Revision: 142 $
|
||||
* $Revision: 143 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -151,7 +151,6 @@
|
||||
* fully resolved operands.
|
||||
!*/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiExOpcode_1A_0T_0R
|
||||
@ -678,78 +677,12 @@ AcpiExOpcode_1A_0T_1R (
|
||||
|
||||
case AML_TYPE_OP: /* ObjectType (SourceObject) */
|
||||
|
||||
if (ACPI_GET_OBJECT_TYPE (Operand[0]) == INTERNAL_TYPE_REFERENCE)
|
||||
/* Get the type of the base object */
|
||||
|
||||
Status = AcpiExResolveMultiple (WalkState, Operand[0], &Type, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/*
|
||||
* Not a Name -- an indirect name pointer would have
|
||||
* been converted to a direct name pointer in ResolveOperands
|
||||
*/
|
||||
switch (Operand[0]->Reference.Opcode)
|
||||
{
|
||||
case AML_DEBUG_OP:
|
||||
|
||||
/* The Debug Object is of type "DebugObject" */
|
||||
|
||||
Type = ACPI_TYPE_DEBUG_OBJECT;
|
||||
break;
|
||||
|
||||
|
||||
case AML_INDEX_OP:
|
||||
|
||||
/* Get the type of this reference (index into another object) */
|
||||
|
||||
Type = Operand[0]->Reference.TargetType;
|
||||
if (Type == ACPI_TYPE_PACKAGE)
|
||||
{
|
||||
/*
|
||||
* The main object is a package, we want to get the type
|
||||
* of the individual package element that is referenced by
|
||||
* the index.
|
||||
*/
|
||||
Type = ACPI_GET_OBJECT_TYPE (*(Operand[0]->Reference.Where));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_LOCAL_OP:
|
||||
case AML_ARG_OP:
|
||||
|
||||
Type = AcpiDsMethodDataGetType (Operand[0]->Reference.Opcode,
|
||||
Operand[0]->Reference.Offset, WalkState);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
ACPI_REPORT_ERROR (("AcpiExOpcode_1A_0T_1R/TypeOp: Unknown Reference subtype %X\n",
|
||||
Operand[0]->Reference.Opcode));
|
||||
Status = AE_AML_INTERNAL;
|
||||
goto Cleanup;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* It's not a Reference, so it must be a direct name pointer.
|
||||
*/
|
||||
Type = AcpiNsGetType ((ACPI_NAMESPACE_NODE *) Operand[0]);
|
||||
|
||||
/* Convert internal types to external types */
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case INTERNAL_TYPE_REGION_FIELD:
|
||||
case INTERNAL_TYPE_BANK_FIELD:
|
||||
case INTERNAL_TYPE_INDEX_FIELD:
|
||||
|
||||
Type = ACPI_TYPE_FIELD_UNIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* No change to Type required */
|
||||
break;
|
||||
}
|
||||
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Allocate a descriptor to hold the type. */
|
||||
@ -767,43 +700,38 @@ AcpiExOpcode_1A_0T_1R (
|
||||
|
||||
case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */
|
||||
|
||||
TempDesc = Operand[0];
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Operand[0]) == ACPI_DESC_TYPE_NAMED)
|
||||
/* Get the base object */
|
||||
|
||||
Status = AcpiExResolveMultiple (WalkState, Operand[0], &Type, &TempDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
TempDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) Operand[0]);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
if (!TempDesc)
|
||||
/*
|
||||
* Type is guaranteed to be a buffer, string, or package at this
|
||||
* point (even if the original operand was an object reference, it
|
||||
* will be resolved and typechecked during operand resolution.)
|
||||
*/
|
||||
switch (Type)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Type is guaranteed to be a buffer, string, or package at this
|
||||
* point (even if the original operand was an object reference, it
|
||||
* will be resolved and typechecked during operand resolution.)
|
||||
*/
|
||||
switch (ACPI_GET_OBJECT_TYPE (TempDesc))
|
||||
{
|
||||
case ACPI_TYPE_BUFFER:
|
||||
Value = TempDesc->Buffer.Length;
|
||||
break;
|
||||
case ACPI_TYPE_BUFFER:
|
||||
Value = TempDesc->Buffer.Length;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
Value = TempDesc->String.Length;
|
||||
break;
|
||||
case ACPI_TYPE_STRING:
|
||||
Value = TempDesc->String.Length;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
Value = TempDesc->Package.Count;
|
||||
break;
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
Value = TempDesc->Package.Count;
|
||||
break;
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "SizeOf, Not Buf/Str/Pkg - found type %s\n",
|
||||
AcpiUtGetObjectTypeName (TempDesc)));
|
||||
Status = AE_AML_OPERAND_TYPE;
|
||||
goto Cleanup;
|
||||
}
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "SizeOf, Not Buf/Str/Pkg - found type %s\n",
|
||||
AcpiUtGetTypeName (Type)));
|
||||
Status = AE_AML_OPERAND_TYPE;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
|
||||
* $Revision: 110 $
|
||||
* $Revision: 111 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -346,9 +346,10 @@ AcpiExOpcode_2A_1T_1R (
|
||||
{
|
||||
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
|
||||
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
|
||||
ACPI_OPERAND_OBJECT *TempDesc;
|
||||
ACPI_OPERAND_OBJECT *TempDesc = NULL;
|
||||
UINT32 Index;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_SIZE Length;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_STR ("ExOpcode_2A_1T_1R", AcpiPsGetOpcodeName (WalkState->Opcode));
|
||||
@ -390,7 +391,6 @@ AcpiExOpcode_2A_1T_1R (
|
||||
|
||||
Status = AcpiUtDivide (&Operand[0]->Integer.Value, &Operand[1]->Integer.Value,
|
||||
NULL, &ReturnDesc->Integer.Value);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@ -406,15 +406,15 @@ AcpiExOpcode_2A_1T_1R (
|
||||
switch (ACPI_GET_OBJECT_TYPE (Operand[0]))
|
||||
{
|
||||
case ACPI_TYPE_INTEGER:
|
||||
Status = AcpiExConvertToInteger (Operand[1], &Operand[1], WalkState);
|
||||
Status = AcpiExConvertToInteger (Operand[1], &TempDesc, WalkState);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
Status = AcpiExConvertToString (Operand[1], &Operand[1], 16, ACPI_UINT32_MAX, WalkState);
|
||||
Status = AcpiExConvertToString (Operand[1], &TempDesc, 16, ACPI_UINT32_MAX, WalkState);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
Status = AcpiExConvertToBuffer (Operand[1], &Operand[1], WalkState);
|
||||
Status = AcpiExConvertToBuffer (Operand[1], &TempDesc, WalkState);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -431,14 +431,69 @@ AcpiExOpcode_2A_1T_1R (
|
||||
* (Both are Integer, String, or Buffer), and we can now perform the
|
||||
* concatenation.
|
||||
*/
|
||||
Status = AcpiExDoConcatenate (Operand[0], Operand[1], &ReturnDesc, WalkState);
|
||||
Status = AcpiExDoConcatenate (Operand[0], TempDesc, &ReturnDesc, WalkState);
|
||||
if (TempDesc != Operand[1])
|
||||
{
|
||||
AcpiUtRemoveReference (TempDesc);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_TO_STRING_OP: /* ToString (Buffer, Length, Result) (ACPI 2.0) */
|
||||
|
||||
Status = AcpiExConvertToString (Operand[0], &ReturnDesc, 16,
|
||||
(UINT32) Operand[1]->Integer.Value, WalkState);
|
||||
/*
|
||||
* Input object is guaranteed to be a buffer at this point (it may have
|
||||
* been converted.) Copy the raw buffer data to a new object of type String.
|
||||
*/
|
||||
|
||||
/* Get the length of the new string */
|
||||
|
||||
Length = 0;
|
||||
if (Operand[1]->Integer.Value == 0)
|
||||
{
|
||||
/* Handle optional length value */
|
||||
|
||||
Operand[1]->Integer.Value = ACPI_INTEGER_MAX;
|
||||
}
|
||||
|
||||
while ((Length < Operand[0]->Buffer.Length) &&
|
||||
(Length < Operand[1]->Integer.Value) &&
|
||||
(Operand[0]->Buffer.Pointer[Length]))
|
||||
{
|
||||
Length++;
|
||||
}
|
||||
|
||||
if (Length > ACPI_MAX_STRING_CONVERSION)
|
||||
{
|
||||
Status = AE_AML_STRING_LIMIT;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Create the internal return object */
|
||||
|
||||
ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_STRING);
|
||||
if (!ReturnDesc)
|
||||
{
|
||||
Status = AE_NO_MEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Allocate a new string buffer (Length + 1 for null terminator) */
|
||||
|
||||
ReturnDesc->String.Pointer = ACPI_MEM_CALLOCATE (Length + 1);
|
||||
if (!ReturnDesc->String.Pointer)
|
||||
{
|
||||
Status = AE_NO_MEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Copy the raw buffer data with no transform */
|
||||
|
||||
ACPI_MEMCPY (ReturnDesc->String.Pointer, Operand[0]->Buffer.Pointer, Length);
|
||||
|
||||
/* Set the string length */
|
||||
|
||||
ReturnDesc->String.Length = Length;
|
||||
break;
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresnte - AML Interpreter object resolution
|
||||
* $Revision: 57 $
|
||||
* $Revision: 59 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -118,7 +118,6 @@
|
||||
#define __EXRESNTE_C__
|
||||
|
||||
#include "acpi.h"
|
||||
#include "amlcode.h"
|
||||
#include "acdispat.h"
|
||||
#include "acinterp.h"
|
||||
#include "acnamesp.h"
|
||||
@ -181,6 +180,16 @@ AcpiExResolveNodeToValue (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p Type=%X\n",
|
||||
Node, SourceDesc, EntryType));
|
||||
|
||||
if (EntryType == INTERNAL_TYPE_ALIAS)
|
||||
{
|
||||
/* There is always exactly one level of indirection */
|
||||
|
||||
Node = (ACPI_NAMESPACE_NODE *) Node->Object;
|
||||
SourceDesc = AcpiNsGetAttachedObject (Node);
|
||||
EntryType = AcpiNsGetType ((ACPI_HANDLE) Node);
|
||||
*ObjectPtr = Node;
|
||||
}
|
||||
|
||||
/*
|
||||
* Several object types require no further processing:
|
||||
* 1) Devices rarely have an attached object, return the Node
|
||||
@ -306,7 +315,7 @@ AcpiExResolveNodeToValue (
|
||||
break;
|
||||
|
||||
|
||||
/* TYPE_Any is untyped, and thus there is no object associated with it */
|
||||
/* TYPE_ANY is untyped, and thus there is no object associated with it */
|
||||
|
||||
case ACPI_TYPE_ANY:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresolv - AML Interpreter object resolution
|
||||
* $Revision: 115 $
|
||||
* $Revision: 116 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -121,6 +121,7 @@
|
||||
#include "amlcode.h"
|
||||
#include "acdispat.h"
|
||||
#include "acinterp.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_EXECUTER
|
||||
@ -383,3 +384,180 @@ AcpiExResolveObjectToValue (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiExResolveMultiple
|
||||
*
|
||||
* PARAMETERS: WalkState - Current state (contains AML opcode)
|
||||
* Operand - Starting point for resolution
|
||||
* ReturnType - Where the object type is returned
|
||||
* ReturnDesc - Where the resolved object is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Return the base object and type. Traverse a reference list if
|
||||
* necessary to get to the base object.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExResolveMultiple (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_OPERAND_OBJECT *Operand,
|
||||
ACPI_OBJECT_TYPE *ReturnType,
|
||||
ACPI_OPERAND_OBJECT **ReturnDesc)
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *ObjDesc = (void *) Operand;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_OBJECT_TYPE Type;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("ExGetObjectType");
|
||||
|
||||
|
||||
/*
|
||||
* For reference objects created via the RefOf or Index operators,
|
||||
* we need to get to the base object (as per the ACPI specification
|
||||
* of the ObjectType and SizeOf operators). This means traversing
|
||||
* the list of possibly many nested references.
|
||||
*/
|
||||
while (ACPI_GET_OBJECT_TYPE (ObjDesc) == INTERNAL_TYPE_REFERENCE)
|
||||
{
|
||||
switch (ObjDesc->Reference.Opcode)
|
||||
{
|
||||
case AML_REF_OF_OP:
|
||||
|
||||
/* Dereference the reference pointer */
|
||||
|
||||
Node = ObjDesc->Reference.Object;
|
||||
|
||||
/* All "References" point to a NS node */
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
/* Get the attached object */
|
||||
|
||||
ObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
/* No object, use the NS node type */
|
||||
|
||||
Type = AcpiNsGetType (Node);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/* Check for circular references */
|
||||
|
||||
if (ObjDesc == Operand)
|
||||
{
|
||||
return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_INDEX_OP:
|
||||
|
||||
/* Get the type of this reference (index into another object) */
|
||||
|
||||
Type = ObjDesc->Reference.TargetType;
|
||||
if (Type != ACPI_TYPE_PACKAGE)
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* The main object is a package, we want to get the type
|
||||
* of the individual package element that is referenced by
|
||||
* the index.
|
||||
*
|
||||
* This could of course in turn be another reference object.
|
||||
*/
|
||||
ObjDesc = *(ObjDesc->Reference.Where);
|
||||
break;
|
||||
|
||||
|
||||
case AML_INT_NAMEPATH_OP:
|
||||
|
||||
/* Dereference the reference pointer */
|
||||
|
||||
Node = ObjDesc->Reference.Node;
|
||||
|
||||
/* All "References" point to a NS node */
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
/* Get the attached object */
|
||||
|
||||
ObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
/* No object, use the NS node type */
|
||||
|
||||
Type = AcpiNsGetType (Node);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/* Check for circular references */
|
||||
|
||||
if (ObjDesc == Operand)
|
||||
{
|
||||
return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_DEBUG_OP:
|
||||
|
||||
/* The Debug Object is of type "DebugObject" */
|
||||
|
||||
Type = ACPI_TYPE_DEBUG_OBJECT;
|
||||
goto Exit;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
ACPI_REPORT_ERROR (("AcpiExResolveMultiple: Unknown Reference subtype %X\n",
|
||||
ObjDesc->Reference.Opcode));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we are guaranteed to have an object that has not been created
|
||||
* via the RefOf or Index operators.
|
||||
*/
|
||||
Type = ACPI_GET_OBJECT_TYPE (ObjDesc);
|
||||
|
||||
|
||||
Exit:
|
||||
/* Convert internal types to external types */
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case INTERNAL_TYPE_REGION_FIELD:
|
||||
case INTERNAL_TYPE_BANK_FIELD:
|
||||
case INTERNAL_TYPE_INDEX_FIELD:
|
||||
|
||||
Type = ACPI_TYPE_FIELD_UNIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* No change to Type required */
|
||||
break;
|
||||
}
|
||||
|
||||
*ReturnType = Type;
|
||||
if (ReturnDesc)
|
||||
{
|
||||
*ReturnDesc = ObjDesc;
|
||||
}
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresop - AML Interpreter operand/object resolution
|
||||
* $Revision: 55 $
|
||||
* $Revision: 58 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -121,7 +121,6 @@
|
||||
#include "amlcode.h"
|
||||
#include "acparser.h"
|
||||
#include "acinterp.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_EXECUTER
|
||||
@ -433,6 +432,10 @@ AcpiExResolveOperands (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Get the resolved object */
|
||||
|
||||
ObjDesc = *StackPtr;
|
||||
|
||||
/*
|
||||
* Check the resulting object (value) type
|
||||
*/
|
||||
@ -493,21 +496,31 @@ AcpiExResolveOperands (
|
||||
/*
|
||||
* Need an operand of type ACPI_TYPE_INTEGER,
|
||||
* But we can implicitly convert from a STRING or BUFFER
|
||||
* Aka - "Implicit Source Operand Conversion"
|
||||
*/
|
||||
Status = AcpiExConvertToInteger (*StackPtr, StackPtr, WalkState);
|
||||
Status = AcpiExConvertToInteger (ObjDesc, StackPtr, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
if (Status == AE_TYPE)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Integer/String/Buffer], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (ObjDesc != *StackPtr)
|
||||
{
|
||||
/*
|
||||
* We just created a new object, remove a reference
|
||||
* on the original operand object
|
||||
*/
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
}
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
@ -516,21 +529,31 @@ AcpiExResolveOperands (
|
||||
/*
|
||||
* Need an operand of type ACPI_TYPE_BUFFER,
|
||||
* But we can implicitly convert from a STRING or INTEGER
|
||||
* Aka - "Implicit Source Operand Conversion"
|
||||
*/
|
||||
Status = AcpiExConvertToBuffer (*StackPtr, StackPtr, WalkState);
|
||||
Status = AcpiExConvertToBuffer (ObjDesc, StackPtr, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
if (Status == AE_TYPE)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Integer/String/Buffer], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (ObjDesc != *StackPtr)
|
||||
{
|
||||
/*
|
||||
* We just created a new object, remove a reference
|
||||
* on the original operand object
|
||||
*/
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
}
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
@ -539,21 +562,31 @@ AcpiExResolveOperands (
|
||||
/*
|
||||
* Need an operand of type ACPI_TYPE_STRING,
|
||||
* But we can implicitly convert from a BUFFER or INTEGER
|
||||
* Aka - "Implicit Source Operand Conversion"
|
||||
*/
|
||||
Status = AcpiExConvertToString (*StackPtr, StackPtr, 16, ACPI_UINT32_MAX, WalkState);
|
||||
Status = AcpiExConvertToString (ObjDesc, StackPtr, 16, ACPI_UINT32_MAX, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
if (Status == AE_TYPE)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Integer/String/Buffer], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (ObjDesc != *StackPtr)
|
||||
{
|
||||
/*
|
||||
* We just created a new object, remove a reference
|
||||
* on the original operand object
|
||||
*/
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
}
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
@ -561,7 +594,7 @@ AcpiExResolveOperands (
|
||||
|
||||
/* Need an operand of type INTEGER, STRING or BUFFER */
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (*StackPtr))
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_INTEGER:
|
||||
case ACPI_TYPE_STRING:
|
||||
@ -573,7 +606,7 @@ AcpiExResolveOperands (
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Integer/String/Buffer], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
@ -583,51 +616,17 @@ AcpiExResolveOperands (
|
||||
case ARGI_DATAOBJECT:
|
||||
/*
|
||||
* ARGI_DATAOBJECT is only used by the SizeOf operator.
|
||||
* Need a buffer, string, package, or Node reference.
|
||||
* Need a buffer, string, package, or RefOf reference.
|
||||
*
|
||||
* The only reference allowed here is a direct reference to
|
||||
* a namespace node.
|
||||
*/
|
||||
if (ACPI_GET_OBJECT_TYPE (*StackPtr) == INTERNAL_TYPE_REFERENCE)
|
||||
{
|
||||
if (!(*StackPtr)->Reference.Node)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Node Reference], found [%p]\n",
|
||||
*StackPtr));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
/* Get the object attached to the node */
|
||||
|
||||
TempNode = AcpiNsGetAttachedObject ((*StackPtr)->Reference.Node);
|
||||
if (!TempNode)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Node [%p] has no attached object\n",
|
||||
(*StackPtr)->Reference.Node));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Swap the reference object with the node's object. Must add
|
||||
* a reference to the node object, and remove a reference from
|
||||
* the original reference object.
|
||||
*/
|
||||
AcpiUtAddReference (TempNode);
|
||||
AcpiUtRemoveReference (*StackPtr);
|
||||
(*StackPtr) = TempNode;
|
||||
}
|
||||
|
||||
/* Need a buffer, string, package */
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (*StackPtr))
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
case INTERNAL_TYPE_REFERENCE:
|
||||
|
||||
/* Valid operand */
|
||||
break;
|
||||
@ -635,7 +634,7 @@ AcpiExResolveOperands (
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Buf/Str/Pkg], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
@ -646,7 +645,7 @@ AcpiExResolveOperands (
|
||||
|
||||
/* Need a buffer or package or (ACPI 2.0) String */
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (*StackPtr))
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
case ACPI_TYPE_STRING:
|
||||
@ -658,7 +657,7 @@ AcpiExResolveOperands (
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Buf/Str/Pkg], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (*StackPtr), *StackPtr));
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
@ -670,7 +669,7 @@ AcpiExResolveOperands (
|
||||
/* Unknown type */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Internal - Unknown ARGI type %X\n",
|
||||
"Internal - Unknown ARGI (required operand) type %X\n",
|
||||
ThisArgType));
|
||||
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstore - AML Interpreter object store support
|
||||
* $Revision: 169 $
|
||||
* $Revision: 172 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -199,7 +199,7 @@ AcpiExStore (
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*lint: -fallthrough */
|
||||
/*lint -fallthrough */
|
||||
|
||||
default:
|
||||
|
||||
@ -387,6 +387,13 @@ AcpiExStoreObjectToIndex (
|
||||
{
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
*(IndexDesc->Reference.Where) = NewDesc;
|
||||
|
||||
/* If same as the original source, add a reference */
|
||||
|
||||
if (NewDesc == SourceDesc)
|
||||
{
|
||||
AcpiUtAddReference (NewDesc);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -560,8 +567,12 @@ AcpiExStoreObjectToNode (
|
||||
* Store the new NewDesc as the new value of the Name, and set
|
||||
* the Name's type to that of the value being stored in it.
|
||||
* SourceDesc reference count is incremented by AttachObject.
|
||||
*
|
||||
* Note: This may change the type of the node if an explicit store
|
||||
* has been performed such that the node/object type has been
|
||||
* changed.
|
||||
*/
|
||||
Status = AcpiNsAttachObject (Node, NewDesc, TargetType);
|
||||
Status = AcpiNsAttachObject (Node, NewDesc, NewDesc->Common.Type);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Store %s into %s via Convert/Attach\n",
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: exstoren - AML Interpreter object store support,
|
||||
* Store to Node (namespace object)
|
||||
* $Revision: 50 $
|
||||
* $Revision: 51 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -309,6 +309,16 @@ AcpiExStoreObjectToObject (
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (SourceDesc == ActualSrcDesc)
|
||||
{
|
||||
/*
|
||||
* No conversion was performed. Return the SourceDesc as the
|
||||
* new object.
|
||||
*/
|
||||
*NewDesc = SourceDesc;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstorob - AML Interpreter object store support, store to object
|
||||
* $Revision: 44 $
|
||||
* $Revision: 45 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -182,7 +182,6 @@ AcpiExStoreBufferToBuffer (
|
||||
ACPI_MEMSET (TargetDesc->Buffer.Pointer, 0, TargetDesc->Buffer.Length);
|
||||
ACPI_MEMCPY (TargetDesc->Buffer.Pointer, Buffer, Length);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
@ -198,7 +197,6 @@ AcpiExStoreBufferToBuffer (
|
||||
/* Copy flags */
|
||||
|
||||
TargetDesc->Buffer.Flags = SourceDesc->Buffer.Flags;
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -239,16 +237,17 @@ AcpiExStoreStringToString (
|
||||
*/
|
||||
if (Length < TargetDesc->String.Length)
|
||||
{
|
||||
/* Clear old string and copy in the new one */
|
||||
|
||||
ACPI_MEMSET (TargetDesc->String.Pointer, 0, TargetDesc->String.Length);
|
||||
/*
|
||||
* String will fit in existing buffer.
|
||||
* Clear old string and copy in the new one
|
||||
*/
|
||||
ACPI_MEMSET (TargetDesc->String.Pointer, 0, TargetDesc->String.Length + 1);
|
||||
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Free the current buffer, then allocate a buffer
|
||||
* Free the current buffer, then allocate a new buffer
|
||||
* large enough to hold the value
|
||||
*/
|
||||
if (TargetDesc->String.Pointer &&
|
||||
@ -260,16 +259,18 @@ AcpiExStoreStringToString (
|
||||
ACPI_MEM_FREE (TargetDesc->String.Pointer);
|
||||
}
|
||||
|
||||
TargetDesc->String.Pointer = ACPI_MEM_ALLOCATE ((ACPI_SIZE) Length + 1);
|
||||
TargetDesc->String.Pointer = ACPI_MEM_CALLOCATE ((ACPI_SIZE) Length + 1);
|
||||
if (!TargetDesc->String.Pointer)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
TargetDesc->String.Length = Length;
|
||||
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
|
||||
}
|
||||
|
||||
/* Set the new target length */
|
||||
|
||||
TargetDesc->String.Length = Length;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 139 $
|
||||
* $Revision: 141 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -214,7 +214,7 @@ AcpiNsDumpPathname (
|
||||
Status = AcpiNsHandleToPathname (Handle, &Buffer);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s %s (Node %p)\n", Msg, Buffer.Pointer, Handle);
|
||||
AcpiOsPrintf ("%s %s (Node %p)\n", Msg, (char *) Buffer.Pointer, Handle);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
}
|
||||
|
||||
@ -370,10 +370,10 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
|
||||
AcpiOsPrintf (" ID %hd Addr %.4X Len %.4X\n",
|
||||
AcpiOsPrintf (" ID %X Len %.4X Addr %p\n",
|
||||
ObjDesc->Processor.ProcId,
|
||||
ObjDesc->Processor.Address,
|
||||
ObjDesc->Processor.Length);
|
||||
ObjDesc->Processor.Length,
|
||||
(char *) ObjDesc->Processor.Address);
|
||||
break;
|
||||
|
||||
|
||||
@ -385,8 +385,8 @@ AcpiNsDumpOneObject (
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
AcpiOsPrintf (" Args %hd Len %.4X Aml %p \n",
|
||||
ObjDesc->Method.ParamCount,
|
||||
AcpiOsPrintf (" Args %X Len %.4X Aml %p\n",
|
||||
(UINT32) ObjDesc->Method.ParamCount,
|
||||
ObjDesc->Method.AmlLength,
|
||||
ObjDesc->Method.AmlStart);
|
||||
break;
|
||||
@ -514,6 +514,11 @@ AcpiNsDumpOneObject (
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_ALIAS:
|
||||
|
||||
AcpiOsPrintf (" Target %4.4s (%p)\n", ((ACPI_NAMESPACE_NODE *) ObjDesc)->Name.Ascii, ObjDesc);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
AcpiOsPrintf (" Object %p\n", ObjDesc);
|
||||
@ -608,9 +613,9 @@ AcpiNsDumpOneObject (
|
||||
|
||||
/* If there is an attached object, display it */
|
||||
|
||||
DbgLevel = AcpiDbgLevel;
|
||||
DbgLevel = AcpiDbgLevel;
|
||||
AcpiDbgLevel = 0;
|
||||
ObjDesc = AcpiNsGetAttachedObject (ThisNode);
|
||||
ObjDesc = AcpiNsGetAttachedObject (ThisNode);
|
||||
AcpiDbgLevel = DbgLevel;
|
||||
|
||||
/* Dump attached objects */
|
||||
@ -786,7 +791,7 @@ AcpiNsDumpTables (
|
||||
* If the name space has not been initialized,
|
||||
* there is nothing to dump.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "name space not initialized!\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "namespace not initialized!\n"));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 3 $
|
||||
* $Revision: 4 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -119,7 +119,6 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acparser.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsload - namespace loading/expanding/contracting procedures
|
||||
* $Revision: 58 $
|
||||
* $Revision: 59 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -118,7 +118,6 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acnamesp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
|
||||
* parents and siblings and Scope manipulation
|
||||
* $Revision: 112 $
|
||||
* $Revision: 113 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -126,6 +126,57 @@
|
||||
ACPI_MODULE_NAME ("nsutils")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsReportError
|
||||
*
|
||||
* PARAMETERS: ModuleName - Caller's module name (for error output)
|
||||
* LineNumber - Caller's line number (for error output)
|
||||
* ComponentId - Caller's component ID (for error output)
|
||||
* Message - Error message to use on failure
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Print warning message
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiNsReportError (
|
||||
NATIVE_CHAR *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *InternalName,
|
||||
ACPI_STATUS LookupStatus)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
char *Name;
|
||||
|
||||
|
||||
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalName, NULL, &Name);
|
||||
|
||||
AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ",
|
||||
ModuleName, LineNumber);
|
||||
|
||||
if (Name)
|
||||
{
|
||||
AcpiOsPrintf ("[%s]", Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]");
|
||||
}
|
||||
|
||||
AcpiOsPrintf (" in namespace, %s\n",
|
||||
AcpiFormatException (LookupStatus));
|
||||
|
||||
if (Name)
|
||||
{
|
||||
ACPI_MEM_FREE (Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsValidRootPrefix
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psxface - Parser external interfaces
|
||||
* $Revision: 65 $
|
||||
* $Revision: 66 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -120,7 +120,6 @@
|
||||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
#include "acinterp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: rsdump - Functions to display the resource structures.
|
||||
* $Revision: 33 $
|
||||
* $Revision: 34 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -976,20 +976,25 @@ AcpiRsDumpAddress64 (
|
||||
ACPI_ADDRESS_FIXED == Address64Data->MaxAddressFixed ?
|
||||
"" : "not ");
|
||||
|
||||
AcpiOsPrintf (" Granularity: %16X\n",
|
||||
Address64Data->Granularity);
|
||||
AcpiOsPrintf (" Granularity: %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (Address64Data->Granularity),
|
||||
ACPI_LODWORD (Address64Data->Granularity));
|
||||
|
||||
AcpiOsPrintf (" Address range min: %16X\n",
|
||||
Address64Data->MinAddressRange);
|
||||
AcpiOsPrintf (" Address range min: %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (Address64Data->MinAddressRange),
|
||||
ACPI_HIDWORD (Address64Data->MinAddressRange));
|
||||
|
||||
AcpiOsPrintf (" Address range max: %16X\n",
|
||||
Address64Data->MaxAddressRange);
|
||||
AcpiOsPrintf (" Address range max: %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (Address64Data->MaxAddressRange),
|
||||
ACPI_HIDWORD (Address64Data->MaxAddressRange));
|
||||
|
||||
AcpiOsPrintf (" Address translation offset: %16X\n",
|
||||
Address64Data->AddressTranslationOffset);
|
||||
AcpiOsPrintf (" Address translation offset: %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (Address64Data->AddressTranslationOffset),
|
||||
ACPI_HIDWORD (Address64Data->AddressTranslationOffset));
|
||||
|
||||
AcpiOsPrintf (" Address Length: %16X\n",
|
||||
Address64Data->AddressLength);
|
||||
AcpiOsPrintf (" Address Length: %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (Address64Data->AddressLength),
|
||||
ACPI_HIDWORD (Address64Data->AddressLength));
|
||||
|
||||
if(0xFF != Address64Data->ResourceSource.Index)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: tbxface - Public interfaces to the ACPI subsystem
|
||||
* ACPI table oriented interfaces
|
||||
* $Revision: 58 $
|
||||
* $Revision: 59 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -192,7 +192,7 @@ AcpiLoadTables (void)
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "ACPI Tables successfully loaded\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "ACPI Tables successfully acquired\n"));
|
||||
|
||||
|
||||
/* Load the namespace from the tables */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: cmclib - Local implementation of C library functions
|
||||
* $Revision: 46 $
|
||||
* $Revision: 47 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
UINT32
|
||||
ACPI_SIZE
|
||||
AcpiUtStrlen (
|
||||
const NATIVE_CHAR *String)
|
||||
{
|
||||
@ -219,7 +219,7 @@ NATIVE_CHAR *
|
||||
AcpiUtStrncpy (
|
||||
NATIVE_CHAR *DstString,
|
||||
const NATIVE_CHAR *SrcString,
|
||||
NATIVE_UINT Count)
|
||||
ACPI_SIZE Count)
|
||||
{
|
||||
NATIVE_CHAR *String = DstString;
|
||||
|
||||
@ -257,7 +257,7 @@ AcpiUtStrncpy (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
int
|
||||
AcpiUtStrcmp (
|
||||
const NATIVE_CHAR *String1,
|
||||
const NATIVE_CHAR *String2)
|
||||
@ -294,7 +294,7 @@ int
|
||||
AcpiUtStrncmp (
|
||||
const NATIVE_CHAR *String1,
|
||||
const NATIVE_CHAR *String2,
|
||||
NATIVE_UINT Count)
|
||||
ACPI_SIZE Count)
|
||||
{
|
||||
|
||||
|
||||
@ -306,7 +306,7 @@ AcpiUtStrncmp (
|
||||
}
|
||||
}
|
||||
|
||||
return ((Count == ACPI_INTEGER_MAX) ? 0 : ((unsigned char) *String1 -
|
||||
return ((Count == ACPI_SIZE_MAX) ? 0 : ((unsigned char) *String1 -
|
||||
(unsigned char) *String2));
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ NATIVE_CHAR *
|
||||
AcpiUtStrncat (
|
||||
NATIVE_CHAR *DstString,
|
||||
const NATIVE_CHAR *SrcString,
|
||||
NATIVE_UINT Count)
|
||||
ACPI_SIZE Count)
|
||||
{
|
||||
NATIVE_CHAR *String;
|
||||
|
||||
@ -412,7 +412,7 @@ void *
|
||||
AcpiUtMemcpy (
|
||||
void *Dest,
|
||||
const void *Src,
|
||||
NATIVE_UINT Count)
|
||||
ACPI_SIZE Count)
|
||||
{
|
||||
NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
|
||||
NATIVE_CHAR *Old = (NATIVE_CHAR *) Src;
|
||||
@ -448,7 +448,7 @@ void *
|
||||
AcpiUtMemset (
|
||||
void *Dest,
|
||||
NATIVE_UINT Value,
|
||||
NATIVE_UINT Count)
|
||||
ACPI_SIZE Count)
|
||||
{
|
||||
NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utcopy - Internal to external object translation utilities
|
||||
* $Revision: 103 $
|
||||
* $Revision: 104 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -117,7 +117,6 @@
|
||||
#define __UTCOPY_C__
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acnamesp.h"
|
||||
#include "amlcode.h"
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utdebug - Debug print routines
|
||||
* $Revision: 104 $
|
||||
* $Revision: 105 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -250,7 +250,7 @@ AcpiUtDebugPrint (
|
||||
|
||||
if (ACPI_LV_THREADS & AcpiDbgLevel)
|
||||
{
|
||||
AcpiOsPrintf ("[%04lX] ", ThreadId, AcpiGbl_NestingLevel, DbgInfo->ProcName);
|
||||
AcpiOsPrintf ("[%04lX] ", ThreadId);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("[%02ld] %-22.22s: ", AcpiGbl_NestingLevel, DbgInfo->ProcName);
|
||||
@ -620,7 +620,7 @@ AcpiUtDumpBuffer (
|
||||
{
|
||||
/* Print current offset */
|
||||
|
||||
AcpiOsPrintf ("%05X ", i);
|
||||
AcpiOsPrintf ("%05X ", (UINT32) i);
|
||||
|
||||
/* Print 16 hex chars */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utinit - Common ACPI subsystem initialization
|
||||
* $Revision: 113 $
|
||||
* $Revision: 114 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -149,7 +149,7 @@ AcpiUtFadtRegisterError (
|
||||
|
||||
ACPI_REPORT_WARNING (
|
||||
("Invalid FADT value %s=%X at offset %X FADT=%p\n",
|
||||
RegisterName, Value, Offset, AcpiGbl_FADT));
|
||||
RegisterName, Value, (UINT32) Offset, AcpiGbl_FADT));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: utmisc - common utility procedures
|
||||
* $Revision: 80 $
|
||||
* $Revision: 84 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -119,8 +119,6 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acnamesp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_UTILITIES
|
||||
@ -1536,3 +1534,4 @@ AcpiUtReportInfo (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user