mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[ACPICA]
- Update to version 20150410 CORE-10509 svn path=/trunk/; revision=69868
This commit is contained in:
parent
480cf4df92
commit
1ac3551821
210 changed files with 1476 additions and 977 deletions
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -549,7 +549,7 @@ AcpiDsEvalRegionOperands (
|
|||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||
ObjDesc,
|
||||
ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
|
||||
ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
|
||||
ObjDesc->Region.Length));
|
||||
|
||||
/* Now the address and length are valid for this opregion */
|
||||
|
@ -651,12 +651,12 @@ AcpiDsEvalTableRegionOperands (
|
|||
return_ACPI_STATUS (AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
|
||||
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
|
||||
ObjDesc->Region.Length = Table->Length;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||
ObjDesc,
|
||||
ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
|
||||
ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
|
||||
ObjDesc->Region.Length));
|
||||
|
||||
/* Now the address and length are valid for this opregion */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -671,6 +671,15 @@ AcpiDsCreateOperand (
|
|||
ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
|
||||
Status = AE_OK;
|
||||
}
|
||||
else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
|
||||
{
|
||||
/* TBD: May only be temporary */
|
||||
|
||||
ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
|
||||
|
||||
ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
|
||||
Status = AE_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -120,9 +120,7 @@
|
|||
|
||||
#define _COMPONENT ACPI_EVENTS
|
||||
ACPI_MODULE_NAME ("evglock")
|
||||
#if ACPI_REDUCED_HARDWARE
|
||||
#error
|
||||
#endif
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
|
||||
|
||||
/* Local prototypes */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -203,18 +203,6 @@ AcpiEvEnableGpe (
|
|||
ACPI_FUNCTION_TRACE (EvEnableGpe);
|
||||
|
||||
|
||||
/*
|
||||
* We will only allow a GPE to be enabled if it has either an associated
|
||||
* method (_Lxx/_Exx) or a handler, or is using the implicit notify
|
||||
* feature. Otherwise, the GPE will be immediately disabled by
|
||||
* AcpiEvGpeDispatch the first time it fires.
|
||||
*/
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_NONE)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_HANDLER);
|
||||
}
|
||||
|
||||
/* Clear the GPE (of stale events) */
|
||||
|
||||
Status = AcpiHwClearGpe (GpeEventInfo);
|
||||
|
@ -225,7 +213,7 @@ AcpiEvEnableGpe (
|
|||
|
||||
/* Enable the requested GPE */
|
||||
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
@ -315,7 +303,7 @@ AcpiEvRemoveGpeReference (
|
|||
Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE);
|
||||
}
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
|
@ -455,7 +443,11 @@ AcpiEvGpeDetect (
|
|||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
ACPI_NAMESPACE_NODE *GpeDevice;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
UINT32 GpeNumber;
|
||||
ACPI_GPE_HANDLER_INFO *GpeHandlerInfo;
|
||||
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
UINT8 EnabledStatusByte;
|
||||
UINT32 StatusReg;
|
||||
|
@ -486,6 +478,8 @@ AcpiEvGpeDetect (
|
|||
GpeBlock = GpeXruptList->GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
GpeDevice = GpeBlock->Node;
|
||||
|
||||
/*
|
||||
* Read all of the 8-bit GPE status and enable registers in this GPE
|
||||
* block, saving all of them. Find all currently active GP events.
|
||||
|
@ -554,16 +548,55 @@ AcpiEvGpeDetect (
|
|||
{
|
||||
/* Examine one GPE bit */
|
||||
|
||||
GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
|
||||
ACPI_GPE_REGISTER_WIDTH) + j];
|
||||
GpeNumber = j + GpeRegisterInfo->BaseGpeNumber;
|
||||
|
||||
if (EnabledStatusByte & (1 << j))
|
||||
{
|
||||
/*
|
||||
* Found an active GPE. Dispatch the event to a handler
|
||||
* or method.
|
||||
*/
|
||||
IntStatus |= AcpiEvGpeDispatch (GpeBlock->Node,
|
||||
&GpeBlock->EventInfo[((ACPI_SIZE) i *
|
||||
ACPI_GPE_REGISTER_WIDTH) + j],
|
||||
j + GpeRegisterInfo->BaseGpeNumber);
|
||||
/* Invoke global event handler if present */
|
||||
|
||||
AcpiGpeCount++;
|
||||
if (AcpiGbl_GlobalEventHandler)
|
||||
{
|
||||
AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE,
|
||||
GpeDevice, GpeNumber,
|
||||
AcpiGbl_GlobalEventHandlerContext);
|
||||
}
|
||||
|
||||
/* Found an active GPE */
|
||||
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER)
|
||||
{
|
||||
/* Dispatch the event to a raw handler */
|
||||
|
||||
GpeHandlerInfo = GpeEventInfo->Dispatch.Handler;
|
||||
|
||||
/*
|
||||
* There is no protection around the namespace node
|
||||
* and the GPE handler to ensure a safe destruction
|
||||
* because:
|
||||
* 1. The namespace node is expected to always
|
||||
* exist after loading a table.
|
||||
* 2. The GPE handler is expected to be flushed by
|
||||
* AcpiOsWaitEventsComplete() before the
|
||||
* destruction.
|
||||
*/
|
||||
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
|
||||
IntStatus |= GpeHandlerInfo->Address (
|
||||
GpeDevice, GpeNumber, GpeHandlerInfo->Context);
|
||||
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Dispatch the event to a standard handler or
|
||||
* method.
|
||||
*/
|
||||
IntStatus |= AcpiEvGpeDispatch (GpeDevice,
|
||||
GpeEventInfo, GpeNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -599,8 +632,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||
void *Context)
|
||||
{
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_EVENT_INFO *LocalGpeEventInfo;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_EVALUATE_INFO *Info;
|
||||
ACPI_GPE_NOTIFY_INFO *Notify;
|
||||
|
||||
|
@ -608,49 +640,9 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||
ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
|
||||
|
||||
|
||||
/* Allocate a local GPE block */
|
||||
|
||||
LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO));
|
||||
if (!LocalGpeEventInfo)
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
|
||||
"while handling a GPE"));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_FREE (LocalGpeEventInfo);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/* Must revalidate the GpeNumber/GpeBlock */
|
||||
|
||||
if (!AcpiEvValidGpeEvent (GpeEventInfo))
|
||||
{
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
ACPI_FREE (LocalGpeEventInfo);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/*
|
||||
* Take a snapshot of the GPE info for this level - we copy the info to
|
||||
* prevent a race condition with RemoveHandler/RemoveBlock.
|
||||
*/
|
||||
ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo,
|
||||
sizeof (ACPI_GPE_EVENT_INFO));
|
||||
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_FREE (LocalGpeEventInfo);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/* Do the correct dispatch - normal method or implicit notify */
|
||||
|
||||
switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
||||
switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
|
||||
{
|
||||
case ACPI_GPE_DISPATCH_NOTIFY:
|
||||
/*
|
||||
|
@ -664,7 +656,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||
* June 2012: Expand implicit notify mechanism to support
|
||||
* notifies on multiple device objects.
|
||||
*/
|
||||
Notify = LocalGpeEventInfo->Dispatch.NotifyList;
|
||||
Notify = GpeEventInfo->Dispatch.NotifyList;
|
||||
while (ACPI_SUCCESS (Status) && Notify)
|
||||
{
|
||||
Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
|
||||
|
@ -689,7 +681,7 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the
|
||||
* _Lxx/_Exx control method that corresponds to this GPE
|
||||
*/
|
||||
Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
|
||||
Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode;
|
||||
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
|
||||
|
||||
Status = AcpiNsEvaluate (Info);
|
||||
|
@ -700,23 +692,26 @@ AcpiEvAsynchExecuteGpeMethod (
|
|||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"while evaluating GPE method [%4.4s]",
|
||||
AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode)));
|
||||
AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode)));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
return_VOID; /* Should never happen */
|
||||
goto ErrorExit; /* Should never happen */
|
||||
}
|
||||
|
||||
/* Defer enabling of GPE until all notify handlers are done */
|
||||
|
||||
Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
|
||||
AcpiEvAsynchEnableGpe, LocalGpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
AcpiEvAsynchEnableGpe, GpeEventInfo);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
ACPI_FREE (LocalGpeEventInfo);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
ErrorExit:
|
||||
AcpiEvAsynchEnableGpe (GpeEventInfo);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
@ -740,11 +735,13 @@ AcpiEvAsynchEnableGpe (
|
|||
void *Context)
|
||||
{
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
|
||||
ACPI_CPU_FLAGS Flags;
|
||||
|
||||
|
||||
Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
|
||||
(void) AcpiEvFinishGpe (GpeEventInfo);
|
||||
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
|
||||
|
||||
ACPI_FREE (GpeEventInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -785,7 +782,7 @@ AcpiEvFinishGpe (
|
|||
|
||||
/*
|
||||
* Enable this GPE, conditionally. This means that the GPE will
|
||||
* only be physically enabled if the EnableForRun bit is set
|
||||
* only be physically enabled if the EnableMask bit is set
|
||||
* in the EventInfo.
|
||||
*/
|
||||
(void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE);
|
||||
|
@ -823,15 +820,6 @@ AcpiEvGpeDispatch (
|
|||
ACPI_FUNCTION_TRACE (EvGpeDispatch);
|
||||
|
||||
|
||||
/* Invoke global event handler if present */
|
||||
|
||||
AcpiGpeCount++;
|
||||
if (AcpiGbl_GlobalEventHandler)
|
||||
{
|
||||
AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, GpeDevice,
|
||||
GpeNumber, AcpiGbl_GlobalEventHandlerContext);
|
||||
}
|
||||
|
||||
/*
|
||||
* Always disable the GPE so that it does not keep firing before
|
||||
* any asynchronous activity completes (either from the execution
|
||||
|
@ -874,7 +862,7 @@ AcpiEvGpeDispatch (
|
|||
* If there is neither a handler nor a method, leave the GPE
|
||||
* disabled.
|
||||
*/
|
||||
switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
|
||||
switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
|
||||
{
|
||||
case ACPI_GPE_DISPATCH_HANDLER:
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -590,8 +590,9 @@ AcpiEvInitializeGpeBlock (
|
|||
* Ignore GPEs that have no corresponding _Lxx/_Exx method
|
||||
* and GPEs that are used to wake the system
|
||||
*/
|
||||
if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_NONE) ||
|
||||
((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) ||
|
||||
(GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE))
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -491,15 +491,17 @@ AcpiEvMatchGpeMethod (
|
|||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER)
|
||||
if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER))
|
||||
{
|
||||
/* If there is already a handler, ignore this GPE method */
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -185,60 +185,6 @@ UnlockAndExit:
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvValidGpeEvent
|
||||
*
|
||||
* PARAMETERS: GpeEventInfo - Info for this GPE
|
||||
*
|
||||
* RETURN: TRUE if the GpeEvent is valid
|
||||
*
|
||||
* DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL.
|
||||
* Should be called only when the GPE lists are semaphore locked
|
||||
* and not subject to change.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiEvValidGpeEvent (
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
ACPI_GPE_XRUPT_INFO *GpeXruptBlock;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* No need for spin lock since we are not changing any list elements */
|
||||
|
||||
/* Walk the GPE interrupt levels */
|
||||
|
||||
GpeXruptBlock = AcpiGbl_GpeXruptListHead;
|
||||
while (GpeXruptBlock)
|
||||
{
|
||||
GpeBlock = GpeXruptBlock->GpeBlockListHead;
|
||||
|
||||
/* Walk the GPE blocks on this interrupt level */
|
||||
|
||||
while (GpeBlock)
|
||||
{
|
||||
if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) &&
|
||||
(&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo))
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
|
||||
GpeXruptBlock = GpeXruptBlock->Next;
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGetGpeDevice
|
||||
|
@ -488,8 +434,10 @@ AcpiEvDeleteGpeHandlers (
|
|||
GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
|
||||
ACPI_GPE_REGISTER_WIDTH) + j];
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER)
|
||||
if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER))
|
||||
{
|
||||
/* Delete an installed handler block */
|
||||
|
||||
|
@ -497,7 +445,7 @@ AcpiEvDeleteGpeHandlers (
|
|||
GpeEventInfo->Dispatch.Handler = NULL;
|
||||
GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
|
||||
}
|
||||
else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
else if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)
|
||||
{
|
||||
/* Delete the implicit notification device list */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -360,7 +360,7 @@ AcpiEvAddressSpaceDispatch (
|
|||
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
|
||||
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
||||
&RegionObj->Region.Handler->AddressSpace, Handler,
|
||||
ACPI_FORMAT_NATIVE_UINT (Address),
|
||||
ACPI_FORMAT_UINT64 (Address),
|
||||
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
|
||||
|
||||
if (!(HandlerDesc->AddressSpace.HandlerFlags &
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -124,6 +124,21 @@
|
|||
#define _COMPONENT ACPI_EVENTS
|
||||
ACPI_MODULE_NAME ("evxface")
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiEvInstallGpeHandler (
|
||||
ACPI_HANDLE GpeDevice,
|
||||
UINT32 GpeNumber,
|
||||
UINT32 Type,
|
||||
BOOLEAN IsRawHandler,
|
||||
ACPI_GPE_HANDLER Address,
|
||||
void *Context);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
@ -894,27 +909,31 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
|
|||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallGpeHandler
|
||||
* FUNCTION: AcpiEvInstallGpeHandler
|
||||
*
|
||||
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* GpeNumber - The GPE number within the GPE block
|
||||
* Type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* IsRawHandler - Whether this GPE should be handled using
|
||||
* the special GPE handler mode.
|
||||
* Address - Address of the handler
|
||||
* Context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
* DESCRIPTION: Internal function to install a handler for a General Purpose
|
||||
* Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInstallGpeHandler (
|
||||
static ACPI_STATUS
|
||||
AcpiEvInstallGpeHandler (
|
||||
ACPI_HANDLE GpeDevice,
|
||||
UINT32 GpeNumber,
|
||||
UINT32 Type,
|
||||
BOOLEAN IsRawHandler,
|
||||
ACPI_GPE_HANDLER Address,
|
||||
void *Context)
|
||||
{
|
||||
|
@ -924,7 +943,7 @@ AcpiInstallGpeHandler (
|
|||
ACPI_CPU_FLAGS Flags;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
|
||||
ACPI_FUNCTION_TRACE (EvInstallGpeHandler);
|
||||
|
||||
|
||||
/* Parameter validation */
|
||||
|
@ -962,8 +981,10 @@ AcpiInstallGpeHandler (
|
|||
|
||||
/* Make sure that there isn't a handler there already */
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER)
|
||||
if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_HANDLER) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER))
|
||||
{
|
||||
Status = AE_ALREADY_EXISTS;
|
||||
goto FreeAndExit;
|
||||
|
@ -980,8 +1001,10 @@ AcpiInstallGpeHandler (
|
|||
* automatically during initialization, in which case it has to be
|
||||
* disabled now to avoid spurious execution of the handler.
|
||||
*/
|
||||
if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
GpeEventInfo->RuntimeCount)
|
||||
{
|
||||
Handler->OriginallyEnabled = TRUE;
|
||||
|
@ -1002,7 +1025,8 @@ AcpiInstallGpeHandler (
|
|||
/* Setup up dispatch flags to indicate handler (vs. method/notify) */
|
||||
|
||||
GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
|
||||
GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_HANDLER);
|
||||
GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ?
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER));
|
||||
|
||||
AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
|
||||
|
||||
|
@ -1017,9 +1041,89 @@ FreeAndExit:
|
|||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallGpeHandler
|
||||
*
|
||||
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* GpeNumber - The GPE number within the GPE block
|
||||
* Type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* Address - Address of the handler
|
||||
* Context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInstallGpeHandler (
|
||||
ACPI_HANDLE GpeDevice,
|
||||
UINT32 GpeNumber,
|
||||
UINT32 Type,
|
||||
ACPI_GPE_HANDLER Address,
|
||||
void *Context)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
|
||||
|
||||
|
||||
Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, FALSE,
|
||||
Address, Context);
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiInstallGpeHandler)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallGpeRawHandler
|
||||
*
|
||||
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
|
||||
* defined GPEs)
|
||||
* GpeNumber - The GPE number within the GPE block
|
||||
* Type - Whether this GPE should be treated as an
|
||||
* edge- or level-triggered interrupt.
|
||||
* Address - Address of the handler
|
||||
* Context - Value passed to the handler on each GPE
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install a handler for a General Purpose Event.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInstallGpeRawHandler (
|
||||
ACPI_HANDLE GpeDevice,
|
||||
UINT32 GpeNumber,
|
||||
UINT32 Type,
|
||||
ACPI_GPE_HANDLER Address,
|
||||
void *Context)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiInstallGpeRawHandler);
|
||||
|
||||
|
||||
Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, TRUE,
|
||||
Address, Context);
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiInstallGpeRawHandler)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiRemoveGpeHandler
|
||||
|
@ -1076,8 +1180,10 @@ AcpiRemoveGpeHandler (
|
|||
|
||||
/* Make sure that a handler is indeed installed */
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
ACPI_GPE_DISPATCH_HANDLER)
|
||||
if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
|
||||
ACPI_GPE_DISPATCH_HANDLER) &&
|
||||
(ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
|
||||
ACPI_GPE_DISPATCH_RAW_HANDLER))
|
||||
{
|
||||
Status = AE_NOT_EXIST;
|
||||
goto UnlockAndExit;
|
||||
|
@ -1094,6 +1200,7 @@ AcpiRemoveGpeHandler (
|
|||
/* Remove the handler */
|
||||
|
||||
Handler = GpeEventInfo->Dispatch.Handler;
|
||||
GpeEventInfo->Dispatch.Handler = NULL;
|
||||
|
||||
/* Restore Method node (if any), set dispatch flags */
|
||||
|
||||
|
@ -1107,8 +1214,10 @@ AcpiRemoveGpeHandler (
|
|||
* enabled, it should be enabled at this point to restore the
|
||||
* post-initialization configuration.
|
||||
*/
|
||||
if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
|
||||
ACPI_GPE_DISPATCH_METHOD) ||
|
||||
(ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)) &&
|
||||
Handler->OriginallyEnabled)
|
||||
{
|
||||
(void) AcpiEvAddGpeReference (GpeEventInfo);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -473,7 +473,8 @@ AcpiGetEventStatus (
|
|||
|
||||
if (InByte)
|
||||
{
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
|
||||
LocalEventStatus |=
|
||||
(ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
|
||||
}
|
||||
|
||||
/* Fixed event currently active? */
|
||||
|
@ -487,7 +488,7 @@ AcpiGetEventStatus (
|
|||
|
||||
if (InByte)
|
||||
{
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_SET;
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
|
||||
}
|
||||
|
||||
(*EventStatus) = LocalEventStatus;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -219,7 +219,7 @@ AcpiEnableGpe (
|
|||
GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
|
||||
if (GpeEventInfo)
|
||||
{
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
|
||||
ACPI_GPE_DISPATCH_NONE)
|
||||
{
|
||||
Status = AcpiEvAddGpeReference (GpeEventInfo);
|
||||
|
@ -293,12 +293,21 @@ ACPI_EXPORT_SYMBOL (AcpiDisableGpe)
|
|||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Enable or disable an individual GPE. This function bypasses
|
||||
* the reference count mechanism used in the AcpiEnableGpe and
|
||||
* AcpiDisableGpe interfaces -- and should be used with care.
|
||||
* the reference count mechanism used in the AcpiEnableGpe(),
|
||||
* AcpiDisableGpe() interfaces.
|
||||
* This API is typically used by the GPE raw handler mode driver
|
||||
* to switch between the polling mode and the interrupt mode after
|
||||
* the driver has enabled the GPE.
|
||||
* The APIs should be invoked in this order:
|
||||
* AcpiEnableGpe() <- Ensure the reference count > 0
|
||||
* AcpiSetGpe(ACPI_GPE_DISABLE) <- Enter polling mode
|
||||
* AcpiSetGpe(ACPI_GPE_ENABLE) <- Leave polling mode
|
||||
* AcpiDisableGpe() <- Decrease the reference count
|
||||
*
|
||||
* Note: Typically used to disable a runtime GPE for short period of time,
|
||||
* then re-enable it, without disturbing the existing reference counts. This
|
||||
* is useful, for example, in the Embedded Controller (EC) driver.
|
||||
* Note: If a GPE is shared by 2 silicon components, then both the drivers
|
||||
* should support GPE polling mode or disabling the GPE for long period
|
||||
* for one driver may break the other. So use it with care since all
|
||||
* firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -333,7 +342,7 @@ AcpiSetGpe (
|
|||
{
|
||||
case ACPI_GPE_ENABLE:
|
||||
|
||||
Status = AcpiEvEnableGpe (GpeEventInfo);
|
||||
Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
|
||||
break;
|
||||
|
||||
case ACPI_GPE_DISABLE:
|
||||
|
@ -502,7 +511,7 @@ AcpiSetupGpeForWake (
|
|||
* known as an "implicit notify". Note: The GPE is assumed to be
|
||||
* level-triggered (for windows compatibility).
|
||||
*/
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_NONE)
|
||||
{
|
||||
/*
|
||||
|
@ -517,7 +526,7 @@ AcpiSetupGpeForWake (
|
|||
* If we already have an implicit notify on this GPE, add
|
||||
* this device to the notify list.
|
||||
*/
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
|
||||
ACPI_GPE_DISPATCH_NOTIFY)
|
||||
{
|
||||
/* Ensure that the device is not already in the list */
|
||||
|
@ -874,6 +883,44 @@ AcpiEnableAllRuntimeGpes (
|
|||
ACPI_EXPORT_SYMBOL (AcpiEnableAllRuntimeGpes)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEnableAllWakeupGpes
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in
|
||||
* all GPE blocks.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEnableAllWakeupGpes (
|
||||
void)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiEnableAllWakeupGpes);
|
||||
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiHwEnableAllWakeupGpes ();
|
||||
(void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallGpeBlock
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -856,7 +856,7 @@ AcpiExDumpOperand (
|
|||
else
|
||||
{
|
||||
AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
|
||||
ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
|
||||
ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
|
||||
ObjDesc->Region.Length);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -361,13 +361,13 @@ AcpiExAccessRegion (
|
|||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD,
|
||||
" Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
|
||||
" Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
|
||||
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
|
||||
RgnDesc->Region.SpaceId,
|
||||
ObjDesc->CommonField.AccessByteWidth,
|
||||
ObjDesc->CommonField.BaseByteOffset,
|
||||
FieldDatumByteOffset,
|
||||
ACPI_CAST_PTR (void, (RgnDesc->Region.Address + RegionOffset))));
|
||||
ACPI_FORMAT_UINT64 (RgnDesc->Region.Address + RegionOffset)));
|
||||
|
||||
/* Invoke the appropriate AddressSpace/OpRegion handler */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -198,7 +198,18 @@ AcpiExOpcode_3A_0T_0R (
|
|||
/* Might return while OS is shutting down, just continue */
|
||||
|
||||
ACPI_FREE (Fatal);
|
||||
break;
|
||||
goto Cleanup;
|
||||
|
||||
case AML_EXTERNAL_OP:
|
||||
/*
|
||||
* If the interpreter sees this opcode, just ignore it. The External
|
||||
* op is intended for use by disassemblers in order to properly
|
||||
* disassemble control method invocations. The opcode or group of
|
||||
* opcodes should be surrounded by an "if (0)" clause to ensure that
|
||||
* AML interpreters never see the opcode.
|
||||
*/
|
||||
Status = AE_OK;
|
||||
goto Cleanup;
|
||||
|
||||
default:
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -247,8 +247,8 @@ AcpiExSystemMemorySpaceHandler (
|
|||
* one page, which is similar to the original code that used a 4k
|
||||
* maximum window.
|
||||
*/
|
||||
PageBoundaryMapLength =
|
||||
ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address;
|
||||
PageBoundaryMapLength = (ACPI_SIZE)
|
||||
(ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address);
|
||||
if (PageBoundaryMapLength == 0)
|
||||
{
|
||||
PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE;
|
||||
|
@ -261,13 +261,12 @@ AcpiExSystemMemorySpaceHandler (
|
|||
|
||||
/* Create a new mapping starting at the address given */
|
||||
|
||||
MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
|
||||
(ACPI_PHYSICAL_ADDRESS) Address, MapLength);
|
||||
MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength);
|
||||
if (!MemInfo->MappedLogicalAddress)
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Could not map memory at 0x%8.8X%8.8X, size %u",
|
||||
ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
|
||||
ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength));
|
||||
MemInfo->MappedLength = 0;
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
@ -287,7 +286,7 @@ AcpiExSystemMemorySpaceHandler (
|
|||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
|
||||
BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
|
||||
BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
|
||||
|
||||
/*
|
||||
* Perform the memory read or write
|
||||
|
@ -410,7 +409,7 @@ AcpiExSystemIoSpaceHandler (
|
|||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
|
||||
BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
|
||||
BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
|
||||
|
||||
/* Decode the function parameter */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -130,6 +130,11 @@ AcpiHwEnableWakeupGpeBlock (
|
|||
ACPI_GPE_BLOCK_INFO *GpeBlock,
|
||||
void *Context);
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiHwGpeEnableWrite (
|
||||
UINT8 EnableMask,
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo);
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -200,13 +205,13 @@ AcpiHwLowSetGpe (
|
|||
/* Set or clear just the bit that corresponds to this GPE */
|
||||
|
||||
RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
|
||||
switch (Action)
|
||||
switch (Action & ~ACPI_GPE_SAVE_MASK)
|
||||
{
|
||||
case ACPI_GPE_CONDITIONAL_ENABLE:
|
||||
|
||||
/* Only enable if the EnableForRun bit is set */
|
||||
/* Only enable if the corresponding EnableMask bit is set */
|
||||
|
||||
if (!(RegisterBit & GpeRegisterInfo->EnableForRun))
|
||||
if (!(RegisterBit & GpeRegisterInfo->EnableMask))
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
@ -232,6 +237,10 @@ AcpiHwLowSetGpe (
|
|||
/* Write the updated enable mask */
|
||||
|
||||
Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
|
||||
if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK))
|
||||
{
|
||||
GpeRegisterInfo->EnableMask = (UINT8) EnableMask;
|
||||
}
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
@ -315,7 +324,7 @@ AcpiHwGetGpeStatus (
|
|||
|
||||
/* GPE currently handled? */
|
||||
|
||||
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
|
||||
if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
|
||||
ACPI_GPE_DISPATCH_NONE)
|
||||
{
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;
|
||||
|
@ -343,6 +352,19 @@ AcpiHwGetGpeStatus (
|
|||
LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;
|
||||
}
|
||||
|
||||
/* GPE currently enabled (enable bit == 1)? */
|
||||
|
||||
Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
if (RegisterBit & InByte)
|
||||
{
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET;
|
||||
}
|
||||
|
||||
/* GPE currently active (status bit == 1)? */
|
||||
|
||||
Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress);
|
||||
|
@ -353,7 +375,7 @@ AcpiHwGetGpeStatus (
|
|||
|
||||
if (RegisterBit & InByte)
|
||||
{
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_SET;
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
|
||||
}
|
||||
|
||||
/* Set return value */
|
||||
|
@ -363,6 +385,37 @@ AcpiHwGetGpeStatus (
|
|||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwGpeEnableWrite
|
||||
*
|
||||
* PARAMETERS: EnableMask - Bit mask to write to the GPE register
|
||||
* GpeRegisterInfo - Gpe Register info
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Write the enable mask byte to the given GPE register.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiHwGpeEnableWrite (
|
||||
UINT8 EnableMask,
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
GpeRegisterInfo->EnableMask = EnableMask;
|
||||
}
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwDisableGpeBlock
|
||||
|
@ -392,7 +445,7 @@ AcpiHwDisableGpeBlock (
|
|||
{
|
||||
/* Disable all GPEs in this register */
|
||||
|
||||
Status = AcpiHwWrite (0x00, &GpeBlock->RegisterInfo[i].EnableAddress);
|
||||
Status = AcpiHwGpeEnableWrite (0x00, &GpeBlock->RegisterInfo[i]);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
|
@ -465,6 +518,7 @@ AcpiHwEnableRuntimeGpeBlock (
|
|||
{
|
||||
UINT32 i;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
|
||||
|
||||
/* NOTE: assumes that all GPEs are currently disabled */
|
||||
|
@ -473,15 +527,16 @@ AcpiHwEnableRuntimeGpeBlock (
|
|||
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
if (!GpeBlock->RegisterInfo[i].EnableForRun)
|
||||
GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
|
||||
if (!GpeRegisterInfo->EnableForRun)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Enable all "runtime" GPEs in this register */
|
||||
|
||||
Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForRun,
|
||||
&GpeBlock->RegisterInfo[i].EnableAddress);
|
||||
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun,
|
||||
GpeRegisterInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
|
@ -514,21 +569,21 @@ AcpiHwEnableWakeupGpeBlock (
|
|||
{
|
||||
UINT32 i;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
|
||||
|
||||
/* Examine each GPE Register within the block */
|
||||
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
if (!GpeBlock->RegisterInfo[i].EnableForWake)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
|
||||
|
||||
/* Enable all "wake" GPEs in this register */
|
||||
|
||||
Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForWake,
|
||||
&GpeBlock->RegisterInfo[i].EnableAddress);
|
||||
/*
|
||||
* Enable all "wake" GPEs in this register and disable the
|
||||
* remaining ones.
|
||||
*/
|
||||
Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake,
|
||||
GpeRegisterInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -227,8 +227,8 @@ AcpiHwValidateIoRequest (
|
|||
ByteWidth = ACPI_DIV_8 (BitWidth);
|
||||
LastAddress = Address + ByteWidth - 1;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
|
||||
ACPI_CAST_PTR (void, Address), ACPI_CAST_PTR (void, LastAddress),
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
|
||||
ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress),
|
||||
ByteWidth));
|
||||
|
||||
/* Maximum 16-bit address in I/O space */
|
||||
|
@ -236,8 +236,8 @@ AcpiHwValidateIoRequest (
|
|||
if (LastAddress > ACPI_UINT16_MAX)
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Illegal I/O port address/length above 64K: %p/0x%X",
|
||||
ACPI_CAST_PTR (void, Address), ByteWidth));
|
||||
"Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
|
||||
ACPI_FORMAT_UINT64 (Address), ByteWidth));
|
||||
return_ACPI_STATUS (AE_LIMIT);
|
||||
}
|
||||
|
||||
|
@ -268,8 +268,8 @@ AcpiHwValidateIoRequest (
|
|||
if (AcpiGbl_OsiData >= PortInfo->OsiDependency)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
|
||||
"Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
|
||||
ACPI_CAST_PTR (void, Address), ByteWidth, PortInfo->Name,
|
||||
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
|
||||
ACPI_FORMAT_UINT64 (Address), ByteWidth, PortInfo->Name,
|
||||
PortInfo->Start, PortInfo->End));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_ILLEGAL_ADDRESS);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -124,7 +124,7 @@
|
|||
/* Common info for tool signons */
|
||||
|
||||
#define ACPICA_NAME "Intel ACPI Component Architecture"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2014 Intel Corporation"
|
||||
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2015 Intel Corporation"
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_WIDTH "-64"
|
||||
|
@ -141,15 +141,15 @@
|
|||
/* Macros for signons and file headers */
|
||||
|
||||
#define ACPI_COMMON_SIGNON(UtilityName) \
|
||||
"\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
|
||||
"\n%s\n%s version %8.8X%s\n%s\n\n", \
|
||||
ACPICA_NAME, \
|
||||
UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
||||
UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
|
||||
ACPICA_COPYRIGHT
|
||||
|
||||
#define ACPI_COMMON_HEADER(UtilityName, Prefix) \
|
||||
"%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
|
||||
"%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
|
||||
Prefix, ACPICA_NAME, \
|
||||
Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
||||
Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
|
||||
Prefix, ACPICA_COPYRIGHT, \
|
||||
Prefix
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -149,7 +149,7 @@ typedef struct acpi_db_execute_walk
|
|||
|
||||
|
||||
#define PARAM_LIST(pl) pl
|
||||
#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_verbose)
|
||||
#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_Verbose)
|
||||
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -201,6 +201,7 @@ typedef enum
|
|||
/* Types used only for the Data Table Compiler */
|
||||
|
||||
ACPI_DMT_BUFFER,
|
||||
ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */
|
||||
ACPI_DMT_DEVICE_PATH,
|
||||
ACPI_DMT_LABEL,
|
||||
ACPI_DMT_PCI_PATH,
|
||||
|
@ -423,9 +424,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[];
|
|||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
|
||||
|
@ -494,6 +493,15 @@ AcpiDmLineHeader2 (
|
|||
* dmtbdump
|
||||
*/
|
||||
void
|
||||
AcpiDmDumpBuffer (
|
||||
void *Table,
|
||||
UINT32 BufferOffset,
|
||||
UINT32 Length,
|
||||
UINT32 AbsoluteOffset,
|
||||
char *Header,
|
||||
BOOLEAN MultiLine);
|
||||
|
||||
void
|
||||
AcpiDmDumpAsf (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
|
@ -1068,6 +1076,10 @@ AcpiDmCloseOperator (
|
|||
*/
|
||||
void
|
||||
AdDisassemblerHeader (
|
||||
char *Filename);
|
||||
char *Filename,
|
||||
UINT8 TableType);
|
||||
|
||||
#define ACPI_IS_AML_TABLE 0
|
||||
#define ACPI_IS_DATA_TABLE 1
|
||||
|
||||
#endif /* __ACDISASM_H__ */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -269,10 +269,6 @@ AcpiEvWalkGpeList (
|
|||
ACPI_GPE_CALLBACK GpeWalkCallback,
|
||||
void *Context);
|
||||
|
||||
BOOLEAN
|
||||
AcpiEvValidGpeEvent (
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvGetGpeDevice (
|
||||
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -382,9 +382,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DbOutputFlags, ACPI_DB_CONSOLE_O
|
|||
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE);
|
||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE);
|
||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE);
|
||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
|
||||
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_disasm);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_verbose);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Disasm);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Verbose);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods);
|
||||
ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods);
|
||||
ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList);
|
||||
|
@ -397,9 +398,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateThreads, FALSE);
|
|||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE);
|
||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
|
||||
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_tables);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_stats);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_ini_methods);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport);
|
||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOutputToFile);
|
||||
ACPI_GLOBAL (char *, AcpiGbl_DbBuffer);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -126,7 +126,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
|
|||
|
||||
/* Total number of aml opcodes defined */
|
||||
|
||||
#define AML_NUM_OPCODES 0x81
|
||||
#define AML_NUM_OPCODES 0x82
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
|
@ -592,6 +592,7 @@ typedef struct acpi_gpe_register_info
|
|||
UINT16 BaseGpeNumber; /* Base GPE number for this register */
|
||||
UINT8 EnableForWake; /* GPEs to keep enabled when sleeping */
|
||||
UINT8 EnableForRun; /* GPEs to keep enabled when running */
|
||||
UINT8 EnableMask; /* Current mask of enabled GPEs */
|
||||
|
||||
} ACPI_GPE_REGISTER_INFO;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -136,23 +136,12 @@
|
|||
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (UINT64) (val))
|
||||
|
||||
/*
|
||||
* printf() format helpers. These macros are workarounds for the difficulties
|
||||
* printf() format helper. This macros is a workaround for the difficulties
|
||||
* with emitting 64-bit integers and 64-bit pointers with the same code
|
||||
* for both 32-bit and 64-bit hosts.
|
||||
*/
|
||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
|
||||
#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
|
||||
#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
|
||||
|
||||
#else
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) 0, (UINT32) (i)
|
||||
#define ACPI_FORMAT_TO_UINT(i) (UINT32) (i)
|
||||
#define ACPI_PRINTF_UINT "0x%8.8X"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Macros for moving data around to/from buffers that are possibly unaligned.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -184,6 +184,7 @@
|
|||
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
|
||||
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
|
||||
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
|
||||
#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA)
|
||||
#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
|
||||
#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
|
||||
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
|
@ -317,6 +318,7 @@
|
|||
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_EXTERNAL_OP ARGI_LIST3 (ARGI_STRING, ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -118,7 +118,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20141107
|
||||
#define ACPI_CA_VERSION 0x20150410
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
@ -575,7 +575,7 @@ AcpiReallocateRootTable (
|
|||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiFindRootPointer (
|
||||
ACPI_SIZE *RsdpAddress))
|
||||
ACPI_PHYSICAL_ADDRESS *RsdpAddress))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
|
@ -774,6 +774,15 @@ AcpiInstallGpeHandler (
|
|||
ACPI_GPE_HANDLER Address,
|
||||
void *Context))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiInstallGpeRawHandler (
|
||||
ACPI_HANDLE GpeDevice,
|
||||
UINT32 GpeNumber,
|
||||
UINT32 Type,
|
||||
ACPI_GPE_HANDLER Address,
|
||||
void *Context))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiRemoveGpeHandler (
|
||||
|
@ -958,6 +967,11 @@ ACPI_STATUS
|
|||
AcpiEnableAllRuntimeGpes (
|
||||
void))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiEnableAllWakeupGpes (
|
||||
void))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiGetGpeDevice (
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -425,8 +425,9 @@ AcpiRsSetResourceLength (
|
|||
|
||||
|
||||
/*
|
||||
* rsdump
|
||||
* rsdump - Debugger support
|
||||
*/
|
||||
#ifdef ACPI_DEBUGGER
|
||||
void
|
||||
AcpiRsDumpResourceList (
|
||||
ACPI_RESOURCE *Resource);
|
||||
|
@ -434,6 +435,7 @@ AcpiRsDumpResourceList (
|
|||
void
|
||||
AcpiRsDumpIrqList (
|
||||
UINT8 *RouteTable);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -417,6 +417,36 @@ typedef struct acpi_resource_source
|
|||
UINT8 MaxAddressFixed; \
|
||||
ACPI_RESOURCE_ATTRIBUTE Info;
|
||||
|
||||
typedef struct acpi_address16_attribute
|
||||
{
|
||||
UINT16 Granularity;
|
||||
UINT16 Minimum;
|
||||
UINT16 Maximum;
|
||||
UINT16 TranslationOffset;
|
||||
UINT16 AddressLength;
|
||||
|
||||
} ACPI_ADDRESS16_ATTRIBUTE;
|
||||
|
||||
typedef struct acpi_address32_attribute
|
||||
{
|
||||
UINT32 Granularity;
|
||||
UINT32 Minimum;
|
||||
UINT32 Maximum;
|
||||
UINT32 TranslationOffset;
|
||||
UINT32 AddressLength;
|
||||
|
||||
} ACPI_ADDRESS32_ATTRIBUTE;
|
||||
|
||||
typedef struct acpi_address64_attribute
|
||||
{
|
||||
UINT64 Granularity;
|
||||
UINT64 Minimum;
|
||||
UINT64 Maximum;
|
||||
UINT64 TranslationOffset;
|
||||
UINT64 AddressLength;
|
||||
|
||||
} ACPI_ADDRESS64_ATTRIBUTE;
|
||||
|
||||
typedef struct acpi_resource_address
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS_COMMON
|
||||
|
@ -426,11 +456,7 @@ typedef struct acpi_resource_address
|
|||
typedef struct acpi_resource_address16
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS_COMMON
|
||||
UINT16 Granularity;
|
||||
UINT16 Minimum;
|
||||
UINT16 Maximum;
|
||||
UINT16 TranslationOffset;
|
||||
UINT16 AddressLength;
|
||||
ACPI_ADDRESS16_ATTRIBUTE Address;
|
||||
ACPI_RESOURCE_SOURCE ResourceSource;
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS16;
|
||||
|
@ -438,11 +464,7 @@ typedef struct acpi_resource_address16
|
|||
typedef struct acpi_resource_address32
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS_COMMON
|
||||
UINT32 Granularity;
|
||||
UINT32 Minimum;
|
||||
UINT32 Maximum;
|
||||
UINT32 TranslationOffset;
|
||||
UINT32 AddressLength;
|
||||
ACPI_ADDRESS32_ATTRIBUTE Address;
|
||||
ACPI_RESOURCE_SOURCE ResourceSource;
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS32;
|
||||
|
@ -450,11 +472,7 @@ typedef struct acpi_resource_address32
|
|||
typedef struct acpi_resource_address64
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS_COMMON
|
||||
UINT64 Granularity;
|
||||
UINT64 Minimum;
|
||||
UINT64 Maximum;
|
||||
UINT64 TranslationOffset;
|
||||
UINT64 AddressLength;
|
||||
ACPI_ADDRESS64_ATTRIBUTE Address;
|
||||
ACPI_RESOURCE_SOURCE ResourceSource;
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS64;
|
||||
|
@ -463,11 +481,7 @@ typedef struct acpi_resource_extended_address64
|
|||
{
|
||||
ACPI_RESOURCE_ADDRESS_COMMON
|
||||
UINT8 RevisionID;
|
||||
UINT64 Granularity;
|
||||
UINT64 Minimum;
|
||||
UINT64 Maximum;
|
||||
UINT64 TranslationOffset;
|
||||
UINT64 AddressLength;
|
||||
ACPI_ADDRESS64_ATTRIBUTE Address;
|
||||
UINT64 TypeSpecific;
|
||||
|
||||
} ACPI_RESOURCE_EXTENDED_ADDRESS64;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -141,11 +141,6 @@
|
|||
#define ACPI_WALK_METHOD 0x01
|
||||
#define ACPI_WALK_METHOD_RESTART 0x02
|
||||
|
||||
/* Flags for iASL compiler only */
|
||||
|
||||
#define ACPI_WALK_CONST_REQUIRED 0x10
|
||||
#define ACPI_WALK_CONST_OPTIONAL 0x20
|
||||
|
||||
|
||||
typedef struct acpi_walk_state
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -142,8 +142,9 @@ AcpiTbScanMemoryForRsdp (
|
|||
* tbdata - table data structure management
|
||||
*/
|
||||
ACPI_STATUS
|
||||
AcpiTbGetNextRootIndex (
|
||||
UINT32 *TableIndex);
|
||||
AcpiTbGetNextTableDescriptor (
|
||||
UINT32 *TableIndex,
|
||||
ACPI_TABLE_DESC **TableDesc);
|
||||
|
||||
void
|
||||
AcpiTbInitTableDescriptor (
|
||||
|
@ -245,14 +246,6 @@ AcpiTbInstallStandardTable (
|
|||
BOOLEAN Override,
|
||||
UINT32 *TableIndex);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbStoreTable (
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 Length,
|
||||
UINT8 Flags,
|
||||
UINT32 *TableIndex);
|
||||
|
||||
void
|
||||
AcpiTbUninstallTable (
|
||||
ACPI_TABLE_DESC *TableDesc);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -147,6 +147,7 @@
|
|||
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
|
||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
|
||||
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
|
||||
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
||||
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
||||
|
@ -1051,7 +1052,8 @@ typedef struct acpi_lpit_header
|
|||
enum AcpiLpitType
|
||||
{
|
||||
ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
|
||||
ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
|
||||
ACPI_LPIT_TYPE_SIMPLE_IO = 0x01,
|
||||
ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */
|
||||
};
|
||||
|
||||
/* Masks for Flags field above */
|
||||
|
@ -1154,6 +1156,24 @@ typedef struct acpi_table_mchi
|
|||
} ACPI_TABLE_MCHI;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MSDM - Microsoft Data Management table
|
||||
*
|
||||
* Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
|
||||
* November 29, 2011. Copyright 2011 Microsoft
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Basic MSDM table is only the common ACPI header */
|
||||
|
||||
typedef struct acpi_table_msdm
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
|
||||
} ACPI_TABLE_MSDM;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* MTMR - MID Timer Table
|
||||
|
@ -1185,10 +1205,9 @@ typedef struct acpi_mtmr_entry
|
|||
/*******************************************************************************
|
||||
*
|
||||
* SLIC - Software Licensing Description Table
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
|
||||
* Copyright 2006
|
||||
* Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
|
||||
* November 29, 2011. Copyright 2011 Microsoft
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -1201,62 +1220,6 @@ typedef struct acpi_table_slic
|
|||
} ACPI_TABLE_SLIC;
|
||||
|
||||
|
||||
/* Common SLIC subtable header */
|
||||
|
||||
typedef struct acpi_slic_header
|
||||
{
|
||||
UINT32 Type;
|
||||
UINT32 Length;
|
||||
|
||||
} ACPI_SLIC_HEADER;
|
||||
|
||||
/* Values for Type field above */
|
||||
|
||||
enum AcpiSlicType
|
||||
{
|
||||
ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
|
||||
ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
|
||||
ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* SLIC Subtables, correspond to Type in ACPI_SLIC_HEADER
|
||||
*/
|
||||
|
||||
/* 0: Public Key Structure */
|
||||
|
||||
typedef struct acpi_slic_key
|
||||
{
|
||||
ACPI_SLIC_HEADER Header;
|
||||
UINT8 KeyType;
|
||||
UINT8 Version;
|
||||
UINT16 Reserved;
|
||||
UINT32 Algorithm;
|
||||
char Magic[4];
|
||||
UINT32 BitLength;
|
||||
UINT32 Exponent;
|
||||
UINT8 Modulus[128];
|
||||
|
||||
} ACPI_SLIC_KEY;
|
||||
|
||||
|
||||
/* 1: Windows Marker Structure */
|
||||
|
||||
typedef struct acpi_slic_marker
|
||||
{
|
||||
ACPI_SLIC_HEADER Header;
|
||||
UINT32 Version;
|
||||
char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
|
||||
char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
|
||||
char WindowsFlag[8];
|
||||
UINT32 SlicVersion;
|
||||
UINT8 Reserved[16];
|
||||
UINT8 Signature[128];
|
||||
|
||||
} ACPI_SLIC_MARKER;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* SPCR - Serial Port Console Redirection table
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -232,7 +232,6 @@ typedef int INT32;
|
|||
#endif /* ACPI_USE_SYSTEM_INTTYPES */
|
||||
|
||||
|
||||
|
||||
typedef INT64 ACPI_NATIVE_INT;
|
||||
typedef UINT64 ACPI_SIZE;
|
||||
typedef UINT64 ACPI_IO_ADDRESS;
|
||||
|
@ -272,12 +271,31 @@ typedef int INT32;
|
|||
#endif /* ACPI_USE_SYSTEM_INTTYPES */
|
||||
|
||||
|
||||
|
||||
typedef INT32 ACPI_NATIVE_INT;
|
||||
typedef UINT32 ACPI_SIZE;
|
||||
|
||||
#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
|
||||
|
||||
/*
|
||||
* OSPMs can define this to shrink the size of the structures for 32-bit
|
||||
* none PAE environment. ASL compiler may always define this to generate
|
||||
* 32-bit OSPM compliant tables.
|
||||
*/
|
||||
typedef UINT32 ACPI_IO_ADDRESS;
|
||||
typedef UINT32 ACPI_PHYSICAL_ADDRESS;
|
||||
|
||||
#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||
|
||||
/*
|
||||
* It is reported that, after some calculations, the physical addresses can
|
||||
* wrap over the 32-bit boundary on 32-bit PAE environment.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=87971
|
||||
*/
|
||||
typedef UINT64 ACPI_IO_ADDRESS;
|
||||
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
|
||||
#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||
|
||||
#define ACPI_MAX_PTR ACPI_UINT32_MAX
|
||||
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
|
||||
|
||||
|
@ -794,34 +812,41 @@ typedef UINT32 ACPI_EVENT_TYPE;
|
|||
* The encoding of ACPI_EVENT_STATUS is illustrated below.
|
||||
* Note that a set bit (1) indicates the property is TRUE
|
||||
* (e.g. if bit 0 is set then the event is enabled).
|
||||
* +-------------+-+-+-+-+
|
||||
* | Bits 31:4 |3|2|1|0|
|
||||
* +-------------+-+-+-+-+
|
||||
* | | | | |
|
||||
* | | | | +- Enabled?
|
||||
* | | | +--- Enabled for wake?
|
||||
* | | +----- Set?
|
||||
* | +------- Has a handler?
|
||||
* +------------- <Reserved>
|
||||
* +-------------+-+-+-+-+-+
|
||||
* | Bits 31:5 |4|3|2|1|0|
|
||||
* +-------------+-+-+-+-+-+
|
||||
* | | | | | |
|
||||
* | | | | | +- Enabled?
|
||||
* | | | | +--- Enabled for wake?
|
||||
* | | | +----- Status bit set?
|
||||
* | | +------- Enable bit set?
|
||||
* | +--------- Has a handler?
|
||||
* +--------------- <Reserved>
|
||||
*/
|
||||
typedef UINT32 ACPI_EVENT_STATUS;
|
||||
|
||||
#define ACPI_EVENT_FLAG_DISABLED (ACPI_EVENT_STATUS) 0x00
|
||||
#define ACPI_EVENT_FLAG_ENABLED (ACPI_EVENT_STATUS) 0x01
|
||||
#define ACPI_EVENT_FLAG_WAKE_ENABLED (ACPI_EVENT_STATUS) 0x02
|
||||
#define ACPI_EVENT_FLAG_SET (ACPI_EVENT_STATUS) 0x04
|
||||
#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x08
|
||||
#define ACPI_EVENT_FLAG_STATUS_SET (ACPI_EVENT_STATUS) 0x04
|
||||
#define ACPI_EVENT_FLAG_ENABLE_SET (ACPI_EVENT_STATUS) 0x08
|
||||
#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x10
|
||||
#define ACPI_EVENT_FLAG_SET ACPI_EVENT_FLAG_STATUS_SET
|
||||
|
||||
/* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */
|
||||
|
||||
#define ACPI_GPE_ENABLE 0
|
||||
#define ACPI_GPE_DISABLE 1
|
||||
#define ACPI_GPE_CONDITIONAL_ENABLE 2
|
||||
#define ACPI_GPE_SAVE_MASK 4
|
||||
|
||||
#define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK)
|
||||
#define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK)
|
||||
|
||||
/*
|
||||
* GPE info flags - Per GPE
|
||||
* +-------+-+-+---+
|
||||
* | 7:4 |3|2|1:0|
|
||||
* | 7:5 |4|3|2:0|
|
||||
* +-------+-+-+---+
|
||||
* | | | |
|
||||
* | | | +-- Type of dispatch:to method, handler, notify, or none
|
||||
|
@ -833,13 +858,15 @@ typedef UINT32 ACPI_EVENT_STATUS;
|
|||
#define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x01
|
||||
#define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x02
|
||||
#define ACPI_GPE_DISPATCH_NOTIFY (UINT8) 0x03
|
||||
#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x03
|
||||
#define ACPI_GPE_DISPATCH_RAW_HANDLER (UINT8) 0x04
|
||||
#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x07
|
||||
#define ACPI_GPE_DISPATCH_TYPE(flags) ((UINT8) ((flags) & ACPI_GPE_DISPATCH_MASK))
|
||||
|
||||
#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x04
|
||||
#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x08
|
||||
#define ACPI_GPE_EDGE_TRIGGERED (UINT8) 0x00
|
||||
#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x04
|
||||
#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x08
|
||||
|
||||
#define ACPI_GPE_CAN_WAKE (UINT8) 0x08
|
||||
#define ACPI_GPE_CAN_WAKE (UINT8) 0x10
|
||||
|
||||
/*
|
||||
* Flags for GPE and Lock interfaces
|
||||
|
@ -1412,6 +1439,7 @@ typedef struct acpi_memory_list
|
|||
#define ACPI_OSI_WIN_VISTA_SP2 0x0A
|
||||
#define ACPI_OSI_WIN_7 0x0B
|
||||
#define ACPI_OSI_WIN_8 0x0C
|
||||
#define ACPI_OSI_WIN_10 0x0D
|
||||
|
||||
|
||||
/* Definitions of file IO */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -795,6 +795,12 @@ const ACPI_PREDEFINED_INFO *
|
|||
AcpiUtMatchPredefinedMethod (
|
||||
char *Name);
|
||||
|
||||
void
|
||||
AcpiUtGetExpectedReturnTypes (
|
||||
char *Buffer,
|
||||
UINT32 ExpectedBtypes);
|
||||
|
||||
#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
|
||||
const ACPI_PREDEFINED_INFO *
|
||||
AcpiUtMatchResourceName (
|
||||
char *Name);
|
||||
|
@ -805,15 +811,11 @@ AcpiUtDisplayPredefinedMethod (
|
|||
const ACPI_PREDEFINED_INFO *ThisName,
|
||||
BOOLEAN MultiLine);
|
||||
|
||||
void
|
||||
AcpiUtGetExpectedReturnTypes (
|
||||
char *Buffer,
|
||||
UINT32 ExpectedBtypes);
|
||||
|
||||
UINT32
|
||||
AcpiUtGetResourceBitWidth (
|
||||
char *Buffer,
|
||||
UINT16 Types);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
@ -854,13 +856,6 @@ AcpiUtCreateUpdateStateAndPush (
|
|||
UINT16 Action,
|
||||
ACPI_GENERIC_STATE **StateList);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtCreatePkgStateAndPush (
|
||||
void *InternalObject,
|
||||
void *ExternalObject,
|
||||
UINT16 Index,
|
||||
ACPI_GENERIC_STATE **StateList);
|
||||
|
||||
ACPI_GENERIC_STATE *
|
||||
AcpiUtCreateControlState (
|
||||
void);
|
||||
|
@ -899,9 +894,11 @@ BOOLEAN
|
|||
AcpiUtIsPciRootBridge (
|
||||
char *Id);
|
||||
|
||||
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
|
||||
BOOLEAN
|
||||
AcpiUtIsAmlTable (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
#endif
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtWalkPackageTree (
|
||||
|
@ -990,6 +987,7 @@ void
|
|||
AcpiUtStrupr (
|
||||
char *SrcString);
|
||||
|
||||
#ifdef ACPI_ASL_COMPILER
|
||||
void
|
||||
AcpiUtStrlwr (
|
||||
char *SrcString);
|
||||
|
@ -998,6 +996,7 @@ int
|
|||
AcpiUtStricmp (
|
||||
char *String1,
|
||||
char *String2);
|
||||
#endif
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtStrtoul64 (
|
||||
|
@ -1010,9 +1009,11 @@ AcpiUtPrintString (
|
|||
char *String,
|
||||
UINT16 MaxLength);
|
||||
|
||||
#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
|
||||
void
|
||||
UtConvertBackslashes (
|
||||
char *Pathname);
|
||||
#endif
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiName (
|
||||
|
@ -1259,9 +1260,11 @@ AcpiUtFilePrintf (
|
|||
/*
|
||||
* utuuid -- UUID support functions
|
||||
*/
|
||||
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
|
||||
void
|
||||
AcpiUtConvertStringToUuid (
|
||||
char *InString,
|
||||
UINT8 *UuidBuffer);
|
||||
#endif
|
||||
|
||||
#endif /* _ACUTILS_H */
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -137,6 +137,7 @@
|
|||
#define AML_PACKAGE_OP (UINT16) 0x12
|
||||
#define AML_VAR_PACKAGE_OP (UINT16) 0x13 /* ACPI 2.0 */
|
||||
#define AML_METHOD_OP (UINT16) 0x14
|
||||
#define AML_EXTERNAL_OP (UINT16) 0x15 /* ACPI 6.0 */
|
||||
#define AML_DUAL_NAME_PREFIX (UINT16) 0x2e
|
||||
#define AML_MULTI_NAME_PREFIX_OP (UINT16) 0x2f
|
||||
#define AML_NAME_CHAR_SUBSEQ (UINT16) 0x30
|
||||
|
@ -281,7 +282,6 @@
|
|||
#define AML_INT_RESERVEDFIELD_OP (UINT16) 0x0031
|
||||
#define AML_INT_ACCESSFIELD_OP (UINT16) 0x0032
|
||||
#define AML_INT_BYTELIST_OP (UINT16) 0x0033
|
||||
#define AML_INT_STATICSTRING_OP (UINT16) 0x0034
|
||||
#define AML_INT_METHODCALL_OP (UINT16) 0x0035
|
||||
#define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036
|
||||
#define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue