Resolve conflicts arising from the ACPI CA 20021118 import.
This commit is contained in:
parent
10fb1b40ac
commit
05cb8cd7b7
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acconfig.h - Global configuration constants
|
||||
* $Revision: 112 $
|
||||
* $Revision: 118 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
|
||||
/* Version string */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20021002
|
||||
#define ACPI_CA_VERSION 0x20021115
|
||||
|
||||
/* Version of ACPI supported */
|
||||
|
||||
@ -257,6 +257,10 @@
|
||||
#define ACPI_RSDP_CHECKSUM_LENGTH 20
|
||||
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
|
||||
|
||||
/* SMBus bidirectional buffer size */
|
||||
|
||||
#define ACPI_SMBUS_BUFFER_SIZE 34
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -209,7 +209,7 @@ ACPI_STATUS
|
||||
AcpiOsWaitSemaphore (
|
||||
ACPI_HANDLE Handle,
|
||||
UINT32 Units,
|
||||
UINT32 Timeout);
|
||||
UINT16 Timeout);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiOsSignalSemaphore (
|
||||
|
@ -372,7 +372,7 @@ AcpiInstallGpeHandler (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiAcquireGlobalLock (
|
||||
UINT32 Timeout,
|
||||
UINT16 Timeout,
|
||||
UINT32 *Handle);
|
||||
|
||||
ACPI_STATUS
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
|
||||
* $Revision: 146 $
|
||||
* $Revision: 148 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -622,6 +622,10 @@ BOOLEAN
|
||||
AcpiUtValidInternalObject (
|
||||
void *Object);
|
||||
|
||||
ACPI_OPERAND_OBJECT *
|
||||
AcpiUtCreateBufferObject (
|
||||
ACPI_SIZE BufferSize);
|
||||
|
||||
|
||||
/*
|
||||
* UtRefCnt - Object reference count management
|
||||
@ -728,6 +732,11 @@ AcpiUtDeleteObjectCache (
|
||||
* utmisc
|
||||
*/
|
||||
|
||||
void
|
||||
AcpiUtPrintString (
|
||||
char *String,
|
||||
UINT8 MaxLength);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtDivide (
|
||||
ACPI_INTEGER *InDividend,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbcmds - debug commands and output routines
|
||||
* $Revision: 88 $
|
||||
* $Revision: 90 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -412,7 +412,6 @@ AcpiDbSetMethodCallBreakpoint (
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
AcpiGbl_StepToNextCall = TRUE;
|
||||
}
|
||||
|
||||
@ -1055,7 +1054,7 @@ AcpiDbSetScope (
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* DESCRIPTION: Display the resource objects associated with a device.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -1222,7 +1221,7 @@ AcpiDbIntegrityWalk (
|
||||
Node, ACPI_GET_DESCRIPTOR_TYPE (Node));
|
||||
}
|
||||
|
||||
if (Node->Type > INTERNAL_TYPE_MAX)
|
||||
if (Node->Type > ACPI_TYPE_LOCAL_MAX)
|
||||
{
|
||||
AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n",
|
||||
Node, Node->Type);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
|
||||
* be used when running the debugger in Ring 0 (Kernel mode)
|
||||
* $Revision: 68 $
|
||||
* $Revision: 69 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -329,6 +329,10 @@ AcpiDbLoadTable(
|
||||
Actual = fread (AmlStart, 1, (size_t) AmlLength, fp);
|
||||
if (Actual == AmlLength)
|
||||
{
|
||||
/* Now validate the checksum */
|
||||
|
||||
Status = AcpiTbVerifyTableChecksum (*TablePtr);
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -417,6 +421,18 @@ AeLocalLoadTable (
|
||||
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbGetAcpiTable
|
||||
*
|
||||
* PARAMETERS: Filname - File where table is located
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Get an ACPI table from a file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbGetAcpiTable (
|
||||
NATIVE_CHAR *Filename)
|
||||
@ -425,6 +441,7 @@ AcpiDbGetAcpiTable (
|
||||
UINT32 TableLength;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
/* Open the file */
|
||||
|
||||
fp = fopen (Filename, "rb");
|
||||
@ -451,6 +468,7 @@ AcpiDbGetAcpiTable (
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbLoadAcpiTable
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exfldio - Aml Field I/O
|
||||
* $Revision: 88 $
|
||||
* $Revision: 90 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -157,6 +157,8 @@ AcpiExSetupRegion (
|
||||
|
||||
RgnDesc = ObjDesc->CommonField.RegionObj;
|
||||
|
||||
/* We must have a valid region */
|
||||
|
||||
if (ACPI_GET_OBJECT_TYPE (RgnDesc) != ACPI_TYPE_REGION)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Needed Region, found type %X (%s)\n",
|
||||
@ -179,6 +181,13 @@ AcpiExSetupRegion (
|
||||
}
|
||||
}
|
||||
|
||||
if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS)
|
||||
{
|
||||
/* SMBus has a non-linear address space */
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the request. The entire request from the byte offset for a
|
||||
* length of one field datum (access width) must fit within the region.
|
||||
@ -225,8 +234,10 @@ AcpiExSetupRegion (
|
||||
* PARAMETERS: *ObjDesc - Field to be read
|
||||
* FieldDatumByteOffset - Byte offset of this datum within the
|
||||
* parent field
|
||||
* *Value - Where to store value (must be 32 bits)
|
||||
* ReadWrite - Read or Write flag
|
||||
* *Value - Where to store value (must at least
|
||||
* the size of ACPI_INTEGER)
|
||||
* Function - Read or Write flag plus other region-
|
||||
* dependent flags
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@ -239,7 +250,7 @@ AcpiExAccessRegion (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
UINT32 FieldDatumByteOffset,
|
||||
ACPI_INTEGER *Value,
|
||||
UINT32 ReadWrite)
|
||||
UINT32 Function)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *RgnDesc;
|
||||
@ -249,6 +260,16 @@ AcpiExAccessRegion (
|
||||
ACPI_FUNCTION_TRACE ("ExAccessRegion");
|
||||
|
||||
|
||||
/*
|
||||
* Ensure that the region operands are fully evaluated and verify
|
||||
* the validity of the request
|
||||
*/
|
||||
Status = AcpiExSetupRegion (ObjDesc, FieldDatumByteOffset);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* The physical address of this field datum is:
|
||||
*
|
||||
@ -261,7 +282,7 @@ AcpiExAccessRegion (
|
||||
+ ObjDesc->CommonField.BaseByteOffset
|
||||
+ FieldDatumByteOffset;
|
||||
|
||||
if (ReadWrite == ACPI_READ)
|
||||
if ((Function & ACPI_IO_MASK) == ACPI_READ)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "[READ]"));
|
||||
}
|
||||
@ -281,7 +302,7 @@ AcpiExAccessRegion (
|
||||
|
||||
/* Invoke the appropriate AddressSpace/OpRegion handler */
|
||||
|
||||
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ReadWrite,
|
||||
Status = AcpiEvAddressSpaceDispatch (RgnDesc, Function,
|
||||
Address, ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth), Value);
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -293,7 +314,6 @@ AcpiExAccessRegion (
|
||||
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
|
||||
RgnDesc->Region.SpaceId));
|
||||
}
|
||||
|
||||
else if (Status == AE_NOT_EXIST)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
@ -450,7 +470,7 @@ AcpiExFieldDatumIo (
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_BANK_FIELD:
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
|
||||
/* Ensure that the BankValue is not beyond the capacity of the register */
|
||||
|
||||
@ -480,23 +500,17 @@ AcpiExFieldDatumIo (
|
||||
/*lint -fallthrough */
|
||||
|
||||
|
||||
case INTERNAL_TYPE_REGION_FIELD:
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
/*
|
||||
* For simple RegionFields, we just directly access the owning
|
||||
* Operation Region.
|
||||
*/
|
||||
Status = AcpiExSetupRegion (ObjDesc, FieldDatumByteOffset);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiExAccessRegion (ObjDesc, FieldDatumByteOffset, Value,
|
||||
ReadWrite);
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_INDEX_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
||||
|
||||
/* Ensure that the IndexValue is not beyond the capacity of the register */
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exsystem - Interface to OS services
|
||||
* $Revision: 73 $
|
||||
* $Revision: 74 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -143,7 +143,7 @@
|
||||
ACPI_STATUS
|
||||
AcpiExSystemWaitSemaphore (
|
||||
ACPI_HANDLE Semaphore,
|
||||
UINT32 Timeout)
|
||||
UINT16 Timeout)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_STATUS Status2;
|
||||
@ -300,12 +300,12 @@ AcpiExSystemAcquireMutex (
|
||||
*/
|
||||
if (ObjDesc->Mutex.Semaphore == AcpiGbl_GlobalLockSemaphore)
|
||||
{
|
||||
Status = AcpiEvAcquireGlobalLock ((UINT32) TimeDesc->Integer.Value);
|
||||
Status = AcpiEvAcquireGlobalLock ((UINT16) TimeDesc->Integer.Value);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiExSystemWaitSemaphore (ObjDesc->Mutex.Semaphore,
|
||||
(UINT32) TimeDesc->Integer.Value);
|
||||
(UINT16) TimeDesc->Integer.Value);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ AcpiExSystemWaitEvent (
|
||||
if (ObjDesc)
|
||||
{
|
||||
Status = AcpiExSystemWaitSemaphore (ObjDesc->Event.Semaphore,
|
||||
(UINT32) TimeDesc->Integer.Value);
|
||||
(UINT16) TimeDesc->Integer.Value);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
|
||||
* $Revision: 46 $
|
||||
* $Revision: 47 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -432,6 +432,12 @@ AcpiEnterSleepState (
|
||||
|
||||
} while (!InValue);
|
||||
|
||||
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psparse - Parser top level AML parse routines
|
||||
* $Revision: 133 $
|
||||
* $Revision: 135 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -580,7 +580,8 @@ AcpiPsParseLoop (
|
||||
Status = AcpiPsNextParseState (WalkState, Op, Status);
|
||||
}
|
||||
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op));
|
||||
}
|
||||
else if (WalkState->PrevOp)
|
||||
@ -603,7 +604,8 @@ AcpiPsParseLoop (
|
||||
{
|
||||
/* Get the next opcode from the AML stream */
|
||||
|
||||
WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, ParserState->AmlStart);
|
||||
WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml,
|
||||
ParserState->AmlStart);
|
||||
WalkState->Opcode = AcpiPsPeekOpcode (ParserState);
|
||||
|
||||
/*
|
||||
@ -663,9 +665,8 @@ AcpiPsParseLoop (
|
||||
while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
|
||||
(GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME))
|
||||
{
|
||||
Status = AcpiPsGetNextArg (ParserState,
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes),
|
||||
&WalkState->ArgCount, &Arg);
|
||||
Status = AcpiPsGetNextArg (WalkState, ParserState,
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto CloseThisOp;
|
||||
@ -726,7 +727,7 @@ AcpiPsParseLoop (
|
||||
* Defer final parsing of an OperationRegion body,
|
||||
* because we don't have enough info in the first pass
|
||||
* to parse it correctly (i.e., there may be method
|
||||
* calls within the TermArg elements of the body.
|
||||
* calls within the TermArg elements of the body.)
|
||||
*
|
||||
* However, we must continue parsing because
|
||||
* the opregion is not a standalone package --
|
||||
@ -815,22 +816,15 @@ AcpiPsParseLoop (
|
||||
/* Fill in constant or string argument directly */
|
||||
|
||||
AcpiPsGetNextSimpleArg (ParserState,
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), Op);
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), Op);
|
||||
break;
|
||||
|
||||
case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */
|
||||
|
||||
Status = AcpiPsGetNextNamepath (ParserState, Op, &WalkState->ArgCount, 1);
|
||||
Status = AcpiPsGetNextNamepath (WalkState, ParserState, Op, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/* NOT_FOUND is an error only if we are actually executing a method */
|
||||
|
||||
if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
|
||||
(Status == AE_NOT_FOUND)) ||
|
||||
(Status != AE_NOT_FOUND))
|
||||
{
|
||||
goto CloseThisOp;
|
||||
}
|
||||
goto CloseThisOp;
|
||||
}
|
||||
|
||||
WalkState->ArgTypes = 0;
|
||||
@ -841,24 +835,16 @@ AcpiPsParseLoop (
|
||||
|
||||
/* Op is not a constant or string, append each argument */
|
||||
|
||||
while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && !WalkState->ArgCount)
|
||||
while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
|
||||
!WalkState->ArgCount)
|
||||
{
|
||||
WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml,
|
||||
ParserState->AmlStart);
|
||||
Status = AcpiPsGetNextArg (ParserState,
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes),
|
||||
&WalkState->ArgCount, &Arg);
|
||||
Status = AcpiPsGetNextArg (WalkState, ParserState,
|
||||
GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/* NOT_FOUND is an error only if we are actually executing a method */
|
||||
|
||||
if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
|
||||
(Status == AE_NOT_FOUND) &&
|
||||
(Op->Common.AmlOpcode != AML_COND_REF_OF_OP)) ||
|
||||
(Status != AE_NOT_FOUND))
|
||||
{
|
||||
goto CloseThisOp;
|
||||
}
|
||||
goto CloseThisOp;
|
||||
}
|
||||
|
||||
if (Arg)
|
||||
@ -936,7 +922,8 @@ AcpiPsParseLoop (
|
||||
{
|
||||
/* There are arguments (complex ones), push Op and prepare for argument */
|
||||
|
||||
Status = AcpiPsPushScope (ParserState, Op, WalkState->ArgTypes, WalkState->ArgCount);
|
||||
Status = AcpiPsPushScope (ParserState, Op,
|
||||
WalkState->ArgTypes, WalkState->ArgCount);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -1026,7 +1013,8 @@ AcpiPsParseLoop (
|
||||
|
||||
case AE_CTRL_END:
|
||||
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
|
||||
if (Op)
|
||||
{
|
||||
@ -1051,7 +1039,8 @@ AcpiPsParseLoop (
|
||||
|
||||
while (!Op || (Op->Common.AmlOpcode != AML_WHILE_OP))
|
||||
{
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
}
|
||||
|
||||
/* Close this iteration of the While loop */
|
||||
@ -1081,7 +1070,8 @@ AcpiPsParseLoop (
|
||||
{
|
||||
AcpiPsCompleteThisOp (WalkState, Op);
|
||||
}
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
|
||||
} while (Op);
|
||||
|
||||
@ -1096,7 +1086,8 @@ AcpiPsParseLoop (
|
||||
{
|
||||
AcpiPsCompleteThisOp (WalkState, Op);
|
||||
}
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
|
||||
} while (Op);
|
||||
|
||||
@ -1107,7 +1098,8 @@ AcpiPsParseLoop (
|
||||
#if 0
|
||||
if (Op == NULL)
|
||||
{
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
}
|
||||
#endif
|
||||
WalkState->PrevOp = Op;
|
||||
@ -1119,7 +1111,8 @@ AcpiPsParseLoop (
|
||||
|
||||
if (AcpiPsHasCompletedScope (ParserState))
|
||||
{
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op));
|
||||
}
|
||||
else
|
||||
@ -1167,7 +1160,8 @@ AcpiPsParseLoop (
|
||||
AcpiPsCompleteThisOp (WalkState, Op);
|
||||
}
|
||||
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op,
|
||||
&WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
|
||||
} while (Op);
|
||||
|
||||
@ -1184,7 +1178,8 @@ AcpiPsParseLoop (
|
||||
AcpiPsCompleteThisOp (WalkState, Op);
|
||||
}
|
||||
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount);
|
||||
AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes,
|
||||
&WalkState->ArgCount);
|
||||
|
||||
} while (Op);
|
||||
|
||||
@ -1264,7 +1259,8 @@ AcpiPsParseAml (
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"Completed one call to walk loop, State=%p\n", WalkState));
|
||||
"Completed one call to walk loop, %s State=%p\n",
|
||||
AcpiFormatException (Status), WalkState));
|
||||
|
||||
if (Status == AE_CTRL_TRANSFER)
|
||||
{
|
||||
@ -1281,11 +1277,17 @@ AcpiPsParseAml (
|
||||
WalkState = AcpiDsGetCurrentWalkState (Thread);
|
||||
continue;
|
||||
}
|
||||
|
||||
else if (Status == AE_CTRL_TERMINATE)
|
||||
{
|
||||
Status = AE_OK;
|
||||
}
|
||||
else if (Status != AE_OK)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Method execution failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
ACPI_DUMP_PATHNAME (WalkState->MethodNode, "Method pathname: ",
|
||||
ACPI_LV_ERROR, _COMPONENT);
|
||||
}
|
||||
|
||||
/* We are done with this walk, move on to the parent if any */
|
||||
|
||||
@ -1312,7 +1314,8 @@ AcpiPsParseAml (
|
||||
TerminateStatus = AcpiDsTerminateControlMethod (WalkState);
|
||||
if (ACPI_FAILURE (TerminateStatus))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Could not terminate control method properly\n"));
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Could not terminate control method properly\n"));
|
||||
|
||||
/* Ignore error and continue */
|
||||
}
|
||||
@ -1339,7 +1342,8 @@ AcpiPsParseAml (
|
||||
* If the method return value is not used by the parent,
|
||||
* The object is deleted
|
||||
*/
|
||||
Status = AcpiDsRestartControlMethod (WalkState, PreviousWalkState->ReturnDesc);
|
||||
Status = AcpiDsRestartControlMethod (WalkState,
|
||||
PreviousWalkState->ReturnDesc);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
WalkState->WalkType |= ACPI_WALK_METHOD_RESTART;
|
||||
@ -1350,10 +1354,6 @@ AcpiPsParseAml (
|
||||
/* On error, delete any return object */
|
||||
|
||||
AcpiUtRemoveReference (PreviousWalkState->ReturnDesc);
|
||||
|
||||
ACPI_REPORT_ERROR (("Method execution failed, %s\n", AcpiFormatException (Status)));
|
||||
ACPI_DUMP_PATHNAME (WalkState->MethodNode, "Method pathname: ",
|
||||
ACPI_LV_ERROR, _COMPONENT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1376,7 +1376,6 @@ AcpiPsParseAml (
|
||||
|
||||
*(PreviousWalkState->CallerReturnDesc) = PreviousWalkState->ReturnDesc; /* NULL if no return value */
|
||||
}
|
||||
|
||||
else if (PreviousWalkState->ReturnDesc)
|
||||
{
|
||||
/* Caller doesn't want it, must delete it */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: rscreate - Create resource lists/tables
|
||||
* $Revision: 58 $
|
||||
* $Revision: 61 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -159,7 +159,8 @@ AcpiRsCreateResourceList (
|
||||
ACPI_FUNCTION_TRACE ("RsCreateResourceList");
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ByteStreamBuffer = %p\n", ByteStreamBuffer));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ByteStreamBuffer = %p\n",
|
||||
ByteStreamBuffer));
|
||||
|
||||
/*
|
||||
* Params already validated, so we don't re-validate here
|
||||
@ -231,13 +232,13 @@ AcpiRsCreatePciRoutingTable (
|
||||
ACPI_BUFFER *OutputBuffer)
|
||||
{
|
||||
UINT8 *Buffer;
|
||||
ACPI_OPERAND_OBJECT **TopObjectList = NULL;
|
||||
ACPI_OPERAND_OBJECT **SubObjectList = NULL;
|
||||
ACPI_OPERAND_OBJECT *PackageElement = NULL;
|
||||
ACPI_OPERAND_OBJECT **TopObjectList;
|
||||
ACPI_OPERAND_OBJECT **SubObjectList;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_SIZE BufferSizeNeeded = 0;
|
||||
UINT32 NumberOfElements = 0;
|
||||
UINT32 Index = 0;
|
||||
ACPI_PCI_ROUTING_TABLE *UserPrt = NULL;
|
||||
UINT32 NumberOfElements;
|
||||
UINT32 Index;
|
||||
ACPI_PCI_ROUTING_TABLE *UserPrt;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_BUFFER PathBuffer;
|
||||
@ -258,7 +259,8 @@ AcpiRsCreatePciRoutingTable (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", (UINT32) BufferSizeNeeded));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n",
|
||||
(UINT32) BufferSizeNeeded));
|
||||
|
||||
/* Validate/Allocate/Clear caller buffer */
|
||||
|
||||
@ -269,7 +271,8 @@ AcpiRsCreatePciRoutingTable (
|
||||
}
|
||||
|
||||
/*
|
||||
* Loop through the ACPI_INTERNAL_OBJECTS - Each object should contain an
|
||||
* Loop through the ACPI_INTERNAL_OBJECTS - Each object
|
||||
* should be a package that in turn contains an
|
||||
* ACPI_INTEGER Address, a UINT8 Pin, a Name and a UINT8 SourceIndex.
|
||||
*/
|
||||
TopObjectList = PackageObject->Package.Elements;
|
||||
@ -293,87 +296,106 @@ AcpiRsCreatePciRoutingTable (
|
||||
* The minus four is to subtract the size of the UINT8 Source[4] member
|
||||
* because it is added below.
|
||||
*/
|
||||
UserPrt->Length = (sizeof (ACPI_PCI_ROUTING_TABLE) -4);
|
||||
UserPrt->Length = (sizeof (ACPI_PCI_ROUTING_TABLE) - 4);
|
||||
|
||||
/*
|
||||
* Dereference the sub-package
|
||||
* Each element of the top-level package must also be a package
|
||||
*/
|
||||
PackageElement = *TopObjectList;
|
||||
if (ACPI_GET_OBJECT_TYPE (*TopObjectList) != ACPI_TYPE_PACKAGE)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X]) Need sub-package, found %s\n",
|
||||
Index, AcpiUtGetObjectTypeName (*TopObjectList)));
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
/* Each sub-package must be of length 4 */
|
||||
|
||||
if ((*TopObjectList)->Package.Count != 4)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X]) Need package of length 4, found length %d\n",
|
||||
Index, (*TopObjectList)->Package.Count));
|
||||
return_ACPI_STATUS (AE_AML_PACKAGE_LIMIT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dereference the sub-package.
|
||||
* The SubObjectList will now point to an array of the four IRQ
|
||||
* elements: Address, Pin, Source and SourceIndex
|
||||
* elements: [Address, Pin, Source, SourceIndex]
|
||||
*/
|
||||
SubObjectList = PackageElement->Package.Elements;
|
||||
SubObjectList = (*TopObjectList)->Package.Elements;
|
||||
|
||||
/*
|
||||
* 1) First subobject: Dereference the Address
|
||||
* 1) First subobject: Dereference the PRT.Address
|
||||
*/
|
||||
if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER)
|
||||
ObjDesc = SubObjectList[0];
|
||||
if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
|
||||
{
|
||||
UserPrt->Address = (*SubObjectList)->Integer.Value;
|
||||
UserPrt->Address = ObjDesc->Integer.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
|
||||
AcpiUtGetObjectTypeName (*SubObjectList)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X].Address) Need Integer, found %s\n",
|
||||
Index, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
/*
|
||||
* 2) Second subobject: Dereference the Pin
|
||||
* 2) Second subobject: Dereference the PRT.Pin
|
||||
*/
|
||||
SubObjectList++;
|
||||
|
||||
if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER)
|
||||
ObjDesc = SubObjectList[1];
|
||||
if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
|
||||
{
|
||||
UserPrt->Pin = (UINT32) (*SubObjectList)->Integer.Value;
|
||||
UserPrt->Pin = (UINT32) ObjDesc->Integer.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
|
||||
AcpiUtGetObjectTypeName (*SubObjectList)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X].Pin) Need Integer, found %s\n",
|
||||
Index, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
/*
|
||||
* 3) Third subobject: Dereference the Source Name
|
||||
* 3) Third subobject: Dereference the PRT.SourceName
|
||||
*/
|
||||
SubObjectList++;
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (*SubObjectList))
|
||||
ObjDesc = SubObjectList[2];
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case INTERNAL_TYPE_REFERENCE:
|
||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||
|
||||
if ((*SubObjectList)->Reference.Opcode != AML_INT_NAMEPATH_OP)
|
||||
if (ObjDesc->Reference.Opcode != AML_INT_NAMEPATH_OP)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need name, found reference op %X\n",
|
||||
(*SubObjectList)->Reference.Opcode));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X].Source) Need name, found reference op %X\n",
|
||||
Index, ObjDesc->Reference.Opcode));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
Node = (*SubObjectList)->Reference.Node;
|
||||
Node = ObjDesc->Reference.Node;
|
||||
|
||||
/* Use *remaining* length of the buffer as max for pathname */
|
||||
|
||||
PathBuffer.Length = OutputBuffer->Length -
|
||||
(UINT32) ((UINT8 *) UserPrt->Source - (UINT8 *) OutputBuffer->Pointer);
|
||||
(UINT32) ((UINT8 *) UserPrt->Source -
|
||||
(UINT8 *) OutputBuffer->Pointer);
|
||||
PathBuffer.Pointer = UserPrt->Source;
|
||||
|
||||
Status = AcpiNsHandleToPathname ((ACPI_HANDLE) Node, &PathBuffer);
|
||||
|
||||
UserPrt->Length += ACPI_STRLEN (UserPrt->Source) + 1; /* include null terminator */
|
||||
UserPrt->Length += (UINT32) ACPI_STRLEN (UserPrt->Source) + 1; /* include null terminator */
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
ACPI_STRCPY (UserPrt->Source,
|
||||
(*SubObjectList)->String.Pointer);
|
||||
ACPI_STRCPY (UserPrt->Source, ObjDesc->String.Pointer);
|
||||
|
||||
/* Add to the Length field the length of the string */
|
||||
|
||||
UserPrt->Length += (*SubObjectList)->String.Length;
|
||||
UserPrt->Length += ObjDesc->String.Length;
|
||||
break;
|
||||
|
||||
|
||||
@ -390,8 +412,9 @@ AcpiRsCreatePciRoutingTable (
|
||||
|
||||
default:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
|
||||
AcpiUtGetObjectTypeName (*SubObjectList)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X].Source) Need Ref/String/Integer, found %s\n",
|
||||
Index, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
@ -400,22 +423,22 @@ AcpiRsCreatePciRoutingTable (
|
||||
UserPrt->Length = ACPI_ROUND_UP_TO_64BITS (UserPrt->Length);
|
||||
|
||||
/*
|
||||
* 4) Fourth subobject: Dereference the Source Index
|
||||
* 4) Fourth subobject: Dereference the PRT.SourceIndex
|
||||
*/
|
||||
SubObjectList++;
|
||||
|
||||
if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER)
|
||||
ObjDesc = SubObjectList[3];
|
||||
if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
|
||||
{
|
||||
UserPrt->SourceIndex = (UINT32) (*SubObjectList)->Integer.Value;
|
||||
UserPrt->SourceIndex = (UINT32) ObjDesc->Integer.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
|
||||
AcpiUtGetObjectTypeName (*SubObjectList)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"(PRT[%X].SourceIndex) Need Integer, found %s\n",
|
||||
Index, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
return_ACPI_STATUS (AE_BAD_DATA);
|
||||
}
|
||||
|
||||
/* Point to the next ACPI_OPERAND_OBJECT */
|
||||
/* Point to the next ACPI_OPERAND_OBJECT in the top level package */
|
||||
|
||||
TopObjectList++;
|
||||
}
|
||||
@ -456,7 +479,8 @@ AcpiRsCreateByteStream (
|
||||
ACPI_FUNCTION_TRACE ("RsCreateByteStream");
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "LinkedListBuffer = %p\n", LinkedListBuffer));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "LinkedListBuffer = %p\n",
|
||||
LinkedListBuffer));
|
||||
|
||||
/*
|
||||
* Params already validated, so we don't re-validate here
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: tbget - ACPI Table get* routines
|
||||
* $Revision: 80 $
|
||||
* $Revision: 81 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -492,7 +492,6 @@ AcpiTbGetThisTable (
|
||||
TableInfo->Pointer = FullTable;
|
||||
TableInfo->Length = (ACPI_SIZE) Header->Length;
|
||||
TableInfo->Allocation = Allocation;
|
||||
TableInfo->BasePointer = FullTable;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utglobal - Global variables for the ACPI subsystem
|
||||
* $Revision: 171 $
|
||||
* $Revision: 172 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -275,11 +275,11 @@ const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES] = {
|
||||
|
||||
const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
|
||||
{
|
||||
{"_GPE", INTERNAL_TYPE_SCOPE, NULL},
|
||||
{"_PR_", INTERNAL_TYPE_SCOPE, NULL},
|
||||
{"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||
{"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||
{"_SB_", ACPI_TYPE_DEVICE, NULL},
|
||||
{"_SI_", INTERNAL_TYPE_SCOPE, NULL},
|
||||
{"_TZ_", INTERNAL_TYPE_SCOPE, NULL},
|
||||
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||
{"_TZ_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||
{"_REV", ACPI_TYPE_INTEGER, "2"},
|
||||
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
||||
{"_GL_", ACPI_TYPE_MUTEX, "0"},
|
||||
@ -324,17 +324,10 @@ const UINT8 AcpiGbl_NsProperties[] =
|
||||
ACPI_NS_NORMAL, /* 23 Address Handler */
|
||||
ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 24 Resource Desc */
|
||||
ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Field */
|
||||
ACPI_NS_NORMAL, /* 26 DefFieldDefn */
|
||||
ACPI_NS_NORMAL, /* 27 BankFieldDefn */
|
||||
ACPI_NS_NORMAL, /* 28 IndexFieldDefn */
|
||||
ACPI_NS_NORMAL, /* 29 If */
|
||||
ACPI_NS_NORMAL, /* 30 Else */
|
||||
ACPI_NS_NORMAL, /* 31 While */
|
||||
ACPI_NS_NEWSCOPE, /* 32 Scope */
|
||||
ACPI_NS_LOCAL, /* 33 DefAny */
|
||||
ACPI_NS_NORMAL, /* 34 Extra */
|
||||
ACPI_NS_NORMAL, /* 35 Data */
|
||||
ACPI_NS_NORMAL /* 36 Invalid */
|
||||
ACPI_NS_NEWSCOPE, /* 26 Scope */
|
||||
ACPI_NS_NORMAL, /* 27 Extra */
|
||||
ACPI_NS_NORMAL, /* 28 Data */
|
||||
ACPI_NS_NORMAL /* 29 Invalid */
|
||||
};
|
||||
|
||||
|
||||
@ -580,17 +573,10 @@ static const NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC
|
||||
/* 23 */ "AddrHandler",
|
||||
/* 24 */ "ResourceDesc",
|
||||
/* 25 */ "ResourceFld",
|
||||
/* 26 */ "RegionFldDfn",
|
||||
/* 27 */ "BankFldDfn",
|
||||
/* 28 */ "IndexFldDfn",
|
||||
/* 29 */ "If",
|
||||
/* 30 */ "Else",
|
||||
/* 31 */ "While",
|
||||
/* 32 */ "Scope",
|
||||
/* 33 */ "DefAny",
|
||||
/* 34 */ "Extra",
|
||||
/* 35 */ "Data",
|
||||
/* 36 */ "Invalid"
|
||||
/* 26 */ "Scope",
|
||||
/* 27 */ "Extra",
|
||||
/* 28 */ "Data",
|
||||
/* 39 */ "Invalid"
|
||||
};
|
||||
|
||||
|
||||
@ -599,7 +585,7 @@ AcpiUtGetTypeName (
|
||||
ACPI_OBJECT_TYPE Type)
|
||||
{
|
||||
|
||||
if (Type > INTERNAL_TYPE_INVALID)
|
||||
if (Type > ACPI_TYPE_INVALID)
|
||||
{
|
||||
return ((NATIVE_CHAR *) AcpiGbl_BadType);
|
||||
}
|
||||
@ -662,7 +648,7 @@ AcpiUtGetMutexName (
|
||||
*
|
||||
* FUNCTION: AcpiUtValidObjectType
|
||||
*
|
||||
* PARAMETERS: None.
|
||||
* PARAMETERS: Type - Object type to be validated
|
||||
*
|
||||
* RETURN: TRUE if valid object type
|
||||
*
|
||||
@ -675,13 +661,11 @@ AcpiUtValidObjectType (
|
||||
ACPI_OBJECT_TYPE Type)
|
||||
{
|
||||
|
||||
if (Type > ACPI_TYPE_MAX)
|
||||
if (Type > ACPI_TYPE_LOCAL_MAX)
|
||||
{
|
||||
if ((Type < INTERNAL_TYPE_BEGIN) ||
|
||||
(Type > INTERNAL_TYPE_MAX))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
/* Note: Assumes all TYPEs are contiguous (external/local) */
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
@ -866,7 +850,7 @@ AcpiUtInitGlobals (
|
||||
|
||||
AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
|
||||
AcpiGbl_RootNodeStruct.Descriptor = ACPI_DESC_TYPE_NAMED;
|
||||
AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_ANY;
|
||||
AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE;
|
||||
AcpiGbl_RootNodeStruct.Child = NULL;
|
||||
AcpiGbl_RootNodeStruct.Peer = NULL;
|
||||
AcpiGbl_RootNodeStruct.Object = NULL;
|
||||
|
@ -144,7 +144,7 @@ AcpiOsDeleteSemaphore (ACPI_HANDLE Handle)
|
||||
* use getmicrotime() to correctly adjust the timeout after being woken up.
|
||||
*/
|
||||
ACPI_STATUS
|
||||
AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT32 Timeout)
|
||||
AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout)
|
||||
{
|
||||
#ifndef ACPI_NO_SEMAPHORES
|
||||
struct acpi_semaphore *as = (struct acpi_semaphore *)Handle;
|
||||
@ -179,8 +179,8 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT32 Timeout)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* a timeout of WAIT_FOREVER means "forever" */
|
||||
if (Timeout == WAIT_FOREVER) {
|
||||
/* a timeout of ACPI_WAIT_FOREVER means "forever" */
|
||||
if (Timeout == ACPI_WAIT_FOREVER) {
|
||||
tmo = 0;
|
||||
timeouttv.tv_sec = ((0xffff/1000) + 1); /* cf. ACPI spec */
|
||||
timeouttv.tv_usec = 0;
|
||||
|
@ -254,8 +254,8 @@ EcLock(struct acpi_ec_softc *sc)
|
||||
{
|
||||
ACPI_STATUS status;
|
||||
|
||||
/* XXX WAIT_FOREVER is probably a bad idea, what is a better time? */
|
||||
if (ACPI_SUCCESS(status = AcpiAcquireGlobalLock(WAIT_FOREVER, &sc->ec_lockhandle)))
|
||||
/* XXX ACPI_WAIT_FOREVER is probably a bad idea, what is a better time? */
|
||||
if (ACPI_SUCCESS(status = AcpiAcquireGlobalLock(ACPI_WAIT_FOREVER, &sc->ec_lockhandle)))
|
||||
(sc)->ec_locked = 1;
|
||||
|
||||
return(status);
|
||||
|
@ -52,6 +52,7 @@
|
||||
#define isxdigit(c) (isdigit(c) \
|
||||
|| ((c) >= 'A' && (c) <= 'F') \
|
||||
|| ((c) >= 'a' && (c) <= 'f'))
|
||||
#define isprint(c) ((c) >= ' ' && (c) <= '~')
|
||||
|
||||
#define toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))
|
||||
#define tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))
|
||||
|
Loading…
Reference in New Issue
Block a user