mirror of
https://github.com/acpica/acpica/
synced 2025-01-18 15:39:18 +03:00
Renamed some of the basic data types to ACPI*
date 99.06.09.23.32.00; author rmoore1; state Exp;
This commit is contained in:
parent
4146e5871a
commit
71de903cf0
@ -244,7 +244,7 @@ AmlDumpBuffer (size_t NumBytes)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlDumpStackEntry (OBJECT_DESCRIPTOR *EntryDesc)
|
||||
AmlDumpStackEntry (ACPI_OBJECT *EntryDesc)
|
||||
{
|
||||
char *OutString = NULL;
|
||||
UINT8 *Buf = NULL;
|
||||
@ -380,7 +380,7 @@ AmlDumpStackEntry (OBJECT_DESCRIPTOR *EntryDesc)
|
||||
EntryDesc->Package.PackageElems &&
|
||||
GetDebugLevel () > 1)
|
||||
{
|
||||
OBJECT_DESCRIPTOR **Element;
|
||||
ACPI_OBJECT **Element;
|
||||
UINT16 ElementIndex;
|
||||
|
||||
for (ElementIndex = 0, Element = EntryDesc->Package.PackageElems;
|
||||
@ -518,13 +518,13 @@ AmlDumpStackEntry (OBJECT_DESCRIPTOR *EntryDesc)
|
||||
/* !!!! POINTER STUFF COMMENTED OUT !!!! */
|
||||
|
||||
/*
|
||||
* if (PtrOffset (EntryDesc) > sizeof (OBJECT_DESCRIPTOR))
|
||||
* if (PtrOffset (EntryDesc) > sizeof (ACPI_OBJECT))
|
||||
* {
|
||||
* --EntryDesc;
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* EntryDesc = (OBJECT_DESCRIPTOR *) (((char *) EntryDesc) - PtrOffset (EntryDesc));
|
||||
* EntryDesc = (ACPI_OBJECT *) (((char *) EntryDesc) - PtrOffset (EntryDesc));
|
||||
* }
|
||||
*/
|
||||
|
||||
@ -538,9 +538,9 @@ AmlDumpStackEntry (OBJECT_DESCRIPTOR *EntryDesc)
|
||||
|
||||
/* TBD: Change to use dump object routine !! */
|
||||
|
||||
DUMP_BUFFER (EntryDesc, sizeof (OBJECT_DESCRIPTOR), 0);
|
||||
DUMP_BUFFER (++EntryDesc, sizeof (OBJECT_DESCRIPTOR), 0);
|
||||
DUMP_BUFFER (++EntryDesc, sizeof (OBJECT_DESCRIPTOR), 0);
|
||||
DUMP_BUFFER (EntryDesc, sizeof (ACPI_OBJECT), 0);
|
||||
DUMP_BUFFER (++EntryDesc, sizeof (ACPI_OBJECT), 0);
|
||||
DUMP_BUFFER (++EntryDesc, sizeof (ACPI_OBJECT), 0);
|
||||
break;
|
||||
|
||||
}
|
||||
@ -565,9 +565,9 @@ AmlDumpStackEntry (OBJECT_DESCRIPTOR *EntryDesc)
|
||||
****************************************************************************/
|
||||
|
||||
void
|
||||
AmlDumpStack (OpMode LoadExecMode, char *Ident, INT32 NumLevels, char *Note)
|
||||
AmlDumpStack (OPERATING_MODE LoadExecMode, char *Ident, INT32 NumLevels, char *Note)
|
||||
{
|
||||
OBJECT_DESCRIPTOR **EntryDesc;
|
||||
ACPI_OBJECT **EntryDesc;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AmlDumpStack");
|
||||
@ -587,7 +587,7 @@ AmlDumpStack (OpMode LoadExecMode, char *Ident, INT32 NumLevels, char *Note)
|
||||
("*******************AmlDumpStack***********************\n"));
|
||||
DEBUG_PRINT (ACPI_INFO, ("%s: %s\n", Ident, Note));
|
||||
|
||||
for (EntryDesc = (OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop] ;
|
||||
for (EntryDesc = (ACPI_OBJECT **) &ObjStack[ObjStackTop] ;
|
||||
/* exit condition at bottom of loop */ ;
|
||||
--EntryDesc, --NumLevels)
|
||||
{
|
||||
@ -608,8 +608,8 @@ AmlDumpStack (OpMode LoadExecMode, char *Ident, INT32 NumLevels, char *Note)
|
||||
* - the entire stack has been dumped.
|
||||
*/
|
||||
if ((AE_OK != AmlDumpStackEntry (*EntryDesc) &&
|
||||
(OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop] != EntryDesc) ||
|
||||
(OBJECT_DESCRIPTOR **) &ObjStack[0] == EntryDesc)
|
||||
(ACPI_OBJECT **) &ObjStack[ObjStackTop] != EntryDesc) ||
|
||||
(ACPI_OBJECT **) &ObjStack[0] == EntryDesc)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -630,7 +630,7 @@ AmlDumpStack (OpMode LoadExecMode, char *Ident, INT32 NumLevels, char *Note)
|
||||
****************************************************************************/
|
||||
|
||||
void
|
||||
AmlDumpObjectDescriptor (OBJECT_DESCRIPTOR *Object)
|
||||
AmlDumpObjectDescriptor (ACPI_OBJECT *Object)
|
||||
{
|
||||
|
||||
FUNCTION_TRACE ("AmlDumpObjectDescriptor");
|
||||
|
@ -136,9 +136,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlSetupField (OBJECT_DESCRIPTOR *ObjDesc, OBJECT_DESCRIPTOR *RgnDesc, INT32 FieldBitWidth)
|
||||
AmlSetupField (ACPI_OBJECT *ObjDesc, ACPI_OBJECT *RgnDesc, INT32 FieldBitWidth)
|
||||
{
|
||||
OBJECT_DESCRIPTOR *ObjValDesc = NULL;
|
||||
ACPI_OBJECT *ObjValDesc = NULL;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
INT32 FieldByteWidth;
|
||||
|
||||
@ -203,7 +203,7 @@ AmlSetupField (OBJECT_DESCRIPTOR *ObjDesc, OBJECT_DESCRIPTOR *RgnDesc, INT32 Fie
|
||||
/* Evaluate the Address opcode */
|
||||
|
||||
if ((Status = AmlDoOpCode (MODE_Exec)) == AE_OK &&
|
||||
(Status = AmlGetRvalue ((OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop]))
|
||||
(Status = AmlGetRvalue ((ACPI_OBJECT **) &ObjStack[ObjStackTop]))
|
||||
== AE_OK)
|
||||
{
|
||||
/* Capture the address */
|
||||
@ -232,7 +232,7 @@ AmlSetupField (OBJECT_DESCRIPTOR *ObjDesc, OBJECT_DESCRIPTOR *RgnDesc, INT32 Fie
|
||||
/* Evaluate the Length opcode */
|
||||
|
||||
if ((Status = AmlDoOpCode (MODE_Exec)) == AE_OK &&
|
||||
(Status = AmlGetRvalue ((OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop]))
|
||||
(Status = AmlGetRvalue ((ACPI_OBJECT **) &ObjStack[ObjStackTop]))
|
||||
== AE_OK)
|
||||
{
|
||||
/* Capture the length */
|
||||
@ -317,11 +317,11 @@ AmlSetupField (OBJECT_DESCRIPTOR *ObjDesc, OBJECT_DESCRIPTOR *RgnDesc, INT32 Fie
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlReadField (OBJECT_DESCRIPTOR *ObjDesc, UINT32 *Value, INT32 FieldBitWidth)
|
||||
AmlReadField (ACPI_OBJECT *ObjDesc, UINT32 *Value, INT32 FieldBitWidth)
|
||||
{
|
||||
/* ObjDesc is validated by callers */
|
||||
|
||||
OBJECT_DESCRIPTOR *RgnDesc = NULL;
|
||||
ACPI_OBJECT *RgnDesc = NULL;
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Address;
|
||||
UINT32 LocalValue = 0;
|
||||
@ -529,11 +529,11 @@ AmlReadField (OBJECT_DESCRIPTOR *ObjDesc, UINT32 *Value, INT32 FieldBitWidth)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlWriteField (OBJECT_DESCRIPTOR *ObjDesc, UINT32 Value, INT32 FieldBitWidth)
|
||||
AmlWriteField (ACPI_OBJECT *ObjDesc, UINT32 Value, INT32 FieldBitWidth)
|
||||
{
|
||||
/* ObjDesc is validated by callers */
|
||||
|
||||
OBJECT_DESCRIPTOR * RgnDesc = NULL;
|
||||
ACPI_OBJECT * RgnDesc = NULL;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT32 Address;
|
||||
INT32 FieldByteWidth;
|
||||
@ -713,9 +713,9 @@ AmlWriteField (OBJECT_DESCRIPTOR *ObjDesc, UINT32 Value, INT32 FieldBitWidth)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlAccessNamedField (INT32 Mode, NsHandle NamedField, UINT32 *Value)
|
||||
AmlAccessNamedField (INT32 Mode, ACPI_HANDLE NamedField, UINT32 *Value)
|
||||
{
|
||||
OBJECT_DESCRIPTOR *ObjDesc = NULL;
|
||||
ACPI_OBJECT *ObjDesc = NULL;
|
||||
ACPI_STATUS Status = AE_AML_ERROR;
|
||||
char *Type = NULL;
|
||||
INT32 Granularity = 0;
|
||||
@ -723,7 +723,7 @@ AmlAccessNamedField (INT32 Mode, NsHandle NamedField, UINT32 *Value)
|
||||
UINT32 Mask = 0;
|
||||
UINT32 dValue = 0;
|
||||
UINT32 OldVal = 0;
|
||||
INT32 Locked = FALSE;
|
||||
BOOLEAN Locked;
|
||||
|
||||
|
||||
|
||||
@ -823,24 +823,9 @@ AmlAccessNamedField (INT32 Mode, NsHandle NamedField, UINT32 *Value)
|
||||
|
||||
if (AE_OK == Status)
|
||||
{
|
||||
/* Check lock rule prior to modifing the field */
|
||||
|
||||
if ((UINT16) GLOCK_AlwaysLock == ObjDesc->FieldUnit.LockRule)
|
||||
{
|
||||
/* Lock Rule is Lock */
|
||||
|
||||
if (OsGetGlobalLock () != AE_OK)
|
||||
/* Get the global lock if needed */
|
||||
|
||||
/*
|
||||
* lock ownership failed: this is a single threaded implementation
|
||||
* so there is no way some other process should own this.
|
||||
* This means something grabbed the global lock and did not
|
||||
* release it.
|
||||
*/
|
||||
Status = AE_AML_ERROR;
|
||||
else
|
||||
Locked = TRUE;
|
||||
}
|
||||
Locked = AmlAcquireGlobalLock (ObjDesc->FieldUnit.LockRule);
|
||||
}
|
||||
|
||||
|
||||
@ -940,10 +925,9 @@ AmlAccessNamedField (INT32 Mode, NsHandle NamedField, UINT32 *Value)
|
||||
}
|
||||
}
|
||||
|
||||
if (Locked)
|
||||
{
|
||||
OsReleaseGlobalLock ();
|
||||
}
|
||||
/* Release global lock if we acquired it earlier */
|
||||
|
||||
AmlReleaseGlobalLock (Locked);
|
||||
|
||||
FUNCTION_EXIT;
|
||||
return Status;
|
||||
@ -964,7 +948,7 @@ AmlAccessNamedField (INT32 Mode, NsHandle NamedField, UINT32 *Value)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlSetNamedFieldValue (NsHandle NamedField, UINT32 Value)
|
||||
AmlSetNamedFieldValue (ACPI_HANDLE NamedField, UINT32 Value)
|
||||
{
|
||||
ACPI_STATUS Status = AE_AML_ERROR;
|
||||
|
||||
@ -1000,7 +984,7 @@ AmlSetNamedFieldValue (NsHandle NamedField, UINT32 Value)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlGetNamedFieldValue (NsHandle NamedField, UINT32 *Value)
|
||||
AmlGetNamedFieldValue (ACPI_HANDLE NamedField, UINT32 *Value)
|
||||
{
|
||||
ACPI_STATUS Status = AE_AML_ERROR;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -101,7 +101,6 @@
|
||||
#include <interpreter.h>
|
||||
#include <amlcode.h>
|
||||
#include <namespace.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _THIS_MODULE "isnames.c"
|
||||
#define _COMPONENT INTERPRETER
|
||||
@ -250,20 +249,16 @@ AmlAllocateNameString (INT32 PrefixCount, INT32 NumNameSegs)
|
||||
|
||||
/* Terminate string following prefixes. AmlDoSeg() will append the segment(s) */
|
||||
|
||||
*TempPtr = 0;
|
||||
|
||||
if (LstFileHandle != NO_LOG_HANDLE)
|
||||
{
|
||||
DEBUG_PRINT (TRACE_NAMES, ("AmlAllocateNameString: "));
|
||||
DEBUG_PRINT (TRACE_NAMES, ("AmlAllocateNameString: "));
|
||||
|
||||
for (TempPtr = NameString; *TempPtr; ++TempPtr)
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_NAMES, ("%02x ", *TempPtr));
|
||||
}
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_NAMES, (" %s\n", NameString));
|
||||
*TempPtr = 0;
|
||||
for (TempPtr = NameString; *TempPtr; ++TempPtr)
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_NAMES, ("%02x ", *TempPtr));
|
||||
}
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_NAMES, (" %s\n", NameString));
|
||||
|
||||
FUNCTION_EXIT;
|
||||
}
|
||||
@ -353,7 +348,7 @@ AmlDecodePackageLength (INT32 LastPkgLen)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlDoSeg (OpMode LoadExecMode)
|
||||
AmlDoSeg (OPERATING_MODE LoadExecMode)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
INT32 Index;
|
||||
@ -400,11 +395,6 @@ AmlDoSeg (OpMode LoadExecMode)
|
||||
strcat (NameString, CharBuf);
|
||||
}
|
||||
|
||||
if (fAsmFile && MODE_Load1 != LoadExecMode)
|
||||
{
|
||||
OsdPrintf (fAsmFile, " \"%s\",", CharBuf);
|
||||
}
|
||||
|
||||
DEBUG_PRINT (TRACE_NAMES, ("AmlDoSeg: %s \n", CharBuf));
|
||||
}
|
||||
|
||||
@ -462,12 +452,13 @@ AmlDoSeg (OpMode LoadExecMode)
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AmlDoName (NsType DataType, OpMode LoadExecMode)
|
||||
AmlDoName (ACPI_OBJECT_TYPE DataType, OPERATING_MODE LoadExecMode)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
INT32 NumSegments;
|
||||
INT32 PrefixCount = 0;
|
||||
UINT8 Prefix = 0;
|
||||
ACPI_HANDLE handle;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AmlDoName");
|
||||
@ -504,11 +495,6 @@ BREAKPOINT3;
|
||||
* see comment in AmlAllocateNameString()
|
||||
*/
|
||||
PrefixCount = -1;
|
||||
if (fAsmFile && MODE_Load1 != LoadExecMode)
|
||||
{
|
||||
OsdPrintf (fAsmFile, " \"%c\",", AML_RootPrefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case AML_ParentPrefix:
|
||||
@ -518,11 +504,6 @@ BREAKPOINT3;
|
||||
DEBUG_PRINT (TRACE_LOAD, ("ParentPrefix: %x\n", Prefix));
|
||||
|
||||
++PrefixCount;
|
||||
if (fAsmFile && MODE_Load1 != LoadExecMode)
|
||||
{
|
||||
OsdPrintf (fAsmFile, " \"%c\",", AML_ParentPrefix);
|
||||
}
|
||||
|
||||
} while (AmlPeekOp () == AML_ParentPrefix);
|
||||
|
||||
break;
|
||||
@ -539,11 +520,6 @@ BREAKPOINT3;
|
||||
AmlConsumeStreamBytes (1, &Prefix);
|
||||
DEBUG_PRINT (TRACE_LOAD, ("DualNamePrefix: %x\n", Prefix));
|
||||
|
||||
if (fAsmFile && MODE_Load1 != LoadExecMode)
|
||||
{
|
||||
OsdPrintf (fAsmFile, " \"%c\",", AML_DualNamePrefix);
|
||||
}
|
||||
|
||||
AmlAllocateNameString (PrefixCount, 2);
|
||||
|
||||
/* Ensure PrefixCount != 0 to remember processing a prefix */
|
||||
@ -561,11 +537,6 @@ BREAKPOINT3;
|
||||
AmlConsumeStreamBytes (1, &Prefix);
|
||||
DEBUG_PRINT (TRACE_LOAD, ("MultiNamePrefix: %x\n", Prefix));
|
||||
|
||||
if (fAsmFile && MODE_Load1 != LoadExecMode)
|
||||
{
|
||||
OsdPrintf (fAsmFile, " \"%c\",", AML_MultiNamePrefixOp);
|
||||
}
|
||||
|
||||
NumSegments = AmlPeek (); /* fetch count of segments */
|
||||
|
||||
if (AmlDoByteConst (MODE_Load, 0) != AE_OK)
|
||||
@ -604,14 +575,6 @@ BREAKPOINT3;
|
||||
}
|
||||
|
||||
AmlConsumeStreamBytes (1, NULL); /* consume NULL byte */
|
||||
|
||||
if (fAsmFile && (MODE_Load1 != LoadExecMode))
|
||||
{
|
||||
/* This is probably not the right thing to do!! */
|
||||
|
||||
OsdWrite (" \"00\",", 1, 4, fAsmFile);
|
||||
}
|
||||
|
||||
AmlAllocateNameString (PrefixCount, 0);
|
||||
break;
|
||||
|
||||
@ -628,12 +591,11 @@ BREAKPOINT3;
|
||||
|
||||
if (AE_OK == Status)
|
||||
{
|
||||
NsHandle handle;
|
||||
|
||||
/* All prefixes have been handled, and the name is in NameString */
|
||||
|
||||
DeleteObject ((OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop]);
|
||||
Status = NsEnter (NameString, DataType, LoadExecMode, &ObjStack[ObjStackTop]);
|
||||
LocalDeleteObject ((ACPI_OBJECT **) &ObjStack[ObjStackTop]);
|
||||
Status = NsEnter (NameString, DataType, LoadExecMode,
|
||||
(NAME_TABLE_ENTRY **) &ObjStack[ObjStackTop]);
|
||||
|
||||
/* Help view ObjStack during debugging */
|
||||
|
||||
@ -666,7 +628,7 @@ BREAKPOINT3;
|
||||
* The arg count is in the MethodFlags, which is the first
|
||||
* byte of the Method's AML.
|
||||
*/
|
||||
meth *MethodPtr = (meth *) NsGetValue (ObjStack[ObjStackTop]);
|
||||
METHOD_INFO *MethodPtr = (METHOD_INFO *) NsGetValue (ObjStack[ObjStackTop]);
|
||||
|
||||
if (MethodPtr)
|
||||
{
|
||||
@ -713,7 +675,7 @@ BREAKPOINT3;
|
||||
*/
|
||||
if (MODE_Exec == LoadExecMode)
|
||||
{
|
||||
Status = AmlGetRvalue ((OBJECT_DESCRIPTOR **)
|
||||
Status = AmlGetRvalue ((ACPI_OBJECT **)
|
||||
&ObjStack[ObjStackTop]);
|
||||
}
|
||||
|
||||
@ -730,12 +692,12 @@ BREAKPOINT3;
|
||||
/* execution mode */
|
||||
/* Mark end of arg list */
|
||||
|
||||
DeleteObject ((OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop]);
|
||||
LocalDeleteObject ((ACPI_OBJECT **) &ObjStack[ObjStackTop]);
|
||||
ObjStack[ObjStackTop] = NULL;
|
||||
|
||||
/* Establish Method's scope as current */
|
||||
|
||||
NsPushMethodScope ((NsHandle) ObjStack[StackBeforeArgs]);
|
||||
NsPushMethodScope ((ACPI_HANDLE) ObjStack[StackBeforeArgs]);
|
||||
|
||||
DEBUG_PRINT (TRACE_LOAD,
|
||||
("Calling %4.4s, StackBeforeArgs %d ObjStackTop %d\n",
|
||||
@ -746,7 +708,7 @@ BREAKPOINT3;
|
||||
|
||||
Status = AmlExecuteMethod (
|
||||
MethodPtr->Offset + 1, MethodPtr->Length - 1,
|
||||
(OBJECT_DESCRIPTOR **)&ObjStack[StackBeforeArgs + 1]);
|
||||
(ACPI_OBJECT **)&ObjStack[StackBeforeArgs + 1]);
|
||||
|
||||
DEBUG_PRINT (TRACE_LOAD,
|
||||
("AmlExec Status=%s, StackBeforeArgs %d ObjStackTop %d\n",
|
||||
@ -758,7 +720,7 @@ BREAKPOINT3;
|
||||
|
||||
if (StackBeforeArgs < ObjStackTop)
|
||||
{
|
||||
DeleteObject ((OBJECT_DESCRIPTOR **) &ObjStack[StackBeforeArgs]);
|
||||
LocalDeleteObject ((ACPI_OBJECT **) &ObjStack[StackBeforeArgs]);
|
||||
ObjStack[StackBeforeArgs] = ObjStack[ObjStackTop--];
|
||||
}
|
||||
|
||||
@ -775,7 +737,7 @@ BREAKPOINT3;
|
||||
|
||||
while (ObjStackTop > StackBeforeArgs)
|
||||
{
|
||||
DeleteObject ((OBJECT_DESCRIPTOR **) &ObjStack[ObjStackTop]);
|
||||
LocalDeleteObject ((ACPI_OBJECT **) &ObjStack[ObjStackTop]);
|
||||
|
||||
/* Zero out the slot and move on */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user