merging acpica-20080609 into trunk, changes some types in os code

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26181 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-06-30 21:06:24 +00:00
parent d5157b61d2
commit 45e9de08d5
125 changed files with 941 additions and 1011 deletions

View File

@ -187,9 +187,9 @@ SEARCH on [ FGristFiles $(namespace_src) ] = [ FDirName $(HAIKU_TOP) src add-on
SEARCH on [ FGristFiles $(resources_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi resources ] ;
SEARCH on [ FGristFiles $(tables_src) tbutils.c ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi tables ] ;
SEARCH on [ FGristFiles $(utilities_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi utilities ] ;
SEARCH on [ FGristFiles $(dispatcher_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi interpreter dispatcher ] ;
SEARCH on [ FGristFiles $(executer_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi interpreter executer ] ;
SEARCH on [ FGristFiles $(parser_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi interpreter parser ] ;
SEARCH on [ FGristFiles $(dispatcher_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi dispatcher ] ;
SEARCH on [ FGristFiles $(executer_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi executer ] ;
SEARCH on [ FGristFiles $(parser_src) ] = [ FDirName $(HAIKU_TOP) src add-ons kernel bus_managers acpi parser ] ;
KernelAddon acpi :
oshaiku.c

View File

@ -201,7 +201,7 @@ AfWriteBuffer (
char *
AfGenerateFilename (char *TableId)
{
ACPI_NATIVE_UINT i;
UINT16 i;
for (i = 0; i < 8 && TableId[i] != ' ' && TableId[i] != 0; i++)

View File

@ -146,8 +146,8 @@ AdGenerateFilename (
char *Prefix,
char *TableId)
{
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
UINT32 i;
UINT32 j;
for (i = 0; Prefix[i]; i++)
@ -183,7 +183,7 @@ AdGenerateFilename (
*
******************************************************************************/
ACPI_NATIVE_INT
INT32
AdWriteBuffer (
char *Filename,
char *Buffer,
@ -202,7 +202,7 @@ AdWriteBuffer (
Actual = fwrite (Buffer, (size_t) Length, 1, fp);
fclose (fp);
return ((ACPI_NATIVE_INT) Actual);
return ((INT32) Actual);
}

View File

@ -179,7 +179,7 @@ AcpiDsMethodError (
ACPI_STATUS
AcpiNsLoadTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node)
{
return (AE_NOT_IMPLEMENTED);
@ -665,7 +665,30 @@ AdCreateTableHeader (
AcpiOsPrintf (" *\n * Original Table Header:\n");
AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature);
AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length);
AcpiOsPrintf (" * Revision 0x%2.2X\n", Table->Revision);
/* Print and validate the revision */
AcpiOsPrintf (" * Revision 0x%2.2X", Table->Revision);
switch (Table->Revision)
{
case 0:
AcpiOsPrintf (" **** Invalid Revision");
break;
case 1:
/* Revision of DSDT controls the ACPI integer width */
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
{
AcpiOsPrintf (" **** ACPI 1.0, no 64-bit math support");
}
break;
default:
break;
}
AcpiOsPrintf ("\n");
/* Print and validate the table checksum */
@ -980,7 +1003,7 @@ AdGetLocalTables (
ACPI_TABLE_HEADER *NewTable;
UINT32 NumTables;
UINT32 PointerSize;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
if (GetAllTables)
@ -1087,7 +1110,7 @@ AdParseTable (
ACPI_WALK_STATE *WalkState;
UINT8 *AmlStart;
UINT32 AmlLength;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
if (!Table)
@ -1139,7 +1162,7 @@ AdParseTable (
if (LoadTable)
{
Status = AcpiTbStoreTable ((ACPI_NATIVE_UINT) Table, Table,
Status = AcpiTbStoreTable ((ACPI_PHYSICAL_ADDRESS) Table, Table,
Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex);
if (ACPI_FAILURE (Status))
{

View File

@ -151,6 +151,7 @@ static const char *AcpiDmDmarSubnames[] =
{
"Hardware Unit Definition",
"Reserved Memory Region",
"Root Port ATS Capability",
"Unknown SubTable Type" /* Reserved */
};

View File

@ -295,10 +295,10 @@ AcpiDmDumpAsf (
ACPI_DMTABLE_INFO *InfoTable;
ACPI_DMTABLE_INFO *DataInfoTable = NULL;
UINT8 *DataTable = NULL;
ACPI_NATIVE_UINT DataCount = 0;
ACPI_NATIVE_UINT DataLength = 0;
ACPI_NATIVE_UINT DataOffset = 0;
ACPI_NATIVE_UINT i;
UINT32 DataCount = 0;
UINT32 DataLength = 0;
UINT32 DataOffset = 0;
UINT32 i;
/* No main table, only sub-tables */
@ -536,6 +536,10 @@ AcpiDmDumpDmar (
InfoTable = AcpiDmTableInfoDmar1;
ScopeOffset = sizeof (ACPI_DMAR_RESERVED_MEMORY);
break;
case ACPI_DMAR_TYPE_ATSR:
InfoTable = AcpiDmTableInfoDmar2;
ScopeOffset = sizeof (ACPI_DMAR_TYPE_ATSR);
break;
default:
AcpiOsPrintf ("\n**** Unknown DMAR sub-table type %X\n\n", SubTable->Type);
return;
@ -548,49 +552,42 @@ AcpiDmDumpDmar (
return;
}
/*
* Currently, a common flag indicates whether there are any
* device scope entries present at the end of the subtable.
*/
if ((SubTable->Flags & ACPI_DMAR_INCLUDE_ALL) == 0)
/* Dump the device scope entries (if any) */
ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset);
while (ScopeOffset < SubTable->Length)
{
/* Dump the device scope entries */
ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset);
while (ScopeOffset < SubTable->Length)
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable,
ScopeTable->Length, AcpiDmTableInfoDmarScope);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("\n");
Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable,
ScopeTable->Length, AcpiDmTableInfoDmarScope);
if (ACPI_FAILURE (Status))
{
return;
}
/* Dump the PCI Path entries for this device scope */
PathOffset = sizeof (ACPI_DMAR_DEVICE_SCOPE); /* Path entries start at this offset */
PciPath = ACPI_ADD_PTR (UINT8, ScopeTable,
sizeof (ACPI_DMAR_DEVICE_SCOPE));
while (PathOffset < ScopeTable->Length)
{
AcpiDmLineHeader ((PathOffset + ScopeOffset + Offset), 2, "PCI Path");
AcpiOsPrintf ("[%2.2X, %2.2X]\n", PciPath[0], PciPath[1]);
/* Point to next PCI Path entry */
PathOffset += 2;
PciPath += 2;
}
/* Point to next device scope entry */
ScopeOffset += ScopeTable->Length;
ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE,
ScopeTable, ScopeTable->Length);
return;
}
/* Dump the PCI Path entries for this device scope */
PathOffset = sizeof (ACPI_DMAR_DEVICE_SCOPE); /* Path entries start at this offset */
PciPath = ACPI_ADD_PTR (UINT8, ScopeTable,
sizeof (ACPI_DMAR_DEVICE_SCOPE));
while (PathOffset < ScopeTable->Length)
{
AcpiDmLineHeader ((PathOffset + ScopeOffset + Offset), 2, "PCI Path");
AcpiOsPrintf ("[%2.2X, %2.2X]\n", PciPath[0], PciPath[1]);
/* Point to next PCI Path entry */
PathOffset += 2;
PciPath += 2;
}
/* Point to next device scope entry */
ScopeOffset += ScopeTable->Length;
ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE,
ScopeTable, ScopeTable->Length);
}
/* Point to next sub-table */

View File

@ -162,6 +162,7 @@
#define ACPI_DMARS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
#define ACPI_DMAR0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
#define ACPI_DMAR1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
#define ACPI_DMAR2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
#define ACPI_EINJ0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
#define ACPI_HEST9_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
#define ACPI_HESTN_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
@ -576,6 +577,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[] =
{
{ACPI_DMT_UINT8, ACPI_DMAR_OFFSET (Width), "Host Address Width"},
{ACPI_DMT_UINT8, ACPI_DMAR_OFFSET (Flags), "Flags"},
{ACPI_DMT_EXIT, 0, NULL}
};
@ -585,8 +587,6 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[] =
{
{ACPI_DMT_DMAR, ACPI_DMAR0_OFFSET (Header.Type), "Subtable Type"},
{ACPI_DMT_UINT16, ACPI_DMAR0_OFFSET (Header.Length), "Length"},
{ACPI_DMT_UINT8, ACPI_DMAR0_OFFSET (Header.Flags), "Flags"},
{ACPI_DMT_UINT24, ACPI_DMAR0_OFFSET (Header.Reserved[0]), "Reserved"},
{ACPI_DMT_EXIT, 0, NULL}
};
@ -596,7 +596,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[] =
{
{ACPI_DMT_UINT8, ACPI_DMARS_OFFSET (EntryType), "Device Scope Entry Type"},
{ACPI_DMT_UINT8, ACPI_DMARS_OFFSET (Length), "Entry Length"},
{ACPI_DMT_UINT8, ACPI_DMARS_OFFSET (Segment), "PCI Segment Number"},
{ACPI_DMT_UINT16, ACPI_DMARS_OFFSET (Reserved), "Reserved"},
{ACPI_DMT_UINT8, ACPI_DMARS_OFFSET (EnumerationId), "Enumeration ID"},
{ACPI_DMT_UINT8, ACPI_DMARS_OFFSET (Bus), "PCI Bus Number"},
{ACPI_DMT_EXIT, 0, NULL}
};
@ -607,19 +608,34 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[] =
{
{ACPI_DMT_UINT8, ACPI_DMAR0_OFFSET (Flags), "Flags"},
{ACPI_DMT_UINT8, ACPI_DMAR0_OFFSET (Reserved), "Reserved"},
{ACPI_DMT_UINT16, ACPI_DMAR0_OFFSET (Segment), "PCI Segment Number"},
{ACPI_DMT_UINT64, ACPI_DMAR0_OFFSET (Address), "Register Base Address"},
{ACPI_DMT_EXIT, 0, NULL}
};
/* 1: Reserved Memory Defininition */
/* 1: Reserved Memory Definition */
ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[] =
{
{ACPI_DMT_UINT64, ACPI_DMAR1_OFFSET (Address), "Base Address"},
{ACPI_DMT_UINT16, ACPI_DMAR1_OFFSET (Reserved), "Reserved"},
{ACPI_DMT_UINT16, ACPI_DMAR1_OFFSET (Segment), "PCI Segment Number"},
{ACPI_DMT_UINT64, ACPI_DMAR1_OFFSET (BaseAddress), "Base Address"},
{ACPI_DMT_UINT64, ACPI_DMAR1_OFFSET (EndAddress), "End Address (limit)"},
{ACPI_DMT_EXIT, 0, NULL}
};
/* 2: Root Port ATS Capability Definition */
ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[] =
{
{ACPI_DMT_UINT8, ACPI_DMAR2_OFFSET (Flags), "Flags"},
{ACPI_DMT_UINT8, ACPI_DMAR2_OFFSET (Reserved), "Reserved"},
{ACPI_DMT_UINT16, ACPI_DMAR2_OFFSET (Segment), "PCI Segment Number"},
{ACPI_DMT_EXIT, 0, NULL}
};
/*******************************************************************************
*
@ -1034,7 +1050,6 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[] =
{ACPI_DMT_UINT16, ACPI_SRAT1_OFFSET (Reserved), "Reserved"},
{ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (BaseAddress), "Base Address"},
{ACPI_DMT_UINT64, ACPI_SRAT1_OFFSET (Length), "Address Length"},
{ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (MemoryType), "Memory Type"},
{ACPI_DMT_UINT32, ACPI_SRAT1_OFFSET (Flags), "Flags (decoded below)"},
{ACPI_DMT_FLAG0, ACPI_SRAT1_FLAG_OFFSET (Flags,0), "Enabled"},
{ACPI_DMT_FLAG1, ACPI_SRAT1_FLAG_OFFSET (Flags,0), "Hot Pluggable"},

View File

@ -31,42 +31,42 @@ SRCS= aslcompilerparse.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
../namespace/nsutils.c \
../namespace/nswalk.c \
../namespace/nsxfobj.c \
../interpreter/parser/psargs.c \
../interpreter/parser/psloop.c \
../interpreter/parser/psopcode.c \
../interpreter/parser/psparse.c \
../interpreter/parser/psscope.c \
../interpreter/parser/pstree.c \
../interpreter/parser/psutils.c \
../interpreter/parser/pswalk.c \
../interpreter/dispatcher/dswscope.c \
../interpreter/dispatcher/dswstate.c \
../interpreter/dispatcher/dsfield.c \
../interpreter/dispatcher/dsobject.c \
../interpreter/dispatcher/dsopcode.c \
../interpreter/dispatcher/dsutils.c \
../interpreter/dispatcher/dswexec.c \
../interpreter/dispatcher/dswload.c \
../interpreter/executer/exconvrt.c \
../interpreter/executer/excreate.c \
../interpreter/executer/exdump.c \
../interpreter/executer/exmisc.c \
../interpreter/executer/exmutex.c \
../interpreter/executer/exnames.c \
../interpreter/executer/exoparg1.c \
../interpreter/executer/exoparg2.c \
../interpreter/executer/exoparg3.c \
../interpreter/executer/exoparg6.c \
../interpreter/executer/exprep.c \
../interpreter/executer/exregion.c \
../interpreter/executer/exresnte.c \
../interpreter/executer/exresolv.c \
../interpreter/executer/exresop.c \
../interpreter/executer/exstore.c \
../interpreter/executer/exstoren.c \
../interpreter/executer/exstorob.c \
../interpreter/executer/exsystem.c \
../interpreter/executer/exutils.c \
../parser/psargs.c \
../parser/psloop.c \
../parser/psopcode.c \
../parser/psparse.c \
../parser/psscope.c \
../parser/pstree.c \
../parser/psutils.c \
../parser/pswalk.c \
../dispatcher/dswscope.c \
../dispatcher/dswstate.c \
../dispatcher/dsfield.c \
../dispatcher/dsobject.c \
../dispatcher/dsopcode.c \
../dispatcher/dsutils.c \
../dispatcher/dswexec.c \
../dispatcher/dswload.c \
../executer/exconvrt.c \
../executer/excreate.c \
../executer/exdump.c \
../executer/exmisc.c \
../executer/exmutex.c \
../executer/exnames.c \
../executer/exoparg1.c \
../executer/exoparg2.c \
../executer/exoparg3.c \
../executer/exoparg6.c \
../executer/exprep.c \
../executer/exregion.c \
../executer/exresnte.c \
../executer/exresolv.c \
../executer/exresop.c \
../executer/exstore.c \
../executer/exstoren.c \
../executer/exstorob.c \
../executer/exsystem.c \
../executer/exutils.c \
../common/adfile.c \
../common/adisasm.c \
../common/adwalk.c \

View File

@ -328,7 +328,7 @@ AslCommandLine (
char **argv)
{
BOOLEAN BadCommandLine = FALSE;
ACPI_NATIVE_INT j;
int j;
/* Minimum command line contains at least one option or an input file */

View File

@ -546,7 +546,7 @@ OpcDoEisaId (
UINT32 BigEndianId;
char *InString;
ACPI_STATUS Status = AE_OK;
ACPI_NATIVE_UINT i;
UINT32 i;
InString = (char *) Op->Asl.Value.String;
@ -642,7 +642,7 @@ OpcDoUuId (
char *InString;
char *Buffer;
ACPI_STATUS Status = AE_OK;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_PARSE_OBJECT *NewOp;

View File

@ -948,7 +948,7 @@ OpnDoDefinitionBlock (
{
ACPI_PARSE_OBJECT *Child;
ACPI_SIZE Length;
ACPI_NATIVE_UINT i;
UINT32 i;
char *Filename;

View File

@ -288,9 +288,9 @@ OptBuildShortestPath (
{
UINT32 NumCommonSegments;
UINT32 MaxCommonSegments;
ACPI_NATIVE_UINT Index;
UINT32 Index;
UINT32 NumCarats;
ACPI_NATIVE_UINT i;
UINT32 i;
char *NewPath;
char *NewPathExternal;
ACPI_NAMESPACE_NODE *Node;

View File

@ -275,7 +275,7 @@ AcpiTbFindTable (
char *Signature,
char *OemId,
char *OemTableId,
ACPI_NATIVE_UINT *TableIndex)
UINT32 *TableIndex)
{
return (AE_SUPPORT);
}

View File

@ -536,7 +536,7 @@ UtDisplaySummary (
if ((Gbl_ExceptionCount[ASL_ERROR] == 0) || (Gbl_IgnoreErrors))
{
FlPrintFile (FileId,
"AML Output: %s - %d bytes %d named objects %d executable opcodes\n\n",
"AML Output: %s - %d bytes, %d named objects, %d executable opcodes\n\n",
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename, Gbl_TableLength,
TotalNamedObjects, TotalExecutableOpcodes);
}

View File

@ -433,7 +433,7 @@ void
AcpiDbDisplayTableInfo (
char *TableArg)
{
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_TABLE_DESC *TableDesc;

View File

@ -685,7 +685,7 @@ AcpiDbDisplayObjectType (
ACPI_BUFFER Buffer;
ACPI_DEVICE_INFO *Info;
ACPI_STATUS Status;
ACPI_NATIVE_UINT i;
UINT32 i;
Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
@ -707,7 +707,7 @@ AcpiDbDisplayObjectType (
{
for (i = 0; i < Info->CompatibilityId.Count; i++)
{
AcpiOsPrintf ("CID #%d: %s\n", (UINT32) i,
AcpiOsPrintf ("CID #%d: %s\n", i,
Info->CompatibilityId.Id[i].Value);
}
}

View File

@ -512,12 +512,12 @@ AcpiDbMethodThread (
if (Info->InitArgs)
{
AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
AcpiDbUInt32ToHexString (AcpiOsGetThreadId (), Info->IdOfThreadStr);
AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
}
if (Info->Threads && (Info->NumCreated < Info->NumThreads))
{
Info->Threads[Info->NumCreated++] = AcpiOsGetThreadId();
Info->Threads[Info->NumCreated++] = (UINT32) AcpiOsGetThreadId();
}
for (i = 0; i < Info->NumLoops; i++)

View File

@ -118,7 +118,10 @@
#include "acpi.h"
#include "acdebug.h"
#ifdef ACPI_APPLICATION
#include "actables.h"
#endif
#if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)

View File

@ -210,7 +210,7 @@ void
AcpiDbDisplayHistory (
void)
{
ACPI_NATIVE_UINT i;
UINT32 i;
UINT16 HistoryIndex;
@ -249,7 +249,7 @@ char *
AcpiDbGetFromHistory (
char *CommandNumArg)
{
ACPI_NATIVE_UINT i;
UINT32 i;
UINT16 HistoryIndex;
UINT32 CmdNum;

View File

@ -299,7 +299,7 @@ AcpiDbDumpExternalObject (
case ACPI_TYPE_LOCAL_REFERENCE:
AcpiOsPrintf ("[Object Reference] = ", ObjDesc->Reference.Handle);
AcpiOsPrintf ("[Object Reference] = ");
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
break;

View File

@ -282,7 +282,7 @@ AcpiDmIsUnicodeBuffer (
UINT32 WordCount;
ACPI_PARSE_OBJECT *SizeOp;
ACPI_PARSE_OBJECT *NextOp;
ACPI_NATIVE_UINT i;
UINT32 i;
/* Buffer size is the buffer argument */
@ -320,7 +320,7 @@ AcpiDmIsUnicodeBuffer (
for (i = 0; i < (ByteCount - 2); i += 2)
{
if ((!ACPI_IS_PRINT (ByteData[i])) ||
(ByteData[i + 1] != 0))
(ByteData[(ACPI_SIZE) i + 1] != 0))
{
return (FALSE);
}
@ -441,54 +441,37 @@ AcpiDmUnicode (
/*******************************************************************************
*
* FUNCTION: AcpiDmIsEisaId
* FUNCTION: AcpiDmIsEisaIdElement
*
* PARAMETERS: Op - Op to be examined
*
* RETURN: None
*
* DESCRIPTION: Determine if an Op can be converted to an EisaId.
* DESCRIPTION: Determine if an Op (argument to _HID or _CID) can be converted
* to an EISA ID.
*
******************************************************************************/
void
AcpiDmIsEisaId (
AcpiDmIsEisaIdElement (
ACPI_PARSE_OBJECT *Op)
{
UINT32 Name;
UINT32 BigEndianId;
ACPI_PARSE_OBJECT *NextOp;
ACPI_NATIVE_UINT i;
UINT32 Prefix[3];
UINT32 i;
/* Get the NameSegment */
Name = AcpiPsGetName (Op);
if (!Name)
{
return;
}
/* We are looking for _HID */
if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
{
return;
}
/* The parameter must be either a word or a dword */
NextOp = AcpiPsGetDepthNext (NULL, Op);
if ((NextOp->Common.AmlOpcode != AML_DWORD_OP) &&
(NextOp->Common.AmlOpcode != AML_WORD_OP))
if ((Op->Common.AmlOpcode != AML_DWORD_OP) &&
(Op->Common.AmlOpcode != AML_WORD_OP))
{
return;
}
/* Swap from little-endian to big-endian to simplify conversion */
BigEndianId = AcpiUtDwordByteSwap ((UINT32) NextOp->Common.Value.Integer);
BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer);
/* Create the 3 leading ASCII letters */
@ -509,7 +492,79 @@ AcpiDmIsEisaId (
/* OK - mark this node as convertable to an EISA ID */
NextOp->Common.DisasmOpcode = ACPI_DASM_EISAID;
Op->Common.DisasmOpcode = ACPI_DASM_EISAID;
}
/*******************************************************************************
*
* FUNCTION: AcpiDmIsEisaId
*
* PARAMETERS: Op - Op to be examined
*
* RETURN: None
*
* DESCRIPTION: Determine if a Name() Op can be converted to an EisaId.
*
******************************************************************************/
void
AcpiDmIsEisaId (
ACPI_PARSE_OBJECT *Op)
{
UINT32 Name;
ACPI_PARSE_OBJECT *NextOp;
/* Get the NameSegment */
Name = AcpiPsGetName (Op);
if (!Name)
{
return;
}
NextOp = AcpiPsGetDepthNext (NULL, Op);
if (!NextOp)
{
return;
}
/* Check for _HID - has one argument */
if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
{
AcpiDmIsEisaIdElement (NextOp);
return;
}
/* Exit if not _CID */
if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID))
{
return;
}
/* _CID can contain a single argument or a package */
if (NextOp->Common.AmlOpcode != AML_PACKAGE_OP)
{
AcpiDmIsEisaIdElement (NextOp);
return;
}
/* _CID with Package: get the package length */
NextOp = AcpiPsGetDepthNext (NULL, NextOp);
/* Don't need to use the length, just walk the peer list */
NextOp = NextOp->Common.Next;
while (NextOp)
{
AcpiDmIsEisaIdElement (NextOp);
NextOp = NextOp->Common.Next;
}
}

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
* $Revision: 1.18 $
* $Revision: 1.19 $
*
******************************************************************************/
@ -150,16 +150,20 @@ AcpiDmDisplayPath (
UINT32
AcpiDmDumpName (
char *Name)
UINT32 Name)
{
UINT32 i;
UINT32 Length;
char NewName[4];
/* Copy name locally in case the original name is not writeable */
*(UINT32 *) NewName = Name;
/* Ensure that the name is printable, even if we have to fix it */
*(UINT32 *) NewName = AcpiUtRepairName (Name);
AcpiUtRepairName (NewName);
/* Remove all trailing underscores from the name */
@ -327,7 +331,7 @@ AcpiDmNamestring (
{
/* Append Name segment */
AcpiDmDumpName ((char *) Name);
AcpiDmDumpName (*ACPI_CAST_PTR (UINT32, Name));
SegCount--;
if (SegCount)

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmopcode - AML disassembler, specific AML opcodes
* $Revision: 1.105 $
* $Revision: 1.106 $
*
******************************************************************************/
@ -549,7 +549,7 @@ AcpiDmDisassembleOneOp (
case AML_INT_NAMEDFIELD_OP:
Length = AcpiDmDumpName ((char *) &Op->Named.Name);
Length = AcpiDmDumpName (Op->Named.Name);
AcpiOsPrintf (",%*.s %d", (int) (5 - Length), " ",
(UINT32) Op->Common.Value.Integer);
AcpiDmCommaIfFieldMember (Op);

View File

@ -133,7 +133,7 @@ void (*ACPI_RESOURCE_HANDLER) (
UINT32 Length,
UINT32 Level);
static ACPI_RESOURCE_HANDLER AcpiGbl_DumpResourceDispatch [] =
static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] =
{
/* Small descriptors */
@ -325,7 +325,7 @@ AcpiDmResourceTemplate (
UINT32 ByteCount)
{
ACPI_STATUS Status;
ACPI_NATIVE_UINT CurrentByteOffset;
UINT32 CurrentByteOffset;
UINT8 ResourceType;
UINT32 ResourceLength;
void *Aml;
@ -343,7 +343,7 @@ AcpiDmResourceTemplate (
Node = Node->Child;
}
for (CurrentByteOffset = 0; CurrentByteOffset < ByteCount; )
for (CurrentByteOffset = 0; CurrentByteOffset < ByteCount;)
{
Aml = &ByteData[CurrentByteOffset];
@ -423,7 +423,7 @@ AcpiDmResourceTemplate (
Node = Node->Peer;
}
AcpiGbl_DumpResourceDispatch [ResourceIndex] (
AcpiGbl_DmResourceDispatch [ResourceIndex] (
Aml, ResourceLength, Level);
/* Descriptor post-processing */

View File

@ -215,7 +215,7 @@ AcpiDmMemoryFields (
UINT8 Type,
UINT32 Level)
{
ACPI_NATIVE_UINT i;
UINT32 i;
for (i = 0; i < 4; i++)
@ -261,7 +261,7 @@ AcpiDmAddressFields (
UINT8 Type,
UINT32 Level)
{
ACPI_NATIVE_UINT i;
UINT32 i;
AcpiOsPrintf ("\n");

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmwalk - AML disassembly tree walk
* $Revision: 1.34 $
* $Revision: 1.35 $
*
******************************************************************************/
@ -622,7 +622,7 @@ AcpiDmDescendingOp (
}
else
{
AcpiDmDumpName ((char *) &Name);
AcpiDmDumpName (Name);
}
if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)

View File

@ -561,11 +561,6 @@ AcpiDsInitFieldObjects (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
if (!Arg)
{
return_ACPI_STATUS (AE_AML_NO_OPERAND);
}
/* Creating new namespace node(s), should not already exist */
Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
@ -580,6 +575,7 @@ AcpiDsInitFieldObjects (
/*
* Walk the list of entries in the FieldList
* Note: FieldList can be of zero length. In this case, Arg will be NULL.
*/
while (Arg)
{

View File

@ -241,7 +241,7 @@ AcpiDsInitOneObject (
ACPI_STATUS
AcpiDsInitializeObjects (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_STATUS Status;

View File

@ -486,7 +486,6 @@ AcpiDsCallControlMethod (
}
Info->Parameters = &ThisWalkState->Operands[0];
Info->ParameterType = ACPI_PARAM_ARGS;
Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,

View File

@ -459,7 +459,7 @@ AcpiDsBuildInternalPackageObj (
ACPI_PARSE_OBJECT *Parent;
ACPI_OPERAND_OBJECT *ObjDesc = NULL;
ACPI_STATUS Status = AE_OK;
ACPI_NATIVE_UINT i;
UINT32 i;
UINT16 Index;
UINT16 ReferenceCount;

View File

@ -826,11 +826,6 @@ AcpiDsEvalBufferFieldOperands (
Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
ACPI_WALK_OPERANDS, WalkState);
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
WalkState->NumOperands, "after AcpiExResolveOperands");
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO, "(%s) bad operand(s) (%X)",
@ -922,10 +917,6 @@ AcpiDsEvalRegionOperands (
return_ACPI_STATUS (Status);
}
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
1, "after AcpiExResolveOperands");
ObjDesc = AcpiNsGetAttachedObject (Node);
if (!ObjDesc)
{
@ -988,7 +979,7 @@ AcpiDsEvalTableRegionOperands (
ACPI_OPERAND_OBJECT **Operand;
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *NextOp;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
ACPI_TABLE_HEADER *Table;
@ -1026,10 +1017,6 @@ AcpiDsEvalTableRegionOperands (
return_ACPI_STATUS (Status);
}
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
1, "after AcpiExResolveOperands");
Operand = &WalkState->Operands[0];
/* Find the ACPI table */
@ -1247,10 +1234,8 @@ AcpiDsEvalBankFieldOperands (
return_ACPI_STATUS (Status);
}
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
1, "after AcpiExResolveOperands");
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS,
AcpiPsGetOpcodeName (Op->Common.AmlOpcode), 1);
/*
* Get the BankValue operand and save it
* (at Top of stack)

View File

@ -515,12 +515,6 @@ AcpiDsExecEndOp (
Status = AcpiExResolveOperands (WalkState->Opcode,
&(WalkState->Operands [WalkState->NumOperands -1]),
WalkState);
if (ACPI_SUCCESS (Status))
{
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
AcpiPsGetOpcodeName (WalkState->Opcode),
WalkState->NumOperands, "after ExResolveOperands");
}
}
if (ACPI_SUCCESS (Status))

View File

@ -154,7 +154,7 @@ AcpiDsResultPop (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState)
{
ACPI_NATIVE_UINT Index;
UINT32 Index;
ACPI_GENERIC_STATE *State;
ACPI_STATUS Status;
@ -212,7 +212,7 @@ AcpiDsResultPop (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Obj=%p [%s] Index=%X State=%p Num=%X\n", *Object,
AcpiUtGetObjectTypeName (*Object),
(UINT32) Index, WalkState, WalkState->ResultCount));
Index, WalkState, WalkState->ResultCount));
return (AE_OK);
}
@ -238,7 +238,7 @@ AcpiDsResultPush (
{
ACPI_GENERIC_STATE *State;
ACPI_STATUS Status;
ACPI_NATIVE_UINT Index;
UINT32 Index;
ACPI_FUNCTION_NAME (DsResultPush);
@ -517,7 +517,7 @@ AcpiDsObjStackPopAndDelete (
UINT32 PopCount,
ACPI_WALK_STATE *WalkState)
{
ACPI_NATIVE_INT i;
INT32 i;
ACPI_OPERAND_OBJECT *ObjDesc;
@ -529,7 +529,7 @@ AcpiDsObjStackPopAndDelete (
return;
}
for (i = (ACPI_NATIVE_INT)(PopCount - 1); i >= 0; i--)
for (i = (INT32) PopCount - 1; i >= 0; i--)
{
if (WalkState->NumOperands == 0)
{
@ -763,16 +763,8 @@ AcpiDsInitAmlWalk (
if (Info)
{
if (Info->ParameterType == ACPI_PARAM_GPE)
{
WalkState->GpeEventInfo =
ACPI_CAST_PTR (ACPI_GPE_EVENT_INFO, Info->Parameters);
}
else
{
WalkState->Params = Info->Parameters;
WalkState->CallerReturnDesc = &Info->ReturnObject;
}
WalkState->Params = Info->Parameters;
WalkState->CallerReturnDesc = &Info->ReturnObject;
}
Status = AcpiPsInitScope (&WalkState->ParserState, Op);

View File

@ -289,7 +289,7 @@ static ACPI_STATUS
AcpiEvFixedEventInitialize (
void)
{
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_STATUS Status;
@ -338,7 +338,7 @@ AcpiEvFixedEventDetect (
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
UINT32 FixedStatus;
UINT32 FixedEnable;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_NAME (EvFixedEventDetect);
@ -348,10 +348,8 @@ 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,
&FixedStatus);
(void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE,
&FixedEnable);
(void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus);
(void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"Fixed Event Block: Enable %08X Status %08X\n",
@ -370,7 +368,7 @@ AcpiEvFixedEventDetect (
/* Found an active (signalled) event */
AcpiFixedEventCount[i]++;
IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i);
IntStatus |= AcpiEvFixedEventDispatch (i);
}
}

View File

@ -350,16 +350,10 @@ AcpiEvDisableGpe (
/*
* Ignore this if the GPE is valid and not enabled.
*
* Flags is only zero if GPE is neither enabled or disabled -- it may
* be a spurious or stray GPE -- disable it in the default case below.
* Note: Always disable the GPE, even if we think that that it is already
* disabled. It is possible that the AML or some other code has enabled
* the GPE behind our back.
*/
if (GpeEventInfo->Flags &&
(!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK)))
{
return_ACPI_STATUS (AE_OK);
}
/* Make sure HW enable masks are updated */
@ -392,7 +386,7 @@ AcpiEvDisableGpe (
default:
/*
* Even if we don't know the GPE type, make sure that we always
* If we don't know the GPE type, make sure that we always
* disable it. This can prevent a certain type of GPE flood, where
* the GPE has no _Lxx/_Exx method, and it cannot be determined
* whether the GPE is wake, run, or wake/run.
@ -429,7 +423,7 @@ AcpiEvGetGpeEventInfo (
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_ENTRY ();
@ -508,8 +502,8 @@ AcpiEvGpeDetect (
UINT32 StatusReg;
UINT32 EnableReg;
ACPI_CPU_FLAGS Flags;
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
UINT32 i;
UINT32 j;
ACPI_FUNCTION_NAME (EvGpeDetect);
@ -589,8 +583,8 @@ AcpiEvGpeDetect (
* or method.
*/
IntStatus |= AcpiEvGpeDispatch (
&GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j],
(UINT32) j + GpeRegisterInfo->BaseGpeNumber);
&GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j],
j + GpeRegisterInfo->BaseGpeNumber);
}
}
}
@ -696,8 +690,6 @@ AcpiEvAsynchExecuteGpeMethod (
* control method that corresponds to this GPE
*/
Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
Info->Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, LocalGpeEventInfo);
Info->ParameterType = ACPI_PARAM_GPE;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
Status = AcpiNsEvaluate (Info);

View File

@ -286,8 +286,8 @@ AcpiEvDeleteGpeHandlers (
ACPI_GPE_BLOCK_INFO *GpeBlock)
{
ACPI_GPE_EVENT_INFO *GpeEventInfo;
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
UINT32 i;
UINT32 j;
ACPI_FUNCTION_TRACE (EvDeleteGpeHandlers);
@ -301,7 +301,7 @@ AcpiEvDeleteGpeHandlers (
for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
{
GpeEventInfo = &GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j];
GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j];
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_HANDLER)
@ -894,8 +894,8 @@ AcpiEvCreateGpeInfoBlocks (
ACPI_GPE_EVENT_INFO *GpeEventInfo = NULL;
ACPI_GPE_EVENT_INFO *ThisEvent;
ACPI_GPE_REGISTER_INFO *ThisRegister;
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
UINT32 i;
UINT32 j;
ACPI_STATUS Status;
@ -1140,8 +1140,8 @@ AcpiEvInitializeGpeBlock (
ACPI_GPE_WALK_INFO GpeInfo;
UINT32 WakeGpeCount;
UINT32 GpeEnabledCount;
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
UINT32 i;
UINT32 j;
ACPI_FUNCTION_TRACE (EvInitializeGpeBlock);
@ -1191,7 +1191,7 @@ AcpiEvInitializeGpeBlock (
{
/* Get the info block for this particular GPE */
GpeEventInfo = &GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j];
GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j];
if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_METHOD) &&
(GpeEventInfo->Flags & ACPI_GPE_TYPE_RUNTIME))

View File

@ -681,7 +681,7 @@ void
AcpiEvTerminate (
void)
{
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_STATUS Status;
@ -699,7 +699,7 @@ AcpiEvTerminate (
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
Status = AcpiDisableEvent ((UINT32) i, 0);
Status = AcpiDisableEvent (i, 0);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,

View File

@ -169,7 +169,7 @@ AcpiEvInstallRegionHandlers (
void)
{
ACPI_STATUS Status;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_TRACE (EvInstallRegionHandlers);
@ -245,7 +245,7 @@ AcpiEvInitializeOpRegions (
void)
{
ACPI_STATUS Status;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_TRACE (EvInitializeOpRegions);
@ -323,7 +323,6 @@ AcpiEvExecuteRegMethod (
Info->PrefixNode = RegionObj2->Extra.Method_REG;
Info->Pathname = NULL;
Info->Parameters = Args;
Info->ParameterType = ACPI_PARAM_ARGS;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
/*

View File

@ -393,6 +393,7 @@ AcpiEvPciConfigRegionSetup (
if (!PciDeviceNode)
{
ACPI_FREE (PciId);
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@ -493,7 +494,7 @@ AcpiEvIsPciRootBridge (
ACPI_STATUS Status;
ACPI_DEVICE_ID Hid;
ACPI_COMPATIBLE_ID_LIST *Cid;
ACPI_NATIVE_UINT i;
UINT32 i;
/*

View File

@ -132,7 +132,7 @@
static ACPI_STATUS
AcpiExAddTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *ParentNode,
ACPI_OPERAND_OBJECT **DdbHandle);
@ -154,7 +154,7 @@ AcpiExAddTable (
static ACPI_STATUS
AcpiExAddTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *ParentNode,
ACPI_OPERAND_OBJECT **DdbHandle)
{
@ -215,12 +215,12 @@ AcpiExLoadTableOp (
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_NATIVE_UINT TableIndex;
ACPI_NAMESPACE_NODE *ParentNode;
ACPI_NAMESPACE_NODE *StartNode;
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
ACPI_OPERAND_OBJECT *DdbHandle;
ACPI_TABLE_HEADER *Table;
UINT32 TableIndex;
ACPI_FUNCTION_TRACE (ExLoadTableOp);
@ -380,7 +380,7 @@ AcpiExLoadOp (
{
ACPI_OPERAND_OBJECT *DdbHandle;
ACPI_TABLE_DESC TableDesc;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
ACPI_STATUS Status;
UINT32 Length;
@ -480,7 +480,14 @@ AcpiExLoadOp (
goto Cleanup;
}
Status = AcpiExAddTable (TableIndex, WalkState->ScopeInfo->Scope.Node, &DdbHandle);
/*
* Add the table to the namespace.
*
* Note: We load the table objects relative to the root of the namespace.
* This appears to go against the ACPI specification, but we do it for
* compatibility with other ACPI implementations.
*/
Status = AcpiExAddTable (TableIndex, AcpiGbl_RootNode, &DdbHandle);
if (ACPI_FAILURE (Status))
{
/* On error, TablePtr was deallocated above */
@ -538,7 +545,7 @@ AcpiExUnloadTable (
{
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *TableDesc = DdbHandle;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
ACPI_TABLE_HEADER *Table;
@ -558,9 +565,9 @@ AcpiExUnloadTable (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Get the table index from the DdbHandle */
/* Get the table index from the DdbHandle (ACPI_SIZE for 64-bit case) */
TableIndex = (ACPI_NATIVE_UINT) TableDesc->Reference.Object;
TableIndex = (UINT32) (ACPI_SIZE) TableDesc->Reference.Object;
/* Invoke table handler if present */

View File

@ -395,11 +395,11 @@ AcpiExConvertToAscii (
UINT8 DataWidth)
{
ACPI_INTEGER Digit;
ACPI_NATIVE_UINT i;
ACPI_NATIVE_UINT j;
ACPI_NATIVE_UINT k = 0;
ACPI_NATIVE_UINT HexLength;
ACPI_NATIVE_UINT DecimalLength;
UINT32 i;
UINT32 j;
UINT32 k = 0;
UINT32 HexLength;
UINT32 DecimalLength;
UINT32 Remainder;
BOOLEAN SupressZeros;
@ -461,7 +461,7 @@ AcpiExConvertToAscii (
/* HexLength: 2 ascii hex chars per data byte */
HexLength = (ACPI_NATIVE_UINT) ACPI_MUL_2 (DataWidth);
HexLength = ACPI_MUL_2 (DataWidth);
for (i = 0, j = (HexLength-1); i < HexLength; i++, j--)
{
/* Get one hex digit, most significant digits first */

View File

@ -121,8 +121,6 @@
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
#include "acevents.h"
#include "actables.h"
#define _COMPONENT ACPI_EXECUTER

View File

@ -680,26 +680,22 @@ AcpiExDumpOperand (
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("Buffer len %X @ %p\n",
AcpiOsPrintf ("Buffer length %.2X @ %p\n",
ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
Length = ObjDesc->Buffer.Length;
if (Length > 64)
{
Length = 64;
}
/* Debug only -- dump the buffer contents */
if (ObjDesc->Buffer.Pointer)
{
AcpiOsPrintf ("Buffer Contents: ");
for (Index = 0; Index < Length; Index++)
Length = ObjDesc->Buffer.Length;
if (Length > 128)
{
AcpiOsPrintf (" %02x", ObjDesc->Buffer.Pointer[Index]);
Length = 128;
}
AcpiOsPrintf ("\n");
AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n", Length);
ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
}
break;
@ -877,63 +873,48 @@ AcpiExDumpOperand (
*
* FUNCTION: AcpiExDumpOperands
*
* PARAMETERS: Operands - Operand list
* InterpreterMode - Load or Exec
* Ident - Identification
* NumLevels - # of stack entries to dump above line
* Note - Output notation
* ModuleName - Caller's module name
* LineNumber - Caller's invocation line number
* PARAMETERS: Operands - A list of Operand objects
* OpcodeName - AML opcode name
* NumOperands - Operand count for this opcode
*
* DESCRIPTION: Dump the object stack
* DESCRIPTION: Dump the operands associated with the opcode
*
******************************************************************************/
void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
ACPI_INTERPRETER_MODE InterpreterMode,
char *Ident,
UINT32 NumLevels,
char *Note,
char *ModuleName,
UINT32 LineNumber)
const char *OpcodeName,
UINT32 NumOperands)
{
ACPI_NATIVE_UINT i;
ACPI_FUNCTION_NAME (ExDumpOperands);
if (!Ident)
if (!OpcodeName)
{
Ident = "?";
}
if (!Note)
{
Note = "?";
OpcodeName = "UNKNOWN";
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
Ident, NumLevels));
"**** Start operand dump for opcode [%s], %d operands\n",
OpcodeName, NumOperands));
if (NumLevels == 0)
if (NumOperands == 0)
{
NumLevels = 1;
NumOperands = 1;
}
/* Dump the operand stack starting at the top */
/* Dump the individual operands */
for (i = 0; NumLevels > 0; i--, NumLevels--)
while (NumOperands)
{
AcpiExDumpOperand (Operands[i], 0);
AcpiExDumpOperand (*Operands, 0);
Operands++;
NumOperands--;
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"************* Operand Stack dump from %s(%d), %s\n",
ModuleName, LineNumber, Note));
"**** End operand dump for [%s]\n", OpcodeName));
return;
}

View File

@ -248,13 +248,13 @@ AcpiExSetupRegion (
/*
* Slack mode only: We will go ahead and allow access to this
* field if it is within the region length rounded up to the next
* access width boundary.
* access width boundary. ACPI_SIZE cast for 64-bit compile.
*/
if (ACPI_ROUND_UP (RgnDesc->Region.Length,
ObjDesc->CommonField.AccessByteWidth) >=
(ObjDesc->CommonField.BaseByteOffset +
(ACPI_NATIVE_UINT) ObjDesc->CommonField.AccessByteWidth +
FieldDatumByteOffset))
((ACPI_SIZE) ObjDesc->CommonField.BaseByteOffset +
ObjDesc->CommonField.AccessByteWidth +
FieldDatumByteOffset))
{
return_ACPI_STATUS (AE_OK);
}

View File

@ -429,8 +429,8 @@ AcpiExDoConcatenate (
/* Result of two Strings is a String */
ReturnDesc = AcpiUtCreateStringObject ((ACPI_SIZE)
(Operand0->String.Length +
ReturnDesc = AcpiUtCreateStringObject (
((ACPI_SIZE) Operand0->String.Length +
LocalOperand1->String.Length));
if (!ReturnDesc)
{
@ -451,8 +451,8 @@ AcpiExDoConcatenate (
/* Result of two Buffers is a Buffer */
ReturnDesc = AcpiUtCreateBufferObject ((ACPI_SIZE)
(Operand0->Buffer.Length +
ReturnDesc = AcpiUtCreateBufferObject (
((ACPI_SIZE) Operand0->Buffer.Length +
LocalOperand1->Buffer.Length));
if (!ReturnDesc)
{

View File

@ -605,8 +605,8 @@ AcpiExPrepFieldValue (
* operands must be evaluated.
*/
SecondDesc = ObjDesc->Common.NextObject;
SecondDesc->Extra.AmlStart = ((ACPI_PARSE_OBJECT*) (Info->DataRegisterNode))->Named.Data;
SecondDesc->Extra.AmlLength = ((ACPI_PARSE_OBJECT*) (Info->DataRegisterNode))->Named.Length;
SecondDesc->Extra.AmlStart = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Data;
SecondDesc->Extra.AmlLength = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Length;
break;

View File

@ -240,7 +240,8 @@ AcpiExSystemMemorySpaceHandler (
/* Create a new mapping starting at the address given */
MemInfo->MappedLogicalAddress = AcpiOsMapMemory ((ACPI_NATIVE_UINT) Address, WindowSize);
MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
(ACPI_PHYSICAL_ADDRESS) Address, WindowSize);
if (!MemInfo->MappedLogicalAddress)
{
ACPI_ERROR ((AE_INFO,

View File

@ -806,6 +806,9 @@ NextOperand:
}
}
ACPI_DUMP_OPERANDS (WalkState->Operands,
AcpiPsGetOpcodeName (Opcode), WalkState->NumOperands);
return_ACPI_STATUS (Status);
}

View File

@ -431,11 +431,6 @@ AcpiExStore (
"Target is not a Reference or Constant object - %s [%p]",
AcpiUtGetObjectTypeName (DestDesc), DestDesc));
ACPI_DUMP_STACK_ENTRY (SourceDesc);
ACPI_DUMP_STACK_ENTRY (DestDesc);
ACPI_DUMP_OPERANDS (&DestDesc, ACPI_IMODE_EXECUTE, "ExStore",
2, "Target is not a Reference or Constant object");
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}

View File

@ -156,8 +156,7 @@ AcpiHwClearAcpiStatus (
LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_STATUS,
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
ACPI_BITMASK_ALL_FIXED_STATUS);
if (ACPI_FAILURE (Status))
{
@ -345,6 +344,63 @@ AcpiHwGetBitRegisterInfo (
}
/*******************************************************************************
*
* FUNCTION: AcpiGetRegisterUnlocked
*
* PARAMETERS: RegisterId - ID of ACPI BitRegister to access
* ReturnValue - Value that was read from the register
*
* RETURN: Status and the value read from specified Register. Value
* returned is normalized to bit0 (is shifted all the way right)
*
* DESCRIPTION: ACPI BitRegister read function.
*
******************************************************************************/
ACPI_STATUS
AcpiGetRegisterUnlocked (
UINT32 RegisterId,
UINT32 *ReturnValue)
{
UINT32 RegisterValue = 0;
ACPI_BIT_REGISTER_INFO *BitRegInfo;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (AcpiGetRegisterUnlocked);
/* Get the info structure corresponding to the requested ACPI Register */
BitRegInfo = AcpiHwGetBitRegisterInfo (RegisterId);
if (!BitRegInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Read from the register */
Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
&RegisterValue);
if (ACPI_SUCCESS (Status))
{
/* Normalize the value that was read */
RegisterValue = ((RegisterValue & BitRegInfo->AccessBitMask)
>> BitRegInfo->BitPosition);
*ReturnValue = RegisterValue;
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read value %8.8X register %X\n",
RegisterValue, BitRegInfo->ParentRegister));
}
return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiGetRegister
@ -364,41 +420,15 @@ AcpiGetRegister (
UINT32 RegisterId,
UINT32 *ReturnValue)
{
UINT32 RegisterValue = 0;
ACPI_BIT_REGISTER_INFO *BitRegInfo;
ACPI_STATUS Status;
ACPI_CPU_FLAGS Flags;
ACPI_FUNCTION_TRACE (AcpiGetRegister);
Flags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
Status = AcpiGetRegisterUnlocked (RegisterId, ReturnValue);
AcpiOsReleaseLock (AcpiGbl_HardwareLock, Flags);
/* Get the info structure corresponding to the requested ACPI Register */
BitRegInfo = AcpiHwGetBitRegisterInfo (RegisterId);
if (!BitRegInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Read from the register */
Status = AcpiHwRegisterRead (ACPI_MTX_LOCK,
BitRegInfo->ParentRegister, &RegisterValue);
if (ACPI_SUCCESS (Status))
{
/* Normalize the value that was read */
RegisterValue = ((RegisterValue & BitRegInfo->AccessBitMask)
>> BitRegInfo->BitPosition);
*ReturnValue = RegisterValue;
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read value %8.8X register %X\n",
RegisterValue, BitRegInfo->ParentRegister));
}
return_ACPI_STATUS (Status);
return Status;
}
ACPI_EXPORT_SYMBOL (AcpiGetRegister)
@ -445,8 +475,8 @@ AcpiSetRegister (
/* Always do a register read first so we can insert the new bits */
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
BitRegInfo->ParentRegister, &RegisterValue);
Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
&RegisterValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@ -473,8 +503,8 @@ AcpiSetRegister (
BitRegInfo->BitPosition, BitRegInfo->AccessBitMask);
if (Value)
{
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_STATUS, (UINT16) Value);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
(UINT16) Value);
RegisterValue = 0;
}
break;
@ -485,8 +515,8 @@ AcpiSetRegister (
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_ENABLE, (UINT16) RegisterValue);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_ENABLE,
(UINT16) RegisterValue);
break;
@ -503,15 +533,15 @@ AcpiSetRegister (
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_CONTROL, (UINT16) RegisterValue);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL,
(UINT16) RegisterValue);
break;
case ACPI_REGISTER_PM2_CONTROL:
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM2_CONTROL, &RegisterValue);
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM2_CONTROL,
&RegisterValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@ -528,8 +558,8 @@ AcpiSetRegister (
RegisterValue,
ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XPm2ControlBlock.Address)));
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM2_CONTROL, (UINT8) (RegisterValue));
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM2_CONTROL,
(UINT8) (RegisterValue));
break;
@ -560,8 +590,7 @@ ACPI_EXPORT_SYMBOL (AcpiSetRegister)
*
* FUNCTION: AcpiHwRegisterRead
*
* PARAMETERS: UseLock - Lock hardware? True/False
* RegisterId - ACPI Register ID
* PARAMETERS: RegisterId - ACPI Register ID
* ReturnValue - Where the register value is returned
*
* RETURN: Status and the value read.
@ -572,24 +601,17 @@ ACPI_EXPORT_SYMBOL (AcpiSetRegister)
ACPI_STATUS
AcpiHwRegisterRead (
BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 *ReturnValue)
{
UINT32 Value1 = 0;
UINT32 Value2 = 0;
ACPI_STATUS Status;
ACPI_CPU_FLAGS LockFlags = 0;
ACPI_FUNCTION_TRACE (HwRegisterRead);
if (ACPI_MTX_LOCK == UseLock)
{
LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
}
switch (RegisterId)
{
case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
@ -597,7 +619,7 @@ AcpiHwRegisterRead (
Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT.XPm1aEventBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* PM1B is optional */
@ -612,7 +634,7 @@ AcpiHwRegisterRead (
Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_XPm1aEnable);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* PM1B is optional */
@ -627,7 +649,7 @@ AcpiHwRegisterRead (
Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT.XPm1aControlBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
Status = AcpiHwLowLevelRead (16, &Value2, &AcpiGbl_FADT.XPm1bControlBlock);
@ -658,12 +680,7 @@ AcpiHwRegisterRead (
break;
}
UnlockAndExit:
if (ACPI_MTX_LOCK == UseLock)
{
AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
}
Exit:
if (ACPI_SUCCESS (Status))
{
*ReturnValue = Value1;
@ -677,8 +694,7 @@ UnlockAndExit:
*
* FUNCTION: AcpiHwRegisterWrite
*
* PARAMETERS: UseLock - Lock hardware? True/False
* RegisterId - ACPI Register ID
* PARAMETERS: RegisterId - ACPI Register ID
* Value - The value to write
*
* RETURN: Status
@ -702,34 +718,27 @@ UnlockAndExit:
ACPI_STATUS
AcpiHwRegisterWrite (
BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 Value)
{
ACPI_STATUS Status;
ACPI_CPU_FLAGS LockFlags = 0;
UINT32 ReadValue;
ACPI_FUNCTION_TRACE (HwRegisterWrite);
if (ACPI_MTX_LOCK == UseLock)
{
LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
}
switch (RegisterId)
{
case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
/* Perform a read first to preserve certain bits (per ACPI spec) */
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_STATUS, &ReadValue);
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS,
&ReadValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* Insert the bits to be preserved */
@ -741,7 +750,7 @@ AcpiHwRegisterWrite (
Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1aEventBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* PM1B is optional */
@ -755,7 +764,7 @@ AcpiHwRegisterWrite (
Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_XPm1aEnable);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* PM1B is optional */
@ -771,11 +780,11 @@ AcpiHwRegisterWrite (
*
* Note: This includes SCI_EN, we never want to change this bit
*/
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_CONTROL, &ReadValue);
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
&ReadValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
/* Insert the bits to be preserved */
@ -787,7 +796,7 @@ AcpiHwRegisterWrite (
Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1aControlBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
goto Exit;
}
Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1bControlBlock);
@ -831,12 +840,7 @@ AcpiHwRegisterWrite (
break;
}
UnlockAndExit:
if (ACPI_MTX_LOCK == UseLock)
{
AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
}
Exit:
return_ACPI_STATUS (Status);
}

View File

@ -258,11 +258,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetFirmwareWakingVector)
ACPI_STATUS
AcpiEnterSleepStatePrep (
UINT8 SleepState)
UINT8 SleepState)
{
ACPI_STATUS Status;
ACPI_OBJECT_LIST ArgList;
ACPI_OBJECT Arg;
ACPI_STATUS Status;
ACPI_OBJECT_LIST ArgList;
ACPI_OBJECT Arg;
ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
@ -278,29 +278,20 @@ AcpiEnterSleepStatePrep (
return_ACPI_STATUS (Status);
}
/* Setup parameter object */
/* Execute the _PTS method (Prepare To Sleep) */
ArgList.Count = 1;
ArgList.Pointer = &Arg;
Arg.Type = ACPI_TYPE_INTEGER;
Arg.Integer.Value = SleepState;
/* Run the _PTS and _GTS methods */
Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
return_ACPI_STATUS (Status);
}
Status = AcpiEvaluateObject (NULL, METHOD_NAME__GTS, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
return_ACPI_STATUS (Status);
}
/* Setup the argument to _SST */
/* Setup the argument to the _SST method (System STatus) */
switch (SleepState)
{
@ -323,8 +314,10 @@ AcpiEnterSleepStatePrep (
break;
}
/* Set the system indicators to show the desired sleep state. */
/*
* Set the system indicators to show the desired sleep state.
* _SST is an optional method (return no error if not found)
*/
Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
@ -345,7 +338,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
*
* RETURN: Status
*
* DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
* DESCRIPTION: Enter a system sleep state
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
@ -359,6 +352,8 @@ AcpiEnterSleepState (
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
UINT32 InValue;
ACPI_OBJECT_LIST ArgList;
ACPI_OBJECT Arg;
ACPI_STATUS Status;
@ -420,10 +415,23 @@ AcpiEnterSleepState (
return_ACPI_STATUS (Status);
}
/* Execute the _GTS method (Going To Sleep) */
ArgList.Count = 1;
ArgList.Pointer = &Arg;
Arg.Type = ACPI_TYPE_INTEGER;
Arg.Integer.Value = SleepState;
Status = AcpiEvaluateObject (NULL, METHOD_NAME__GTS, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
return_ACPI_STATUS (Status);
}
/* Get current value of PM1A control */
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_CONTROL, &PM1AControl);
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
&PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -449,15 +457,15 @@ AcpiEnterSleepState (
/* Write #1: fill in SLP_TYP data */
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
PM1BControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -472,15 +480,15 @@ AcpiEnterSleepState (
ACPI_FLUSH_CPU_CACHE ();
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
PM1BControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -501,8 +509,7 @@ AcpiEnterSleepState (
*/
AcpiOsStall (10000000);
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_CONTROL,
Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL,
SleepEnableRegInfo->AccessBitMask);
if (ACPI_FAILURE (Status))
{
@ -646,8 +653,8 @@ AcpiLeaveSleepState (
/* Get current value of PM1A control */
Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1_CONTROL, &PM1AControl);
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
&PM1AControl);
if (ACPI_SUCCESS (Status))
{
/* Clear SLP_EN and SLP_TYP fields */
@ -663,10 +670,10 @@ AcpiLeaveSleepState (
/* Just ignore any errors */
(void) AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
(void) AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
(void) AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
PM1AControl);
(void) AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
PM1BControl);
}
}

View File

@ -137,7 +137,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20080321
#define ACPI_CA_VERSION 0x20080609
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdisasm.h - AML disassembler
* $Revision: 1.44 $
* $Revision: 1.45 $
*
*****************************************************************************/
@ -249,6 +249,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
@ -446,7 +447,7 @@ AcpiDmCommaIfFieldMember (
*/
UINT32
AcpiDmDumpName (
char *Name);
UINT32 Name);
ACPI_STATUS
AcpiPsDisplayObjectPathname (

View File

@ -357,7 +357,7 @@ AcpiDsMethodError (
*/
ACPI_STATUS
AcpiDsInitializeObjects (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode);

View File

@ -185,8 +185,9 @@
#define AE_BAD_HEX_CONSTANT (ACPI_STATUS) (0x0007 | AE_CODE_PROGRAMMER)
#define AE_BAD_OCTAL_CONSTANT (ACPI_STATUS) (0x0008 | AE_CODE_PROGRAMMER)
#define AE_BAD_DECIMAL_CONSTANT (ACPI_STATUS) (0x0009 | AE_CODE_PROGRAMMER)
#define AE_MISSING_ARGUMENTS (ACPI_STATUS) (0x000A | AE_CODE_PROGRAMMER)
#define AE_CODE_PGM_MAX 0x0009
#define AE_CODE_PGM_MAX 0x000A
/*
@ -309,6 +310,7 @@ char const *AcpiGbl_ExceptionNames_Env[] =
char const *AcpiGbl_ExceptionNames_Pgm[] =
{
NULL,
"AE_BAD_PARAMETER",
"AE_BAD_CHARACTER",
"AE_BAD_PATHNAME",
@ -317,11 +319,13 @@ char const *AcpiGbl_ExceptionNames_Pgm[] =
"AE_ALIGNMENT",
"AE_BAD_HEX_CONSTANT",
"AE_BAD_OCTAL_CONSTANT",
"AE_BAD_DECIMAL_CONSTANT"
"AE_BAD_DECIMAL_CONSTANT",
"AE_MISSING_ARGUMENTS"
};
char const *AcpiGbl_ExceptionNames_Tbl[] =
{
NULL,
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
"AE_BAD_CHECKSUM",
@ -332,6 +336,7 @@ char const *AcpiGbl_ExceptionNames_Tbl[] =
char const *AcpiGbl_ExceptionNames_Aml[] =
{
NULL,
"AE_AML_ERROR",
"AE_AML_PARSE",
"AE_AML_BAD_OPCODE",
@ -370,6 +375,7 @@ char const *AcpiGbl_ExceptionNames_Aml[] =
char const *AcpiGbl_ExceptionNames_Ctrl[] =
{
NULL,
"AE_CTRL_RETURN_VALUE",
"AE_CTRL_PENDING",
"AE_CTRL_TERMINATE",

View File

@ -155,13 +155,11 @@ AcpiHwGetBitRegisterInfo (
ACPI_STATUS
AcpiHwRegisterRead (
BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiHwRegisterWrite (
BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 Value);

View File

@ -564,12 +564,8 @@ AcpiExDumpOperand (
void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
ACPI_INTERPRETER_MODE InterpreterMode,
char *Ident,
UINT32 NumLevels,
char *Note,
char *ModuleName,
UINT32 LineNumber);
const char *OpcodeName,
UINT32 NumOpcodes);
void
AcpiExDumpObjectDescriptor (

View File

@ -392,8 +392,8 @@ typedef struct acpi_predefined_names
typedef struct acpi_namestring_info
{
char *ExternalName;
char *NextExternalChar;
const char *ExternalName;
const char *NextExternalChar;
char *InternalName;
UINT32 Length;
UINT32 NumSegments;

View File

@ -155,12 +155,12 @@
*/
#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p))
#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p))
#define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8,(a)) + (ACPI_NATIVE_UINT)(b)))
#define ACPI_PTR_DIFF(a,b) (ACPI_NATIVE_UINT) (ACPI_CAST_PTR (UINT8,(a)) - ACPI_CAST_PTR (UINT8,(b)))
#define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8,(a)) + (ACPI_SIZE)(b)))
#define ACPI_PTR_DIFF(a,b) (ACPI_SIZE) (ACPI_CAST_PTR (UINT8,(a)) - ACPI_CAST_PTR (UINT8,(b)))
/* Pointer/Integer type conversions */
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(ACPI_NATIVE_UINT) i)
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(ACPI_SIZE) i)
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
#define ACPI_OFFSET(d,f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
@ -375,22 +375,22 @@ typedef struct acpi_integer_overlay
/*
* Rounding macros (Power of two boundaries only)
*/
#define ACPI_ROUND_DOWN(value,boundary) (((ACPI_NATIVE_UINT)(value)) & \
(~(((ACPI_NATIVE_UINT) boundary)-1)))
#define ACPI_ROUND_DOWN(value,boundary) (((ACPI_SIZE)(value)) & \
(~(((ACPI_SIZE) boundary)-1)))
#define ACPI_ROUND_UP(value,boundary) ((((ACPI_NATIVE_UINT)(value)) + \
(((ACPI_NATIVE_UINT) boundary)-1)) & \
(~(((ACPI_NATIVE_UINT) boundary)-1)))
#define ACPI_ROUND_UP(value,boundary) ((((ACPI_SIZE)(value)) + \
(((ACPI_SIZE) boundary)-1)) & \
(~(((ACPI_SIZE) boundary)-1)))
/* Note: sizeof(ACPI_NATIVE_UINT) evaluates to either 2, 4, or 8 */
/* Note: sizeof(ACPI_SIZE) evaluates to either 4 or 8 (32- vs 64-bit mode) */
#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4)
#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8)
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(ACPI_NATIVE_UINT))
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(ACPI_SIZE))
#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4)
#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8)
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(ACPI_NATIVE_UINT))
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(ACPI_SIZE))
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@ -401,7 +401,7 @@ typedef struct acpi_integer_overlay
#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
#define ACPI_IS_MISALIGNED(value) (((ACPI_NATIVE_UINT)value) & (sizeof(ACPI_NATIVE_UINT)-1))
#define ACPI_IS_MISALIGNED(value) (((ACPI_SIZE)value) & (sizeof(ACPI_SIZE)-1))
/*
* Bitmask creation
@ -496,7 +496,7 @@ typedef struct acpi_integer_overlay
* error messages. The __FILE__ macro is not very useful for this, because it
* often includes the entire pathname to the module
*/
#define ACPI_MODULE_NAME(Name) static char ACPI_UNUSED_VAR *_AcpiModuleName = Name;
#define ACPI_MODULE_NAME(Name) static const char ACPI_UNUSED_VAR _AcpiModuleName[] = Name;
#else
#define ACPI_MODULE_NAME(Name)
#endif
@ -549,19 +549,17 @@ typedef struct acpi_integer_overlay
/*
* If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
* define it now. This is the case where there the compiler does not support
* a __FUNCTION__ macro or equivalent. We save the function name on the
* local stack.
* a __FUNCTION__ macro or equivalent.
*/
#ifndef ACPI_GET_FUNCTION_NAME
#define ACPI_GET_FUNCTION_NAME _AcpiFunctionName
/*
* The Name parameter should be the procedure name as a quoted string.
* This is declared as a local string ("MyFunctionName") so that it can
* be also used by the function exit macros below.
* The function name is also used by the function exit macros below.
* Note: (const char) is used to be compatible with the debug interfaces
* and macros such as __FUNCTION__.
*/
#define ACPI_FUNCTION_NAME(Name) const char *_AcpiFunctionName = #Name;
#define ACPI_FUNCTION_NAME(Name) static const char _AcpiFunctionName[] = #Name;
#else
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
@ -660,7 +658,7 @@ typedef struct acpi_integer_overlay
/* Stack and buffer dumping */
#define ACPI_DUMP_STACK_ENTRY(a) AcpiExDumpOperand((a),0)
#define ACPI_DUMP_OPERANDS(a,b,c,d,e) AcpiExDumpOperands(a,b,c,d,e,_AcpiModuleName,__LINE__)
#define ACPI_DUMP_OPERANDS(a,b,c) AcpiExDumpOperands(a,b,c)
#define ACPI_DUMP_ENTRY(a,b) AcpiNsDumpEntry (a,b)
@ -698,7 +696,7 @@ typedef struct acpi_integer_overlay
#define ACPI_FUNCTION_VALUE_EXIT(s)
#define ACPI_FUNCTION_ENTRY()
#define ACPI_DUMP_STACK_ENTRY(a)
#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
#define ACPI_DUMP_OPERANDS(a,b,c)
#define ACPI_DUMP_ENTRY(a,b)
#define ACPI_DUMP_TABLES(a,b)
#define ACPI_DUMP_PATHNAME(a,b,c,d)

View File

@ -169,7 +169,7 @@ AcpiNsLoadNamespace (
ACPI_STATUS
AcpiNsLoadTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node);
@ -198,13 +198,13 @@ AcpiNsGetNextNode (
*/
ACPI_STATUS
AcpiNsParseTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode);
ACPI_STATUS
AcpiNsOneCompleteParse (
ACPI_NATIVE_UINT PassNumber,
ACPI_NATIVE_UINT TableIndex,
UINT32 PassNumber,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode);
@ -342,7 +342,7 @@ AcpiNsPatternMatch (
ACPI_STATUS
AcpiNsGetNode (
ACPI_NAMESPACE_NODE *PrefixNode,
char *ExternalPathname,
const char *ExternalPathname,
UINT32 Flags,
ACPI_NAMESPACE_NODE **OutNode);
@ -431,24 +431,24 @@ AcpiNsLocal (
void
AcpiNsReportError (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *InternalName,
const char *InternalName,
ACPI_STATUS LookupStatus);
void
AcpiNsReportMethodError (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *Message,
const char *Message,
ACPI_NAMESPACE_NODE *Node,
char *Path,
const char *Path,
ACPI_STATUS LookupStatus);
void
AcpiNsPrintNodePathname (
ACPI_NAMESPACE_NODE *Node,
char *Msg);
const char *Msg);
ACPI_STATUS
AcpiNsBuildInternalName (
@ -460,13 +460,13 @@ AcpiNsGetInternalNameLength (
ACPI_STATUS
AcpiNsInternalizeName (
char *DottedName,
const char *DottedName,
char **ConvertedName);
ACPI_STATUS
AcpiNsExternalizeName (
UINT32 InternalNameLength,
char *InternalName,
const char *InternalName,
UINT32 *ConvertedNameLength,
char **ConvertedName);

View File

@ -274,7 +274,7 @@ AcpiOsFree (
void *
AcpiOsMapMemory (
ACPI_PHYSICAL_ADDRESS Where,
ACPI_NATIVE_UINT Length);
ACPI_SIZE Length);
void
AcpiOsUnmapMemory (

View File

@ -205,7 +205,7 @@ AcpiReallocateRootTable (
ACPI_STATUS
AcpiFindRootPointer (
ACPI_NATIVE_UINT *RsdpAddress);
ACPI_SIZE *RsdpAddress);
ACPI_STATUS
AcpiLoadTables (
@ -214,18 +214,18 @@ AcpiLoadTables (
ACPI_STATUS
AcpiGetTableHeader (
ACPI_STRING Signature,
ACPI_NATIVE_UINT Instance,
UINT32 Instance,
ACPI_TABLE_HEADER *OutTableHeader);
ACPI_STATUS
AcpiGetTable (
ACPI_STRING Signature,
ACPI_NATIVE_UINT Instance,
UINT32 Instance,
ACPI_TABLE_HEADER **OutTable);
ACPI_STATUS
AcpiGetTableByIndex (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_TABLE_HEADER **OutTable);
ACPI_STATUS
@ -524,6 +524,11 @@ AcpiGetRegister (
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiGetRegisterUnlocked (
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiSetRegister (
UINT32 RegisterId,

View File

@ -184,7 +184,6 @@ typedef struct acpi_walk_state
union acpi_operand_object **CallerReturnDesc;
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
struct acpi_namespace_node *DeferredNode; /* Used when executing deferred opcodes */
struct acpi_gpe_event_info *GpeEventInfo; /* Info for GPE (_Lxx/_Exx methods only */
union acpi_operand_object *ImplicitReturnObj;
struct acpi_namespace_node *MethodCallNode; /* Called method Node*/
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
@ -222,7 +221,7 @@ typedef struct acpi_init_walk_info
UINT16 PackageInit;
UINT16 ObjectCount;
ACPI_OWNER_ID OwnerId;
ACPI_NATIVE_UINT TableIndex;
UINT32 TableIndex;
} ACPI_INIT_WALK_INFO;
@ -280,18 +279,13 @@ typedef struct acpi_evaluate_info
ACPI_OPERAND_OBJECT **Parameters;
ACPI_NAMESPACE_NODE *ResolvedNode;
ACPI_OPERAND_OBJECT *ReturnObject;
UINT8 ParamCount;
UINT8 PassNumber;
UINT8 ParameterType;
UINT8 ReturnObjectType;
UINT8 Flags;
} ACPI_EVALUATE_INFO;
/* Types for ParameterType above */
#define ACPI_PARAM_ARGS 0
#define ACPI_PARAM_GPE 1
/* Values for Flags above */
#define ACPI_IGNORE_RETURN_VALUE 1

View File

@ -127,7 +127,7 @@ AcpiAllocateRootTable (
*/
void
AcpiTbParseFadt (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
UINT8 Flags);
void
@ -144,7 +144,7 @@ AcpiTbFindTable (
char *Signature,
char *OemId,
char *OemTableId,
ACPI_NATIVE_UINT *TableIndex);
UINT32 *TableIndex);
/*
@ -161,7 +161,7 @@ AcpiTbVerifyTable (
ACPI_STATUS
AcpiTbAddTable (
ACPI_TABLE_DESC *TableDesc,
ACPI_NATIVE_UINT *TableIndex);
UINT32 *TableIndex);
ACPI_STATUS
AcpiTbStoreTable (
@ -169,7 +169,7 @@ AcpiTbStoreTable (
ACPI_TABLE_HEADER *Table,
UINT32 Length,
UINT8 Flags,
ACPI_NATIVE_UINT *TableIndex);
UINT32 *TableIndex);
void
AcpiTbDeleteTable (
@ -181,28 +181,28 @@ AcpiTbTerminate (
void
AcpiTbDeleteNamespaceByOwner (
ACPI_NATIVE_UINT TableIndex);
UINT32 TableIndex);
ACPI_STATUS
AcpiTbAllocateOwnerId (
ACPI_NATIVE_UINT TableIndex);
UINT32 TableIndex);
ACPI_STATUS
AcpiTbReleaseOwnerId (
ACPI_NATIVE_UINT TableIndex);
UINT32 TableIndex);
ACPI_STATUS
AcpiTbGetOwnerId (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_OWNER_ID *OwnerId);
BOOLEAN
AcpiTbIsTableLoaded (
ACPI_NATIVE_UINT TableIndex);
UINT32 TableIndex);
void
AcpiTbSetTableLoadedFlag (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
BOOLEAN IsLoaded);
@ -221,7 +221,7 @@ AcpiTbPrintTableHeader(
UINT8
AcpiTbChecksum (
UINT8 *Buffer,
ACPI_NATIVE_UINT Length);
UINT32 Length);
ACPI_STATUS
AcpiTbVerifyChecksum (
@ -233,7 +233,7 @@ AcpiTbInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
char *Signature,
ACPI_NATIVE_UINT TableIndex);
UINT32 TableIndex);
ACPI_STATUS
AcpiTbParseRootTable (

View File

@ -423,6 +423,7 @@ typedef struct acpi_table_dbgp
/*******************************************************************************
*
* DMAR - DMA Remapping table
* From "Intel Virtualization Technology for Directed I/O", Sept. 2007
*
******************************************************************************/
@ -430,18 +431,21 @@ typedef struct acpi_table_dmar
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 Width; /* Host Address Width */
UINT8 Reserved[11];
UINT8 Flags;
UINT8 Reserved[10];
} ACPI_TABLE_DMAR;
/* Flags */
#define ACPI_DMAR_INTR_REMAP (1)
/* DMAR subtable header */
typedef struct acpi_dmar_header
{
UINT16 Type;
UINT16 Length;
UINT8 Flags;
UINT8 Reserved[3];
} ACPI_DMAR_HEADER;
@ -451,14 +455,16 @@ enum AcpiDmarType
{
ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
ACPI_DMAR_TYPE_RESERVED = 2 /* 2 and greater are reserved */
ACPI_DMAR_TYPE_ATSR = 2,
ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
};
typedef struct acpi_dmar_device_scope
{
UINT8 EntryType;
UINT8 Length;
UINT8 Segment;
UINT16 Reserved;
UINT8 EnumerationId;
UINT8 Bus;
} ACPI_DMAR_DEVICE_SCOPE;
@ -470,9 +476,17 @@ enum AcpiDmarScopeType
ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
ACPI_DMAR_SCOPE_TYPE_RESERVED = 3 /* 3 and greater are reserved */
ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
ACPI_DMAR_SCOPE_TYPE_HPET = 4,
ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
};
typedef struct acpi_dmar_pci_path
{
UINT8 Device;
UINT8 Function;
} ACPI_DMAR_PCI_PATH;
/*
* DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
@ -483,6 +497,9 @@ enum AcpiDmarScopeType
typedef struct acpi_dmar_hardware_unit
{
ACPI_DMAR_HEADER Header;
UINT8 Flags;
UINT8 Reserved;
UINT16 Segment;
UINT64 Address; /* Register Base Address */
} ACPI_DMAR_HARDWARE_UNIT;
@ -496,7 +513,9 @@ typedef struct acpi_dmar_hardware_unit
typedef struct acpi_dmar_reserved_memory
{
ACPI_DMAR_HEADER Header;
UINT64 Address; /* 4K aligned base address */
UINT16 Reserved;
UINT16 Segment;
UINT64 BaseAddress; /* 4K aligned base address */
UINT64 EndAddress; /* 4K aligned limit address */
} ACPI_DMAR_RESERVED_MEMORY;
@ -505,6 +524,21 @@ typedef struct acpi_dmar_reserved_memory
#define ACPI_DMAR_ALLOW_ALL (1)
/* 2: Root Port ATS Capability Reporting Structure */
typedef struct acpi_dmar_atsr
{
ACPI_DMAR_HEADER Header;
UINT8 Flags;
UINT8 Reserved;
UINT16 Segment;
} ACPI_DMAR_ATSR;
/* Flags */
#define ACPI_DMAR_ALL_PORTS (1)
/*******************************************************************************
*
@ -1420,9 +1454,9 @@ typedef struct acpi_srat_mem_affinity
UINT16 Reserved; /* Reserved, must be zero */
UINT64 BaseAddress;
UINT64 Length;
UINT32 MemoryType; /* See acpi_address_range_id */
UINT32 Reserved1;
UINT32 Flags;
UINT64 Reserved1; /* Reserved, must be zero */
UINT64 Reserved2; /* Reserved, must be zero */
} ACPI_SRAT_MEM_AFFINITY;
@ -1432,17 +1466,6 @@ typedef struct acpi_srat_mem_affinity
#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
/* Memory types */
enum acpi_address_range_id
{
ACPI_ADDRESS_RANGE_MEMORY = 1,
ACPI_ADDRESS_RANGE_RESERVED = 2,
ACPI_ADDRESS_RANGE_ACPI = 3,
ACPI_ADDRESS_RANGE_NVS = 4,
ACPI_ADDRESS_RANGE_COUNT = 5
};
/*******************************************************************************
*

View File

@ -184,10 +184,10 @@
* usually used for memory allocation, efficient loop counters, and array
* indexes. The types are similar to the size_t type in the C library and are
* required because there is no C type that consistently represents the native
* data width.
* data width. ACPI_SIZE is needed because there is no guarantee that a
* kernel-level C library is present.
*
* ACPI_SIZE 16/32/64-bit unsigned value
* ACPI_NATIVE_UINT 16/32/64-bit unsigned value
* ACPI_NATIVE_INT 16/32/64-bit signed value
*
*/
@ -223,9 +223,9 @@ typedef int INT32;
/*! [End] no source code translation !*/
typedef UINT64 ACPI_NATIVE_UINT;
typedef INT64 ACPI_NATIVE_INT;
typedef UINT64 ACPI_SIZE;
typedef UINT64 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
@ -264,9 +264,9 @@ typedef int INT32;
/*! [End] no source code translation !*/
typedef UINT32 ACPI_NATIVE_UINT;
typedef INT32 ACPI_NATIVE_INT;
typedef UINT32 ACPI_SIZE;
typedef UINT32 ACPI_IO_ADDRESS;
typedef UINT32 ACPI_PHYSICAL_ADDRESS;
@ -281,11 +281,6 @@ typedef UINT32 ACPI_PHYSICAL_ADDRESS;
#endif
/* Variable-width type, used instead of clib size_t */
typedef ACPI_NATIVE_UINT ACPI_SIZE;
/*******************************************************************************
*
* OS-dependent and compiler-dependent types
@ -300,7 +295,7 @@ typedef ACPI_NATIVE_UINT ACPI_SIZE;
/* Value returned by AcpiOsGetThreadId */
#ifndef ACPI_THREAD_ID
#define ACPI_THREAD_ID ACPI_NATIVE_UINT
#define ACPI_THREAD_ID ACPI_SIZE
#endif
/* Object returned from AcpiOsCreateLock */
@ -312,7 +307,7 @@ typedef ACPI_NATIVE_UINT ACPI_SIZE;
/* Flags for AcpiOsAcquireLock/AcpiOsReleaseLock */
#ifndef ACPI_CPU_FLAGS
#define ACPI_CPU_FLAGS ACPI_NATIVE_UINT
#define ACPI_CPU_FLAGS ACPI_SIZE
#endif
/* Object returned from AcpiOsCreateCache */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
* $Revision: 1.203 $
* $Revision: 1.204 $
*
*****************************************************************************/
@ -320,7 +320,7 @@ AcpiUtMemcpy (
void *
AcpiUtMemset (
void *Dest,
ACPI_NATIVE_UINT Value,
UINT8 Value,
ACPI_SIZE Count);
int
@ -417,14 +417,14 @@ void
AcpiUtTrace (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId);
void
AcpiUtTracePtr (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
void *Pointer);
@ -432,7 +432,7 @@ void
AcpiUtTraceU32 (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
UINT32 Integer);
@ -440,7 +440,7 @@ void
AcpiUtTraceStr (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
char *String);
@ -448,14 +448,14 @@ void
AcpiUtExit (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId);
void
AcpiUtStatusExit (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
ACPI_STATUS Status);
@ -463,7 +463,7 @@ void
AcpiUtValueExit (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
ACPI_INTEGER Value);
@ -471,7 +471,7 @@ void
AcpiUtPtrExit (
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
UINT8 *Ptr);
@ -510,9 +510,9 @@ AcpiUtDebugPrint (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
@ -520,38 +520,38 @@ AcpiUtDebugPrintRaw (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
char *ModuleName,
const char *ModuleName,
UINT32 ComponentId,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtError (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtException (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
ACPI_STATUS Status,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(4);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtWarning (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtInfo (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *Format,
const char *Format,
...) ACPI_PRINTF_LIKE(3);
@ -630,14 +630,14 @@ AcpiUtExecute_Sxds (
*/
ACPI_OPERAND_OBJECT *
AcpiUtCreateInternalObjectDbg (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
ACPI_OBJECT_TYPE Type);
void *
AcpiUtAllocateObjectDescDbg (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
@ -780,14 +780,14 @@ BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name);
ACPI_NAME
void
AcpiUtRepairName (
char *Name);
BOOLEAN
AcpiUtValidAcpiChar (
char Character,
ACPI_NATIVE_UINT Position);
UINT32 Position);
ACPI_STATUS
AcpiUtStrtoul64 (
@ -897,14 +897,14 @@ void *
AcpiUtAllocate (
ACPI_SIZE Size,
UINT32 Component,
char *Module,
const char *Module,
UINT32 Line);
void *
AcpiUtAllocateZeroed (
ACPI_SIZE Size,
UINT32 Component,
char *Module,
const char *Module,
UINT32 Line);
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
@ -912,21 +912,21 @@ void *
AcpiUtAllocateAndTrack (
ACPI_SIZE Size,
UINT32 Component,
char *Module,
const char *Module,
UINT32 Line);
void *
AcpiUtAllocateZeroedAndTrack (
ACPI_SIZE Size,
UINT32 Component,
char *Module,
const char *Module,
UINT32 Line);
void
AcpiUtFreeAndTrack (
void *Address,
UINT32 Component,
char *Module,
const char *Module,
UINT32 Line);
void
@ -936,7 +936,7 @@ AcpiUtDumpAllocationInfo (
void
AcpiUtDumpAllocations (
UINT32 Component,
char *Module);
const char *Module);
ACPI_STATUS
AcpiUtCreateList (

View File

@ -1,164 +0,0 @@
/******************************************************************************
*
* Name: acdos16.h - DOS specific defines, etc.
* $Revision: 1.18 $
*
*****************************************************************************/
/******************************************************************************
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
*
* 2.1. This is your license from Intel Corp. under its intellectual property
* rights. You may have additional license terms from the party that provided
* you this software, covering your right to use that party's intellectual
* property rights.
*
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
* copy of the source code appearing in this file ("Covered Code") an
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
* base code distributed originally by Intel ("Original Intel Code") to copy,
* make derivatives, distribute, use and display any portion of the Covered
* Code in any form, with the right to sublicense such rights; and
*
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
* license (with the right to sublicense), under only those claims of Intel
* patents that are infringed by the Original Intel Code, to make, use, sell,
* offer to sell, and import the Covered Code and derivative works thereof
* solely to the minimum extent necessary to exercise the above copyright
* license, and in no event shall the patent license extend to any additions
* to or modifications of the Original Intel Code. No other license or right
* is granted directly or by implication, estoppel or otherwise;
*
* The above copyright and patent license is granted only if the following
* conditions are met:
*
* 3. Conditions
*
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
* Redistribution of source code of any substantial portion of the Covered
* Code or modification with rights to further distribute source must include
* the above Copyright Notice, the above License, this list of Conditions,
* and the following Disclaimer and Export Compliance provision. In addition,
* Licensee must cause all Covered Code to which Licensee contributes to
* contain a file documenting the changes Licensee made to create that Covered
* Code and the date of any change. Licensee must include in that file the
* documentation of any changes made by any predecessor Licensee. Licensee
* must include a prominent statement that the modification is derived,
* directly or indirectly, from Original Intel Code.
*
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
* Redistribution of source code of any substantial portion of the Covered
* Code or modification without rights to further distribute source must
* include the following Disclaimer and Export Compliance provision in the
* documentation and/or other materials provided with distribution. In
* addition, Licensee may not authorize further sublicense of source of any
* portion of the Covered Code, and must include terms to the effect that the
* license from Licensee to its licensee is limited to the intellectual
* property embodied in the software Licensee provides to its licensee, and
* not to intellectual property embodied in modifications its licensee may
* make.
*
* 3.3. Redistribution of Executable. Redistribution in executable form of any
* substantial portion of the Covered Code or modification must reproduce the
* above Copyright Notice, and the following Disclaimer and Export Compliance
* provision in the documentation and/or other materials provided with the
* distribution.
*
* 3.4. Intel retains all right, title, and interest in and to the Original
* Intel Code.
*
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
* Intel shall be used in advertising or otherwise to promote the sale, use or
* other dealings in products derived from or relating to the Covered Code
* without prior written authorization from Intel.
*
* 4. Disclaimer and Export Compliance
*
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
* LIMITED REMEDY.
*
* 4.3. Licensee shall not export, either directly or indirectly, any of this
* software or system incorporating such software without first obtaining any
* required license or other approval from the U. S. Department of Commerce or
* any other agency or department of the United States Government. In the
* event Licensee exports any such software from the United States or
* re-exports any such software from a foreign destination, Licensee shall
* ensure that the distribution and export/re-export of the software is in
* compliance with all laws, regulations, orders, or other restrictions of the
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
* any of its subsidiaries will export/re-export any technical data, process,
* software, or service, directly or indirectly, to any country for which the
* United States government or any agency thereof requires an export license,
* other governmental approval, or letter of assurance, without first obtaining
* such license, approval or letter.
*
*****************************************************************************/
#ifndef __ACDOS16_H__
#define __ACDOS16_H__
/* NOTE: 16-bit ACPICA is no longer supported, December 2006 */
#define ACPI_USE_STANDARD_HEADERS
#define ACPI_MACHINE_WIDTH 16
/* Use a struct for 64-bit integers */
typedef struct
{
unsigned long Lo;
unsigned long Hi;
} COMPILER_DEPENDENT_UINT64;
typedef struct
{
long Lo;
long Hi;
} COMPILER_DEPENDENT_INT64;
/*
* Calling conventions:
*
* ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
* ACPI_EXTERNAL_XFACE - External ACPI interfaces
* ACPI_INTERNAL_XFACE - Internal ACPI interfaces
* ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
*/
#define ACPI_SYSTEM_XFACE __cdecl
#define ACPI_EXTERNAL_XFACE
#define ACPI_INTERNAL_XFACE
#define ACPI_INTERNAL_VAR_XFACE __cdecl
#define ACPI_ASM_MACROS
#define BREAKPOINT3
#define ACPI_DISABLE_IRQS()
#define ACPI_ENABLE_IRQS()
#define halt()
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq)
#endif /* __ACDOS16_H__ */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 1.184 $
* $Revision: 1.185 $
*
*****************************************************************************/
@ -160,7 +160,7 @@ AcpiNsPrintPathname (
UINT32 NumSegments,
char *Pathname)
{
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_NAME (NsPrintPathname);
@ -311,14 +311,6 @@ AcpiNsDumpOneObject (
ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type %08X", Type));
}
if (!AcpiUtValidAcpiName (ThisNode->Name.Integer))
{
ThisNode->Name.Integer = AcpiUtRepairName (ThisNode->Name.Ascii);
ACPI_WARNING ((AE_INFO, "Invalid ACPI Name %08X",
ThisNode->Name.Integer));
}
AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode));
}
@ -617,13 +609,13 @@ AcpiNsDumpOneObject (
if (ObjType > ACPI_TYPE_LOCAL_MAX)
{
AcpiOsPrintf ("(Ptr to ACPI Object type %X [UNKNOWN])\n",
AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
ObjType);
BytesToDump = 32;
}
else
{
AcpiOsPrintf ("(Ptr to ACPI Object type %X [%s])\n",
AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [%s])\n",
ObjType, AcpiUtGetTypeName (ObjType));
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}

View File

@ -221,6 +221,38 @@ AcpiNsEvaluate (
return_ACPI_STATUS (AE_NULL_OBJECT);
}
/* Calculate the number of arguments being passed to the method */
Info->ParamCount = 0;
if (Info->Parameters)
{
while (Info->Parameters[Info->ParamCount])
{
Info->ParamCount++;
}
}
/* Error if too few arguments were passed in */
if (Info->ParamCount < Info->ObjDesc->Method.ParamCount)
{
ACPI_ERROR ((AE_INFO,
"Insufficient arguments - method [%4.4s] needs %d, found %d",
AcpiUtGetNodeName (Info->ResolvedNode),
Info->ObjDesc->Method.ParamCount, Info->ParamCount));
return_ACPI_STATUS (AE_MISSING_ARGUMENTS);
}
/* Just a warning if too many arguments */
else if (Info->ParamCount > Info->ObjDesc->Method.ParamCount)
{
ACPI_WARNING ((AE_INFO,
"Excess arguments - method [%4.4s] needs %d, found %d",
AcpiUtGetNodeName (Info->ResolvedNode),
Info->ObjDesc->Method.ParamCount, Info->ParamCount));
}
ACPI_DUMP_PATHNAME (Info->ResolvedNode, "Execute Method:",
ACPI_LV_INFO, _COMPONENT);

View File

@ -666,7 +666,6 @@ AcpiNsInitOneDevice (
Info->PrefixNode = DeviceNode;
Info->Pathname = METHOD_NAME__INI;
Info->Parameters = NULL;
Info->ParameterType = ACPI_PARAM_ARGS;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
Status = AcpiNsEvaluate (Info);

View File

@ -154,7 +154,7 @@ AcpiNsDeleteSubtree (
ACPI_STATUS
AcpiNsLoadTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node)
{
ACPI_STATUS Status;

View File

@ -142,13 +142,13 @@
ACPI_STATUS
AcpiNsOneCompleteParse (
ACPI_NATIVE_UINT PassNumber,
ACPI_NATIVE_UINT TableIndex,
UINT32 PassNumber,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_PARSE_OBJECT *ParseRoot;
ACPI_STATUS Status;
ACPI_NATIVE_UINT AmlLength;
UINT32 AmlLength;
UINT8 *AmlStart;
ACPI_WALK_STATE *WalkState;
ACPI_TABLE_HEADER *Table;
@ -200,7 +200,7 @@ AcpiNsOneCompleteParse (
AmlStart = (UINT8 *) Table + sizeof (ACPI_TABLE_HEADER);
AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL,
AmlStart, (UINT32) AmlLength, NULL, (UINT8) PassNumber);
AmlStart, AmlLength, NULL, (UINT8) PassNumber);
}
if (ACPI_FAILURE (Status))
@ -247,7 +247,7 @@ Cleanup:
ACPI_STATUS
AcpiNsParseTable (
ACPI_NATIVE_UINT TableIndex,
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_STATUS Status;

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
* $Revision: 1.122 $
* $Revision: 1.123 $
*
******************************************************************************/
@ -408,25 +408,7 @@ AcpiNsSearchAndEnter (
* this problem, and we want to be able to enable ACPI support for them,
* even though there are a few bad names.
*/
if (!AcpiUtValidAcpiName (TargetName))
{
TargetName = AcpiUtRepairName (ACPI_CAST_PTR (char, &TargetName));
/* Report warning only if in strict mode or debug mode */
if (!AcpiGbl_EnableInterpreterSlack)
{
ACPI_WARNING ((AE_INFO,
"Found bad character(s) in name, repaired: [%4.4s]\n",
ACPI_CAST_PTR (char, &TargetName)));
}
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_WARN,
"Found bad character(s) in name, repaired: [%4.4s]\n",
ACPI_CAST_PTR (char, &TargetName)));
}
}
AcpiUtRepairName (ACPI_CAST_PTR (char, &TargetName));
/* Try to find the name in the namespace level specified by the caller */

View File

@ -154,9 +154,9 @@ AcpiNsFindParentName (
void
AcpiNsReportError (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *InternalName,
const char *InternalName,
ACPI_STATUS LookupStatus)
{
ACPI_STATUS Status;
@ -221,11 +221,11 @@ AcpiNsReportError (
void
AcpiNsReportMethodError (
char *ModuleName,
const char *ModuleName,
UINT32 LineNumber,
char *Message,
const char *Message,
ACPI_NAMESPACE_NODE *PrefixNode,
char *Path,
const char *Path,
ACPI_STATUS MethodStatus)
{
ACPI_STATUS Status;
@ -264,7 +264,7 @@ AcpiNsReportMethodError (
void
AcpiNsPrintNodePathname (
ACPI_NAMESPACE_NODE *Node,
char *Message)
const char *Message)
{
ACPI_BUFFER Buffer;
ACPI_STATUS Status;
@ -415,7 +415,7 @@ void
AcpiNsGetInternalNameLength (
ACPI_NAMESTRING_INFO *Info)
{
char *NextExternalChar;
const char *NextExternalChar;
UINT32 i;
@ -494,9 +494,9 @@ AcpiNsBuildInternalName (
{
UINT32 NumSegments = Info->NumSegments;
char *InternalName = Info->InternalName;
char *ExternalName = Info->NextExternalChar;
const char *ExternalName = Info->NextExternalChar;
char *Result = NULL;
ACPI_NATIVE_UINT i;
UINT32 i;
ACPI_FUNCTION_TRACE (NsBuildInternalName);
@ -546,13 +546,13 @@ AcpiNsBuildInternalName (
else if (NumSegments == 2)
{
InternalName[i] = AML_DUAL_NAME_PREFIX;
Result = &InternalName[(ACPI_NATIVE_UINT) (i+1)];
Result = &InternalName[(ACPI_SIZE) i+1];
}
else
{
InternalName[i] = AML_MULTI_NAME_PREFIX_OP;
InternalName[(ACPI_NATIVE_UINT) (i+1)] = (char) NumSegments;
Result = &InternalName[(ACPI_NATIVE_UINT) (i+2)];
InternalName[(ACPI_SIZE) i+1] = (char) NumSegments;
Result = &InternalName[(ACPI_SIZE) i+2];
}
}
@ -628,7 +628,7 @@ AcpiNsBuildInternalName (
ACPI_STATUS
AcpiNsInternalizeName (
char *ExternalName,
const char *ExternalName,
char **ConvertedName)
{
char *InternalName;
@ -694,16 +694,16 @@ AcpiNsInternalizeName (
ACPI_STATUS
AcpiNsExternalizeName (
UINT32 InternalNameLength,
char *InternalName,
const char *InternalName,
UINT32 *ConvertedNameLength,
char **ConvertedName)
{
ACPI_NATIVE_UINT NamesIndex = 0;
ACPI_NATIVE_UINT NumSegments = 0;
ACPI_NATIVE_UINT RequiredLength;
ACPI_NATIVE_UINT PrefixLength = 0;
ACPI_NATIVE_UINT i = 0;
ACPI_NATIVE_UINT j = 0;
UINT32 NamesIndex = 0;
UINT32 NumSegments = 0;
UINT32 RequiredLength;
UINT32 PrefixLength = 0;
UINT32 i = 0;
UINT32 j = 0;
ACPI_FUNCTION_TRACE (NsExternalizeName);
@ -762,8 +762,8 @@ AcpiNsExternalizeName (
/* <count> 4-byte names */
NamesIndex = PrefixLength + 2;
NumSegments = (ACPI_NATIVE_UINT) (UINT8)
InternalName[(ACPI_NATIVE_UINT) (PrefixLength + 1)];
NumSegments = (UINT8)
InternalName[(ACPI_SIZE) PrefixLength + 1];
break;
case AML_DUAL_NAME_PREFIX:
@ -1033,7 +1033,7 @@ AcpiNsOpensScope (
ACPI_STATUS
AcpiNsGetNode (
ACPI_NAMESPACE_NODE *PrefixNode,
char *Pathname,
const char *Pathname,
UINT32 Flags,
ACPI_NAMESPACE_NODE **ReturnNode)
{

View File

@ -272,7 +272,6 @@ AcpiEvaluateObject (
}
Info->Pathname = Pathname;
Info->ParameterType = ACPI_PARAM_ARGS;
/* Convert and validate the device handle */
@ -556,7 +555,7 @@ AcpiNsGetDeviceCallback (
UINT32 Flags;
ACPI_DEVICE_ID Hid;
ACPI_COMPATIBLE_ID_LIST *Cid;
ACPI_NATIVE_UINT i;
UINT32 i;
BOOLEAN Found;

View File

@ -200,7 +200,7 @@ ACPI_PHYSICAL_ADDRESS
AcpiOsGetRootPointer (void)
{
#ifdef _KERNEL_MODE
ACPI_NATIVE_UINT address;
ACPI_SIZE address;
ACPI_STATUS status;
if (acpi_root == 0) {
status = AcpiFindRootPointer(&address);
@ -500,7 +500,7 @@ AcpiOsGetLine (
void *
AcpiOsMapMemory (
ACPI_PHYSICAL_ADDRESS where,
ACPI_NATIVE_UINT length)
ACPI_SIZE length)
{
#ifdef _KERNEL_MODE

View File

@ -156,7 +156,7 @@ AcpiPsGetNextPackageLength (
{
UINT8 *Aml = ParserState->Aml;
UINT32 PackageLength = 0;
ACPI_NATIVE_UINT ByteCount;
UINT32 ByteCount;
UINT8 ByteZeroMask = 0x3F; /* Default [0:5] */
@ -168,7 +168,7 @@ AcpiPsGetNextPackageLength (
* used to encode the package length, either 0,1,2, or 3
*/
ByteCount = (Aml[0] >> 6);
ParserState->Aml += (ByteCount + 1);
ParserState->Aml += ((ACPI_SIZE) ByteCount + 1);
/* Get bytes 3, 2, 1 as needed */
@ -371,7 +371,7 @@ AcpiPsGetNextNamepath (
PossibleMethodCall &&
(Node->Type == ACPI_TYPE_METHOD))
{
if (WalkState->Op->Common.AmlOpcode == AML_UNLOAD_OP)
if (WalkState->Opcode == AML_UNLOAD_OP)
{
/*
* AcpiPsGetNextNamestring has increased the AML pointer,
@ -831,7 +831,7 @@ AcpiPsGetNextArg (
/* To support SuperName arg of Unload */
if (WalkState->Op->Common.AmlOpcode == AML_UNLOAD_OP)
if (WalkState->Opcode == AML_UNLOAD_OP)
{
Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 1);

Some files were not shown because too many files have changed in this diff Show More