*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
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 */
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 */
*
* 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
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
{
/*
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evglock")
-#if ACPI_REDUCED_HARDWARE
-#error
-#endif
+
#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/* Local prototypes */
*
* 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
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);
/* Enable the requested GPE */
- Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE);
return_ACPI_STATUS (Status);
}
Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
if (ACPI_SUCCESS (Status))
{
- Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE);
}
if (ACPI_FAILURE (Status))
{
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;
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.
{
/* 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);
+ }
}
}
}
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;
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:
/*
* 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,
* 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);
{
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;
}
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;
}
/*
* 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);
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
* 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:
*
* 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
* 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;
*
* 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
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)
{
/*
*
* 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
}
-/*******************************************************************************
- *
- * 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
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 */
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 */
*
* 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
*
* 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
*
* 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
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 &
*
* 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
*
* 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
*
* 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
#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
+
/*******************************************************************************
*
/*******************************************************************************
*
- * 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)
{
ACPI_CPU_FLAGS Flags;
- ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
+ ACPI_FUNCTION_TRACE (EvInstallGpeHandler);
/* Parameter validation */
/* 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;
* 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;
/* 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);
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
/* 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;
/* Remove the handler */
Handler = GpeEventInfo->Dispatch.Handler;
+ GpeEventInfo->Dispatch.Handler = NULL;
/* Restore Method node (if any), set dispatch flags */
* 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);
*
* 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
if (InByte)
{
- LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
+ LocalEventStatus |=
+ (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
}
/* Fixed event currently active? */
if (InByte)
{
- LocalEventStatus |= ACPI_EVENT_FLAG_SET;
+ LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
}
(*EventStatus) = LocalEventStatus;
*
* 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
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);
* 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.
- *
- * 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.
+ * 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: 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.
*
******************************************************************************/
{
case ACPI_GPE_ENABLE:
- Status = AcpiEvEnableGpe (GpeEventInfo);
+ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
break;
case ACPI_GPE_DISABLE:
* 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)
{
/*
* 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 */
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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
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;
*
* 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
*
* 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
}
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 */
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
/* 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:
*
* 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
*
* 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
*
* 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
* 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;
/* 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);
}
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
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 */
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
ACPI_GPE_BLOCK_INFO *GpeBlock,
void *Context);
+static ACPI_STATUS
+AcpiHwGpeEnableWrite (
+ UINT8 EnableMask,
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo);
+
/******************************************************************************
*
/* 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);
}
/* 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);
}
/* 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;
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);
if (RegisterBit & InByte)
{
- LocalEventStatus |= ACPI_EVENT_FLAG_SET;
+ LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
}
/* Set return value */
}
+/******************************************************************************
+ *
+ * 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
{
/* 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);
{
UINT32 i;
ACPI_STATUS Status;
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
/* NOTE: assumes that all GPEs are currently disabled */
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);
{
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;
- }
-
- /* Enable all "wake" GPEs in this register */
-
- Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForWake,
- &GpeBlock->RegisterInfo[i].EnableAddress);
+ GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
+
+ /*
+ * Enable all "wake" GPEs in this register and disable the
+ * remaining ones.
+ */
+ Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake,
+ GpeRegisterInfo);
if (ACPI_FAILURE (Status))
{
return (Status);
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
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 */
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);
}
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);
*
* 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
*
* 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
*
* 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
/* 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"
/* 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
*
* 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
*
* 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
*
* 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
*
* 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
#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);}
*
* 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
/* 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,
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[];
* dmtbdump
*/
void
+AcpiDmDumpBuffer (
+ void *Table,
+ UINT32 BufferOffset,
+ UINT32 Length,
+ UINT32 AbsoluteOffset,
+ char *Header,
+ BOOLEAN MultiLine);
+
+void
AcpiDmDumpAsf (
ACPI_TABLE_HEADER *Table);
*/
void
AdDisassemblerHeader (
- char *Filename);
+ char *Filename,
+ UINT8 TableType);
+
+#define ACPI_IS_AML_TABLE 0
+#define ACPI_IS_DATA_TABLE 1
#endif /* __ACDISASM_H__ */
*
* 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
*
* 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
ACPI_GPE_CALLBACK GpeWalkCallback,
void *Context);
-BOOLEAN
-AcpiEvValidGpeEvent (
- ACPI_GPE_EVENT_INFO *GpeEventInfo);
-
ACPI_STATUS
AcpiEvGetGpeDevice (
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
*
* 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
*
* 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
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);
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);
*
* 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
*
* 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
*
* 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
/* Total number of aml opcodes defined */
-#define AML_NUM_OPCODES 0x81
+#define AML_NUM_OPCODES 0x82
/* Forward declarations */
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;
*
* 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
#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.
*
* 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
*
* 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
*
* 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
*
* 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
#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)
#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)
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20141107
+#define ACPI_CA_VERSION 0x20150410
#include "acconfig.h"
#include "actypes.h"
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiFindRootPointer (
- ACPI_SIZE *RsdpAddress))
+ ACPI_PHYSICAL_ADDRESS *RsdpAddress))
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
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 (
AcpiEnableAllRuntimeGpes (
void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiEnableAllWakeupGpes (
+ void))
+
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeDevice (
*
* 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
*
* 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
/*
- * rsdump
+ * rsdump - Debugger support
*/
+#ifdef ACPI_DEBUGGER
void
AcpiRsDumpResourceList (
ACPI_RESOURCE *Resource);
void
AcpiRsDumpIrqList (
UINT8 *RouteTable);
+#endif
/*
*
* 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
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
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;
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;
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;
{
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;
*
* 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
#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
{
*
* 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
* tbdata - table data structure management
*/
ACPI_STATUS
-AcpiTbGetNextRootIndex (
- UINT32 *TableIndex);
+AcpiTbGetNextTableDescriptor (
+ UINT32 *TableIndex,
+ ACPI_TABLE_DESC **TableDesc);
void
AcpiTbInitTableDescriptor (
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);
*
* 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
*
* 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
*
* 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
#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 */
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 */
} 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
/*******************************************************************************
*
* 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
*
******************************************************************************/
} 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
*
* 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
*
* 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
#endif /* ACPI_USE_SYSTEM_INTTYPES */
-
typedef INT64 ACPI_NATIVE_INT;
typedef UINT64 ACPI_SIZE;
typedef UINT64 ACPI_IO_ADDRESS;
#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
* 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
#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
#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 */
*
* 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
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);
const ACPI_PREDEFINED_INFO *ThisName,
BOOLEAN MultiLine);
-void
-AcpiUtGetExpectedReturnTypes (
- char *Buffer,
- UINT32 ExpectedBtypes);
-
UINT32
AcpiUtGetResourceBitWidth (
char *Buffer,
UINT16 Types);
+#endif
/*
UINT16 Action,
ACPI_GENERIC_STATE **StateList);
-ACPI_STATUS
-AcpiUtCreatePkgStateAndPush (
- void *InternalObject,
- void *ExternalObject,
- UINT16 Index,
- ACPI_GENERIC_STATE **StateList);
-
ACPI_GENERIC_STATE *
AcpiUtCreateControlState (
void);
AcpiUtIsPciRootBridge (
char *Id);
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
BOOLEAN
AcpiUtIsAmlTable (
ACPI_TABLE_HEADER *Table);
+#endif
ACPI_STATUS
AcpiUtWalkPackageTree (
AcpiUtStrupr (
char *SrcString);
+#ifdef ACPI_ASL_COMPILER
void
AcpiUtStrlwr (
char *SrcString);
AcpiUtStricmp (
char *String1,
char *String2);
+#endif
ACPI_STATUS
AcpiUtStrtoul64 (
char *String,
UINT16 MaxLength);
+#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
void
UtConvertBackslashes (
char *Pathname);
+#endif
BOOLEAN
AcpiUtValidAcpiName (
/*
* 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 */
*
* 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
#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
#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
*
* 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
*
* 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
--- /dev/null
+/******************************************************************************
+ *
+ * Name: acdragonfly.h - OS specific for DragonFly BSD
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#ifndef __ACDRAGONFLY_H_
+#define __ACDRAGONFLY_H_
+
+#include <platform/acgcc.h> /* DragonFly uses GCC */
+#include <sys/types.h>
+
+#ifdef __LP64__
+#define ACPI_MACHINE_WIDTH 64
+#else
+#define ACPI_MACHINE_WIDTH 32
+#define ACPI_USE_NATIVE_DIVIDE
+#endif
+
+#define ACPI_UINTPTR_T uintptr_t
+#define COMPILER_DEPENDENT_INT64 int64_t
+#define COMPILER_DEPENDENT_UINT64 uint64_t
+
+#define ACPI_USE_DO_WHILE_0
+#define ACPI_USE_SYSTEM_CLIBRARY
+
+#ifdef _KERNEL
+
+#include "opt_acpi.h"
+#include <sys/ctype.h>
+#include <sys/systm.h>
+#include <machine/acpica_machdep.h>
+#include <stdarg.h>
+
+#ifdef ACPI_DEBUG
+#define ACPI_DEBUG_OUTPUT /* enable debug output */
+#ifdef DEBUGGER_THREADING
+#undef DEBUGGER_THREADING
+#endif /* DEBUGGER_THREADING */
+#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED /* integrated with DDB */
+#if 0 /* XXX */
+#include "opt_ddb.h"
+#ifdef DDB
+#define ACPI_DEBUGGER
+#endif /* DDB */
+#define ACPI_DISASSEMBLER
+#endif
+#endif
+
+#ifdef ACPI_DEBUG_CACHE
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject
+#define AcpiOsReleaseObject(Cache, Object) \
+ _AcpiOsReleaseObject((Cache), (Object), __func__, __LINE__)
+#endif
+
+#ifdef ACPI_DEBUG_LOCKS
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock
+#define AcpiOsAcquireLock(Handle) \
+ _AcpiOsAcquireLock((Handle), __func__, __LINE__)
+#endif
+
+#ifdef ACPI_DEBUG_MEMMAP
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory
+#define AcpiOsMapMemory(Where, Length) \
+ _AcpiOsMapMemory((Where), (Length), __func__, __LINE__)
+
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory
+#define AcpiOsUnmapMemory(LogicalAddress, Size) \
+ _AcpiOsUnmapMemory((LogicalAddress), (Size), __func__, __LINE__)
+#endif
+
+/* XXX TBI */
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete
+#define AcpiOsWaitEventsComplete()
+
+#define USE_NATIVE_ALLOCATE_ZEROED
+
+#define ACPI_SPINLOCK struct acpi_spinlock *
+struct acpi_spinlock;
+
+#define ACPI_CACHE_T struct acpicache
+struct acpicache;
+
+#else /* _KERNEL */
+
+#define ACPI_USE_STANDARD_HEADERS
+
+#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread))
+#define ACPI_FLUSH_CPU_CACHE()
+
+#endif /* _KERNEL */
+
+#endif /* __ACDRAGONFLY_H_ */
--- /dev/null
+/******************************************************************************
+ *
+ * Name: acdragonflyex.h - Extra OS specific defines, etc. for DragonFly BSD
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#ifndef __ACDRAGONFLYEX_H__
+#define __ACDRAGONFLYEX_H__
+
+#ifdef _KERNEL
+
+#ifdef ACPI_DEBUG_CACHE
+ACPI_STATUS
+_AcpiOsReleaseObject (
+ ACPI_CACHE_T *Cache,
+ void *Object,
+ const char *func,
+ int line);
+#endif
+
+#ifdef ACPI_DEBUG_LOCKS
+ACPI_CPU_FLAGS
+_AcpiOsAcquireLock (
+ ACPI_SPINLOCK Spin,
+ const char *func,
+ int line);
+#endif
+
+#ifdef ACPI_DEBUG_MEMMAP
+void *
+_AcpiOsMapMemory (
+ ACPI_PHYSICAL_ADDRESS Where,
+ ACPI_SIZE Length,
+ const char *caller,
+ int line);
+
+void
+_AcpiOsUnmapMemory (
+ void *LogicalAddress,
+ ACPI_SIZE Length,
+ const char *caller,
+ int line);
+#endif
+
+#endif /* _KERNEL */
+
+#endif /* __ACDRAGONFLYEX_H__ */
*
* 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
*
* 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
#define ACPI_LARGE_NAMESPACE_NODE
#define ACPI_DATA_TABLE_DISASSEMBLY
#define ACPI_SINGLE_THREADED
+#define ACPI_32BIT_PHYSICAL_ADDRESS
#endif
/* AcpiExec configuration. Multithreaded with full AML debugger */
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
#include "acgcc.h"
+#define ACPI_UINTPTR_T uintptr_t
+#define ACPI_USE_LOCAL_CACHE
+#define ACPI_CAST_PTHREAD_T(x) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
+
#ifdef _LP64
#define ACPI_MACHINE_WIDTH 64
#else
#define COMPILER_DEPENDENT_INT64 int64_t
#define COMPILER_DEPENDENT_UINT64 uint64_t
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
+#ifdef _KERNEL_OPT
#include "opt_acpi.h" /* collect build-time options here */
+#endif /* _KERNEL_OPT */
#include <sys/param.h>
#include <sys/systm.h>
#endif /* DDB */
#endif /* ACPI_DEBUG */
-static __inline int
-isprint(int ch)
-{
- return(isspace(ch) || isascii(ch));
-}
-
-#else /* _KERNEL */
+#else /* defined(_KERNEL) || defined(_STANDALONE) */
#include <ctype.h>
+#include <stdint.h>
/* Not building kernel code, so use libc */
#define ACPI_USE_STANDARD_HEADERS
#define __cli()
#define __sti()
+#define __cdecl
-/* XXX */
-#define __inline inline
-
-#endif /* _KERNEL */
+#endif /* defined(_KERNEL) || defined(_STANDALONE) */
/* Always use NetBSD code over our local versions */
#define ACPI_USE_SYSTEM_CLIBRARY
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
{
case ACPI_TYPE_PROCESSOR:
- AcpiOsPrintf ("ID %02X Len %02X Addr %p\n",
+ AcpiOsPrintf ("ID %02X Len %02X Addr %8.8X%8.8X\n",
ObjDesc->Processor.ProcId, ObjDesc->Processor.Length,
- ACPI_CAST_PTR (void, ObjDesc->Processor.Address));
+ ACPI_FORMAT_UINT64 (ObjDesc->Processor.Address));
break;
case ACPI_TYPE_DEVICE:
if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
{
AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n",
- ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+ ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length);
}
else
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
/* ACPI 5.0 opcodes */
/* 7F */ ACPI_OP ("-ConnectField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS),
-/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0)
+/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0),
+
+/* ACPI 6.0 opcodes */
+
+/* 81 */ ACPI_OP ("External", ARGP_EXTERNAL_OP, ARGI_EXTERNAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE,/* ? */ AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R)
/*! [End] no source code translation !*/
};
*
* 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 9 A B C D E F */
/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
-/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
+/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, 0x81, _UNK, _UNK,
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
* Address Translation Offset
* Address Length
*/
- {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Granularity),
+ {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Address.Granularity),
AML_OFFSET (Address16.Granularity),
5},
* Address Translation Offset
* Address Length
*/
- {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Granularity),
+ {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Address.Granularity),
AML_OFFSET (Address32.Granularity),
5},
* Address Translation Offset
* Address Length
*/
- {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Granularity),
+ {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Address.Granularity),
AML_OFFSET (Address64.Granularity),
5},
* Address Length
* Type-Specific Attribute
*/
- {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Granularity),
+ {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Address.Granularity),
AML_OFFSET (ExtAddress64.Granularity),
6}
};
*
* 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
*
* 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
/*******************************************************************************
*
- * Module Name: rsdump - Functions to display the resource structures.
+ * Module Name: rsdump - AML debugger support for resource structures.
*
******************************************************************************/
*
* 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
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME ("rsdump")
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
+/*
+ * All functions in this module are used by the AML Debugger only
+ */
+#if defined(ACPI_DEBUGGER)
/* Local prototypes */
static void
AcpiRsDumpWordList (
- UINT16 Length,
- UINT16 *Data);
+ UINT16 Length,
+ UINT16 *Data);
static void
AcpiRsDumpDwordList (
static void
AcpiRsDumpShortByteList (
- UINT8 Length,
- UINT8 *Data);
+ UINT8 Length,
+ UINT8 *Data);
static void
AcpiRsDumpResourceSource (
static void
AcpiRsDumpDescriptor (
void *Resource,
- ACPI_RSDUMP_INFO *Table);
+ ACPI_RSDUMP_INFO *Table);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRsDumpResourceList
+ *
+ * PARAMETERS: ResourceList - Pointer to a resource descriptor list
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Dispatches the structure to the correct dump routine.
+ *
+ ******************************************************************************/
+
+void
+AcpiRsDumpResourceList (
+ ACPI_RESOURCE *ResourceList)
+{
+ UINT32 Count = 0;
+ UINT32 Type;
+
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ /* Check if debug output enabled */
+
+ if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
+ {
+ return;
+ }
+
+ /* Walk list and dump all resource descriptors (END_TAG terminates) */
+
+ do
+ {
+ AcpiOsPrintf ("\n[%02X] ", Count);
+ Count++;
+
+ /* Validate Type before dispatch */
+
+ Type = ResourceList->Type;
+ if (Type > ACPI_RESOURCE_TYPE_MAX)
+ {
+ AcpiOsPrintf (
+ "Invalid descriptor type (%X) in resource list\n",
+ ResourceList->Type);
+ return;
+ }
+
+ /* Sanity check the length. It must not be zero, or we loop forever */
+
+ if (!ResourceList->Length)
+ {
+ AcpiOsPrintf (
+ "Invalid zero length descriptor in resource list\n");
+ return;
+ }
+
+ /* Dump the resource descriptor */
+
+ if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
+ {
+ AcpiRsDumpDescriptor (&ResourceList->Data,
+ AcpiGbl_DumpSerialBusDispatch[
+ ResourceList->Data.CommonSerialBus.Type]);
+ }
+ else
+ {
+ AcpiRsDumpDescriptor (&ResourceList->Data,
+ AcpiGbl_DumpResourceDispatch[Type]);
+ }
+
+ /* Point to the next resource structure */
+
+ ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
+
+ /* Exit when END_TAG descriptor is reached */
+
+ } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRsDumpIrqList
+ *
+ * PARAMETERS: RouteTable - Pointer to the routing table to dump.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print IRQ routing table
+ *
+ ******************************************************************************/
+
+void
+AcpiRsDumpIrqList (
+ UINT8 *RouteTable)
+{
+ ACPI_PCI_ROUTING_TABLE *PrtElement;
+ UINT8 Count;
+
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ /* Check if debug output enabled */
+
+ if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
+ {
+ return;
+ }
+
+ PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
+
+ /* Dump all table elements, Exit on zero length element */
+
+ for (Count = 0; PrtElement->Length; Count++)
+ {
+ AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
+ AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
+
+ PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
+ PrtElement, PrtElement->Length);
+ }
+}
/*******************************************************************************
/*
* Common flags for all Address resources
*/
- AcpiRsDumpAddressCommon (ACPI_CAST_PTR (ACPI_RESOURCE_DATA, Target));
+ AcpiRsDumpAddressCommon (ACPI_CAST_PTR (
+ ACPI_RESOURCE_DATA, Target));
break;
case ACPI_RSD_SOURCE:
/*
* Optional ResourceSource for Address resources
*/
- AcpiRsDumpResourceSource (ACPI_CAST_PTR (ACPI_RESOURCE_SOURCE, Target));
+ AcpiRsDumpResourceSource (ACPI_CAST_PTR (
+ ACPI_RESOURCE_SOURCE, Target));
break;
default:
}
-/*******************************************************************************
- *
- * FUNCTION: AcpiRsDumpResourceList
- *
- * PARAMETERS: ResourceList - Pointer to a resource descriptor list
- *
- * RETURN: None
- *
- * DESCRIPTION: Dispatches the structure to the correct dump routine.
- *
- ******************************************************************************/
-
-void
-AcpiRsDumpResourceList (
- ACPI_RESOURCE *ResourceList)
-{
- UINT32 Count = 0;
- UINT32 Type;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- /* Check if debug output enabled */
-
- if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
- {
- return;
- }
-
- /* Walk list and dump all resource descriptors (END_TAG terminates) */
-
- do
- {
- AcpiOsPrintf ("\n[%02X] ", Count);
- Count++;
-
- /* Validate Type before dispatch */
-
- Type = ResourceList->Type;
- if (Type > ACPI_RESOURCE_TYPE_MAX)
- {
- AcpiOsPrintf (
- "Invalid descriptor type (%X) in resource list\n",
- ResourceList->Type);
- return;
- }
-
- /* Sanity check the length. It must not be zero, or we loop forever */
-
- if (!ResourceList->Length)
- {
- AcpiOsPrintf (
- "Invalid zero length descriptor in resource list\n");
- return;
- }
-
- /* Dump the resource descriptor */
-
- if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
- {
- AcpiRsDumpDescriptor (&ResourceList->Data,
- AcpiGbl_DumpSerialBusDispatch[ResourceList->Data.CommonSerialBus.Type]);
- }
- else
- {
- AcpiRsDumpDescriptor (&ResourceList->Data,
- AcpiGbl_DumpResourceDispatch[Type]);
- }
-
- /* Point to the next resource structure */
-
- ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
-
- /* Exit when END_TAG descriptor is reached */
-
- } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiRsDumpIrqList
- *
- * PARAMETERS: RouteTable - Pointer to the routing table to dump.
- *
- * RETURN: None
- *
- * DESCRIPTION: Print IRQ routing table
- *
- ******************************************************************************/
-
-void
-AcpiRsDumpIrqList (
- UINT8 *RouteTable)
-{
- ACPI_PCI_ROUTING_TABLE *PrtElement;
- UINT8 Count;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- /* Check if debug output enabled */
-
- if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
- {
- return;
- }
-
- PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
-
- /* Dump all table elements, Exit on zero length element */
-
- for (Count = 0; PrtElement->Length; Count++)
- {
- AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
- AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
-
- PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
- PrtElement, PrtElement->Length);
- }
-}
-
-
/*******************************************************************************
*
* FUNCTION: AcpiRsOut*
static void
AcpiRsDumpShortByteList (
- UINT8 Length,
- UINT8 *Data)
+ UINT8 Length,
+ UINT8 *Data)
{
UINT8 i;
*
* 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
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress16), "16-Bit WORD Address Space",NULL},
{ACPI_RSD_ADDRESS, 0, NULL, NULL},
- {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Granularity), "Granularity", NULL},
- {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Minimum), "Address Minimum", NULL},
- {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Maximum), "Address Maximum", NULL},
- {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.TranslationOffset), "Translation Offset", NULL},
- {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.AddressLength), "Address Length", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Granularity), "Granularity", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Minimum), "Address Minimum", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Maximum), "Address Maximum", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.TranslationOffset),
+ "Translation Offset", NULL},
+ {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.AddressLength), "Address Length", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address16.ResourceSource), NULL, NULL}
};
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress32), "32-Bit DWORD Address Space", NULL},
{ACPI_RSD_ADDRESS, 0, NULL, NULL},
- {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Granularity), "Granularity", NULL},
- {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Minimum), "Address Minimum", NULL},
- {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Maximum), "Address Maximum", NULL},
- {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.TranslationOffset), "Translation Offset", NULL},
- {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.AddressLength), "Address Length", NULL},
+ {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Granularity), "Granularity", NULL},
+ {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Minimum), "Address Minimum", NULL},
+ {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Maximum), "Address Maximum", NULL},
+ {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.TranslationOffset),
+ "Translation Offset", NULL},
+ {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.AddressLength), "Address Length", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address32.ResourceSource), NULL, NULL}
};
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress64), "64-Bit QWORD Address Space", NULL},
{ACPI_RSD_ADDRESS, 0, NULL, NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Granularity), "Granularity", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Minimum), "Address Minimum", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Maximum), "Address Maximum", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.TranslationOffset), "Translation Offset", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.AddressLength), "Address Length", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Granularity), "Granularity", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Minimum), "Address Minimum", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Maximum), "Address Maximum", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.TranslationOffset),
+ "Translation Offset", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.AddressLength), "Address Length", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address64.ResourceSource), NULL, NULL}
};
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpExtAddress64), "64-Bit Extended Address Space", NULL},
{ACPI_RSD_ADDRESS, 0, NULL, NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Granularity), "Granularity", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Minimum), "Address Minimum", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Maximum), "Address Maximum", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TranslationOffset), "Translation Offset", NULL},
- {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.AddressLength), "Address Length", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Granularity), "Granularity", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Minimum), "Address Minimum", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Maximum), "Address Maximum", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.TranslationOffset),
+ "Translation Offset", NULL},
+ {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.AddressLength),
+ "Address Length", NULL},
{ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TypeSpecific), "Type-Specific Attribute", NULL}
};
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
ACPI_COPY_FIELD(Out, In, MinAddressFixed); \
ACPI_COPY_FIELD(Out, In, MaxAddressFixed); \
ACPI_COPY_FIELD(Out, In, Info); \
- ACPI_COPY_FIELD(Out, In, Granularity); \
- ACPI_COPY_FIELD(Out, In, Minimum); \
- ACPI_COPY_FIELD(Out, In, Maximum); \
- ACPI_COPY_FIELD(Out, In, TranslationOffset); \
- ACPI_COPY_FIELD(Out, In, AddressLength); \
+ ACPI_COPY_FIELD(Out, In, Address.Granularity); \
+ ACPI_COPY_FIELD(Out, In, Address.Minimum); \
+ ACPI_COPY_FIELD(Out, In, Address.Maximum); \
+ ACPI_COPY_FIELD(Out, In, Address.TranslationOffset); \
+ ACPI_COPY_FIELD(Out, In, Address.AddressLength); \
ACPI_COPY_FIELD(Out, In, ResourceSource);
*
* 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
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, TableDesc->Address);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
break;
default:
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Address);
+ TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ ACPI_PHYSADDR_TO_PTR (Address));
if (!TableHeader)
{
return (AE_NO_MEMORY);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
- "%4.4s " ACPI_PRINTF_UINT
+ "%4.4s 0x%8.8X%8.8X"
" Attempted table install failed",
AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
TableDesc->Signature.Ascii : "????",
- ACPI_FORMAT_TO_UINT (TableDesc->Address)));
+ ACPI_FORMAT_UINT64 (TableDesc->Address)));
goto InvalidateAndExit;
}
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbGetNextRootIndex
+ * FUNCTION: AcpiTbGetNextTableDescriptor
*
* PARAMETERS: TableIndex - Where table index is returned
+ * TableDesc - Where table descriptor is returned
*
- * RETURN: Status and table index.
+ * RETURN: Status and table index/descriptor.
*
* DESCRIPTION: Allocate a new ACPI table entry to the global table list
*
******************************************************************************/
ACPI_STATUS
-AcpiTbGetNextRootIndex (
- UINT32 *TableIndex)
+AcpiTbGetNextTableDescriptor (
+ UINT32 *TableIndex,
+ ACPI_TABLE_DESC **TableDesc)
{
ACPI_STATUS Status;
+ UINT32 i;
/* Ensure that there is room for the table in the Root Table List */
}
}
- *TableIndex = AcpiGbl_RootTableList.CurrentTableCount;
+ i = AcpiGbl_RootTableList.CurrentTableCount;
AcpiGbl_RootTableList.CurrentTableCount++;
+
+ if (TableIndex)
+ {
+ *TableIndex = i;
+ }
+ if (TableDesc)
+ {
+ *TableDesc = &AcpiGbl_RootTableList.Tables[i];
+ }
+
return (AE_OK);
}
*
* 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
*
* 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
*
* 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
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
- ACPI_CAST_PTR (void, Address)));
+ ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
+ ACPI_FORMAT_UINT64 (Address)));
return_ACPI_STATUS (Status);
}
Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
- ACPI_CAST_PTR (void, Address)));
+ ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
+ ACPI_FORMAT_UINT64 (Address)));
return_ACPI_STATUS (Status);
}
AcpiGbl_DisableSsdtTableInstall &&
ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
{
- ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %p",
- NewTableDesc.Signature.Ascii, ACPI_CAST_PTR (void, Address)));
+ ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %8.8X%8.8X",
+ NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address)));
goto ReleaseAndExit;
}
*/
AcpiTbUninstallTable (&NewTableDesc);
*TableIndex = i;
- (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_ACPI_STATUS (AE_OK);
}
}
/* Add the table to the global root table list */
- Status = AcpiTbGetNextRootIndex (&i);
+ Status = AcpiTbGetNextTableDescriptor (&i, NULL);
if (ACPI_FAILURE (Status))
{
goto ReleaseAndExit;
return;
}
- ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
- " %s table override, new table: " ACPI_PRINTF_UINT,
+ ACPI_INFO ((AE_INFO, "%4.4s 0x%8.8X%8.8X"
+ " %s table override, new table: 0x%8.8X%8.8X",
OldTableDesc->Signature.Ascii,
- ACPI_FORMAT_TO_UINT (OldTableDesc->Address),
- OverrideType, ACPI_FORMAT_TO_UINT (NewTableDesc.Address)));
+ ACPI_FORMAT_UINT64 (OldTableDesc->Address),
+ OverrideType, ACPI_FORMAT_UINT64 (NewTableDesc.Address)));
/* We can now uninstall the original table */
}
-/*******************************************************************************
- *
- * FUNCTION: AcpiTbStoreTable
- *
- * PARAMETERS: Address - Table address
- * Table - Table header
- * Length - Table length
- * Flags - Install flags
- * TableIndex - Where the table index is returned
- *
- * RETURN: Status and table index.
- *
- * DESCRIPTION: Add an ACPI table to the global table list
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiTbStoreTable (
- ACPI_PHYSICAL_ADDRESS Address,
- ACPI_TABLE_HEADER *Table,
- UINT32 Length,
- UINT8 Flags,
- UINT32 *TableIndex)
-{
- ACPI_STATUS Status;
- ACPI_TABLE_DESC *TableDesc;
-
-
- Status = AcpiTbGetNextRootIndex (TableIndex);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- /* Initialize added table */
-
- TableDesc = &AcpiGbl_RootTableList.Tables[*TableIndex];
- AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table);
- TableDesc->Pointer = Table;
- return (AE_OK);
-}
-
-
/*******************************************************************************
*
* FUNCTION: AcpiTbUninstallTable
if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
{
- ACPI_FREE (ACPI_CAST_PTR (void, TableDesc->Address));
+ ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
}
TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);
*
* 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
ACPI_TABLE_HEADER LocalHeader;
- /*
- * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to
- * support both 32-bit and 64-bit hosts/addresses in a consistent manner.
- * The %p specifier does not emit uniform output on all hosts. On some,
- * leading zeros are not supported.
- */
if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS))
{
/* FACS only has signature and length fields */
- ACPI_INFO ((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X",
- Header->Signature, ACPI_FORMAT_TO_UINT (Address),
+ ACPI_INFO ((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X",
+ Header->Signature, ACPI_FORMAT_UINT64 (Address),
Header->Length));
}
else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature))
ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId, ACPI_OEM_ID_SIZE);
AcpiTbFixString (LocalHeader.OemId, ACPI_OEM_ID_SIZE);
- ACPI_INFO ((AE_INFO, "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)",
- ACPI_FORMAT_TO_UINT (Address),
+ ACPI_INFO ((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
+ ACPI_FORMAT_UINT64 (Address),
(ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ?
ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20,
ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision,
AcpiTbCleanupTableHeader (&LocalHeader, Header);
ACPI_INFO ((AE_INFO,
- "%-4.4s " ACPI_PRINTF_UINT
+ "%-4.4s 0x%8.8X%8.8X"
" %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
- LocalHeader.Signature, ACPI_FORMAT_TO_UINT (Address),
+ LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address),
LocalHeader.Length, LocalHeader.Revision, LocalHeader.OemId,
LocalHeader.OemTableId, LocalHeader.OemRevision,
LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision));
*
* 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
*
* 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
*
* 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
*
* 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
ACPI_STATUS
AcpiFindRootPointer (
- ACPI_SIZE *TableAddress)
+ ACPI_PHYSICAL_ADDRESS *TableAddress)
{
UINT8 *TablePtr;
UINT8 *MemRover;
PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
- *TableAddress = PhysicalAddress;
+ *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
return_ACPI_STATUS (AE_OK);
}
}
PhysicalAddress = (UINT32)
(ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr));
- *TableAddress = PhysicalAddress;
+ *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
return_ACPI_STATUS (AE_OK);
}
*
* 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
AcpiGbl_AddressRangeList[SpaceId] = RangeInfo;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "\nAdded [%4.4s] address range: 0x%p-0x%p\n",
+ "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
AcpiUtGetNodeName (RangeInfo->RegionNode),
- ACPI_CAST_PTR (void, Address),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+ ACPI_FORMAT_UINT64 (Address),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (AE_OK);
}
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
+ "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
AcpiUtGetNodeName (RangeInfo->RegionNode),
- ACPI_CAST_PTR (void, RangeInfo->StartAddress),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
+ ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
ACPI_FREE (RangeInfo);
return_VOID;
Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode);
ACPI_WARNING ((AE_INFO,
- "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
+ "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
AcpiUtGetRegionName (SpaceId),
- ACPI_CAST_PTR (void, Address),
- ACPI_CAST_PTR (void, EndAddress),
- ACPI_CAST_PTR (void, RangeInfo->StartAddress),
- ACPI_CAST_PTR (void, RangeInfo->EndAddress),
+ ACPI_FORMAT_UINT64 (Address),
+ ACPI_FORMAT_UINT64 (EndAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
+ ACPI_FORMAT_UINT64 (RangeInfo->EndAddress),
Pathname));
ACPI_FREE (Pathname);
}
*
* 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
*
* 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
return;
}
+ /*
+ * Add comment characters so rest of line is ignored when
+ * compiled
+ */
+ if (j == 0)
+ {
+ AcpiOsPrintf ("// ");
+ }
+
BufChar = Buffer[(ACPI_SIZE) i + j];
if (ACPI_IS_PRINT (BufChar))
{
*
* 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
*
* 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
char *String1,
char *String2)
{
- char *String;
+ UINT32 Length;
- if (AcpiUtStrlen (String2) > AcpiUtStrlen (String1))
+ Length = AcpiUtStrlen (String2);
+ if (!Length)
{
- return (NULL);
+ return (String1);
}
- /* Walk entire string, comparing the letters */
-
- for (String = String1; *String2; )
+ while (AcpiUtStrlen (String1) >= Length)
{
- if (*String2 != *String)
+ if (AcpiUtMemcmp (String1, String2, Length) == 0)
{
- return (NULL);
+ return (String1);
}
-
- String2++;
- String++;
+ String1++;
}
- return (String1);
+ return (NULL);
}
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
{"_SB_", ACPI_TYPE_DEVICE, NULL},
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_TZ_", ACPI_TYPE_DEVICE, NULL},
- {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL},
+ /*
+ * March, 2015:
+ * The _REV object is in the process of being deprecated, because
+ * other ACPI implementations permanently return 2. Thus, it
+ * has little or no value. Return 2 for compatibility with
+ * other ACPI implementations.
+ */
+ {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)},
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
- {"_GL_", ACPI_TYPE_MUTEX, (char *) 1},
+ {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)},
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
- {"_OSI", ACPI_TYPE_METHOD, (char *) 1},
+ {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)},
#endif
/* Table terminator */
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
*
* 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
}
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
/*******************************************************************************
*
* FUNCTION: AcpiUtIsAmlTable
return (FALSE);
}
+#endif
/*******************************************************************************
*
* 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
*
* 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
*
* 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
{"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
{"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
{"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
+ {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */
/* Feature Group Strings */
*
* 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
*
* 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
*
* 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
const char *Format,
va_list Args)
{
- UINT8 Base = 10;
- UINT8 Type = 0;
- INT32 Width = -1;
- INT32 Precision = -1;
- char Qualifier = 0;
+ UINT8 Base;
+ UINT8 Type;
+ INT32 Width;
+ INT32 Precision;
+ char Qualifier;
UINT64 Number;
char *Pos;
char *End;
continue;
}
+ Type = 0;
+ Base = 10;
+
/* Process sign */
do
*
* 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
*
* 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
ACPI_MODULE_NAME ("utstate")
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtCreatePkgStateAndPush
- *
- * PARAMETERS: Object - Object to be added to the new state
- * Action - Increment/Decrement
- * StateList - List the state will be added to
- *
- * RETURN: Status
- *
- * DESCRIPTION: Create a new state and push it
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtCreatePkgStateAndPush (
- void *InternalObject,
- void *ExternalObject,
- UINT16 Index,
- ACPI_GENERIC_STATE **StateList)
-{
- ACPI_GENERIC_STATE *State;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- State = AcpiUtCreatePkgState (InternalObject, ExternalObject, Index);
- if (!State)
- {
- return (AE_NO_MEMORY);
- }
-
- AcpiUtPushGenericState (StateList, State);
- return (AE_OK);
-}
-
-
/*******************************************************************************
*
* FUNCTION: AcpiUtPushGenericState
*
* 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
*
* 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
*
* 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
ACPI_MODULE_NAME ("utuuid")
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
/*
* UUID support functions.
*
AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]);
}
}
+#endif
*
* 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
*
* 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
*
* 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
*
* 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
ResourceDescriptor->Type = CmResourceTypeBusNumber;
ResourceDescriptor->ShareDisposition = CmResourceShareShared;
ResourceDescriptor->Flags = 0;
- ResourceDescriptor->u.BusNumber.Start = addr16_data->Minimum;
- ResourceDescriptor->u.BusNumber.Length = addr16_data->AddressLength;
+ ResourceDescriptor->u.BusNumber.Start = addr16_data->Address.Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr16_data->Address.AddressLength;
}
else if (addr16_data->ResourceType == ACPI_IO_RANGE)
{
ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr16_data->Decode == ACPI_POS_DECODE)
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- ResourceDescriptor->u.Port.Start.QuadPart = addr16_data->Minimum;
- ResourceDescriptor->u.Port.Length = addr16_data->AddressLength;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr16_data->Address.Minimum;
+ ResourceDescriptor->u.Port.Length = addr16_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- ResourceDescriptor->u.Memory.Start.QuadPart = addr16_data->Minimum;
- ResourceDescriptor->u.Memory.Length = addr16_data->AddressLength;
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr16_data->Address.Minimum;
+ ResourceDescriptor->u.Memory.Length = addr16_data->Address.AddressLength;
}
ResourceDescriptor++;
break;
ResourceDescriptor->Type = CmResourceTypeBusNumber;
ResourceDescriptor->ShareDisposition = CmResourceShareShared;
ResourceDescriptor->Flags = 0;
- ResourceDescriptor->u.BusNumber.Start = addr32_data->Minimum;
- ResourceDescriptor->u.BusNumber.Length = addr32_data->AddressLength;
+ ResourceDescriptor->u.BusNumber.Start = addr32_data->Address.Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr32_data->Address.AddressLength;
}
else if (addr32_data->ResourceType == ACPI_IO_RANGE)
{
ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr32_data->Decode == ACPI_POS_DECODE)
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- ResourceDescriptor->u.Port.Start.QuadPart = addr32_data->Minimum;
- ResourceDescriptor->u.Port.Length = addr32_data->AddressLength;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr32_data->Address.Minimum;
+ ResourceDescriptor->u.Port.Length = addr32_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- ResourceDescriptor->u.Memory.Start.QuadPart = addr32_data->Minimum;
- ResourceDescriptor->u.Memory.Length = addr32_data->AddressLength;
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr32_data->Address.Minimum;
+ ResourceDescriptor->u.Memory.Length = addr32_data->Address.AddressLength;
}
ResourceDescriptor++;
break;
ResourceDescriptor->Type = CmResourceTypeBusNumber;
ResourceDescriptor->ShareDisposition = CmResourceShareShared;
ResourceDescriptor->Flags = 0;
- ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Minimum;
- ResourceDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Address.Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength;
}
else if (addr64_data->ResourceType == ACPI_IO_RANGE)
{
ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr64_data->Decode == ACPI_POS_DECODE)
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Minimum;
- ResourceDescriptor->u.Port.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Address.Minimum;
+ ResourceDescriptor->u.Port.Length = addr64_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Minimum;
- ResourceDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Address.Minimum;
+ ResourceDescriptor->u.Memory.Length = addr64_data->Address.AddressLength;
}
ResourceDescriptor++;
break;
ResourceDescriptor->Type = CmResourceTypeBusNumber;
ResourceDescriptor->ShareDisposition = CmResourceShareShared;
ResourceDescriptor->Flags = 0;
- ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Minimum;
- ResourceDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Address.Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength;
}
else if (addr64_data->ResourceType == ACPI_IO_RANGE)
{
ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr64_data->Decode == ACPI_POS_DECODE)
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Minimum;
- ResourceDescriptor->u.Port.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Address.Minimum;
+ ResourceDescriptor->u.Port.Length = addr64_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Minimum;
- ResourceDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Address.Minimum;
+ ResourceDescriptor->u.Memory.Length = addr64_data->Address.AddressLength;
}
ResourceDescriptor++;
break;
RequirementDescriptor->Type = CmResourceTypeBusNumber;
RequirementDescriptor->ShareDisposition = CmResourceShareShared;
RequirementDescriptor->Flags = 0;
- RequirementDescriptor->u.BusNumber.MinBusNumber = addr16_data->Minimum;
- RequirementDescriptor->u.BusNumber.MaxBusNumber = addr16_data->Maximum + addr16_data->AddressLength - 1;
- RequirementDescriptor->u.BusNumber.Length = addr16_data->AddressLength;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = addr16_data->Address.Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.BusNumber.Length = addr16_data->Address.AddressLength;
}
else if (addr16_data->ResourceType == ACPI_IO_RANGE)
{
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr16_data->Decode == ACPI_POS_DECODE)
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr16_data->Minimum;
- RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr16_data->Maximum + addr16_data->AddressLength - 1;
- RequirementDescriptor->u.Port.Length = addr16_data->AddressLength;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr16_data->Address.Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Port.Length = addr16_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr16_data->Minimum;
- RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr16_data->Maximum + addr16_data->AddressLength - 1;
- RequirementDescriptor->u.Memory.Length = addr16_data->AddressLength;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr16_data->Address.Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr16_data->Address.Maximum + addr16_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Memory.Length = addr16_data->Address.AddressLength;
}
RequirementDescriptor++;
break;
RequirementDescriptor->Type = CmResourceTypeBusNumber;
RequirementDescriptor->ShareDisposition = CmResourceShareShared;
RequirementDescriptor->Flags = 0;
- RequirementDescriptor->u.BusNumber.MinBusNumber = addr32_data->Minimum;
- RequirementDescriptor->u.BusNumber.MaxBusNumber = addr32_data->Maximum + addr32_data->AddressLength - 1;
- RequirementDescriptor->u.BusNumber.Length = addr32_data->AddressLength;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = addr32_data->Address.Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.BusNumber.Length = addr32_data->Address.AddressLength;
}
else if (addr32_data->ResourceType == ACPI_IO_RANGE)
{
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr32_data->Decode == ACPI_POS_DECODE)
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr32_data->Minimum;
- RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr32_data->Maximum + addr32_data->AddressLength - 1;
- RequirementDescriptor->u.Port.Length = addr32_data->AddressLength;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr32_data->Address.Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Port.Length = addr32_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr32_data->Minimum;
- RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr32_data->Maximum + addr32_data->AddressLength - 1;
- RequirementDescriptor->u.Memory.Length = addr32_data->AddressLength;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr32_data->Address.Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr32_data->Address.Maximum + addr32_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Memory.Length = addr32_data->Address.AddressLength;
}
RequirementDescriptor++;
break;
RequirementDescriptor->Type = CmResourceTypeBusNumber;
RequirementDescriptor->ShareDisposition = CmResourceShareShared;
RequirementDescriptor->Flags = 0;
- RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Minimum;
- RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Address.Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength;
}
else if (addr64_data->ResourceType == ACPI_IO_RANGE)
{
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr64_data->Decode == ACPI_POS_DECODE)
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Minimum;
- RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.Port.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Address.Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Port.Length = addr64_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Minimum;
- RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Address.Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Memory.Length = addr64_data->Address.AddressLength;
}
RequirementDescriptor++;
break;
RequirementDescriptor->Type = CmResourceTypeBusNumber;
RequirementDescriptor->ShareDisposition = CmResourceShareShared;
RequirementDescriptor->Flags = 0;
- RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Minimum;
- RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = (ULONG)addr64_data->Address.Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = (ULONG)addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.BusNumber.Length = addr64_data->Address.AddressLength;
}
else if (addr64_data->ResourceType == ACPI_IO_RANGE)
{
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
if (addr64_data->Decode == ACPI_POS_DECODE)
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
- RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Minimum;
- RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.Port.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Address.Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Port.Length = addr64_data->Address.AddressLength;
}
else
{
case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_PREFETCHABLE; break;
}
- RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Minimum;
- RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Maximum + addr64_data->AddressLength - 1;
- RequirementDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = addr64_data->Address.Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = addr64_data->Address.Maximum + addr64_data->Address.AddressLength - 1;
+ RequirementDescriptor->u.Memory.Length = addr64_data->Address.AddressLength;
}
RequirementDescriptor++;
break;
switch (Width)
{
case 8:
- *Value = READ_PORT_UCHAR((PUCHAR)Address);
+ *Value = READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)Address);
break;
case 16:
- *Value = READ_PORT_USHORT((PUSHORT)Address);
+ *Value = READ_PORT_USHORT((PUSHORT)(ULONG_PTR)Address);
break;
case 32:
- *Value = READ_PORT_ULONG((PULONG)Address);
+ *Value = READ_PORT_ULONG((PULONG)(ULONG_PTR)Address);
break;
default:
switch (Width)
{
case 8:
- WRITE_PORT_UCHAR((PUCHAR)Address, Value);
+ WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)Address, Value);
break;
case 16:
- WRITE_PORT_USHORT((PUSHORT)Address, Value);
+ WRITE_PORT_USHORT((PUSHORT)(ULONG_PTR)Address, Value);
break;
case 32:
- WRITE_PORT_ULONG((PULONG)Address, Value);
+ WRITE_PORT_ULONG((PULONG)(ULONG_PTR)Address, Value);
break;
default: