Index: drivers/bus/acpi/acpica/dispatcher/dsargs.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsargs.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsargs.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dscontrol.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dscontrol.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dscontrol.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsfield.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsfield.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsfield.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsinit.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsinit.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsinit.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsmethod.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsmethod.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsmethod.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsmthdat.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsmthdat.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsmthdat.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsobject.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsobject.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsobject.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dsopcode.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsopcode.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsopcode.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -549,7 +549,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", ObjDesc, - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), ObjDesc->Region.Length)); /* Now the address and length are valid for this opregion */ @@ -651,12 +651,12 @@ 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 */ Index: drivers/bus/acpi/acpica/dispatcher/dsutils.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dsutils.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dsutils.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -671,6 +671,15 @@ 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 { /* Index: drivers/bus/acpi/acpica/dispatcher/dswexec.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dswexec.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dswexec.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dswload.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dswload.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dswload.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dswload2.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dswload2.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dswload2.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dswscope.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dswscope.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dswscope.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/dispatcher/dswstate.c =================================================================== --- drivers/bus/acpi/acpica/dispatcher/dswstate.c (revision 69866) +++ drivers/bus/acpi/acpica/dispatcher/dswstate.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evevent.c =================================================================== --- drivers/bus/acpi/acpica/events/evevent.c (revision 69845) +++ drivers/bus/acpi/acpica/events/evevent.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evglock.c =================================================================== --- drivers/bus/acpi/acpica/events/evglock.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evglock.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,9 +120,7 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evglock") -#if ACPI_REDUCED_HARDWARE -#error -#endif + #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ /* Local prototypes */ Index: drivers/bus/acpi/acpica/events/evgpe.c =================================================================== --- drivers/bus/acpi/acpica/events/evgpe.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evgpe.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -203,18 +203,6 @@ ACPI_FUNCTION_TRACE (EvEnableGpe); - /* - * We will only allow a GPE to be enabled if it has either an associated - * method (_Lxx/_Exx) or a handler, or is using the implicit notify - * feature. Otherwise, the GPE will be immediately disabled by - * AcpiEvGpeDispatch the first time it fires. - */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_NONE) - { - return_ACPI_STATUS (AE_NO_HANDLER); - } - /* Clear the GPE (of stale events) */ Status = AcpiHwClearGpe (GpeEventInfo); @@ -225,7 +213,7 @@ /* Enable the requested GPE */ - Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE); return_ACPI_STATUS (Status); } @@ -315,7 +303,7 @@ Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo); if (ACPI_SUCCESS (Status)) { - Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE); } if (ACPI_FAILURE (Status)) @@ -455,7 +443,11 @@ { ACPI_STATUS Status; ACPI_GPE_BLOCK_INFO *GpeBlock; + ACPI_NAMESPACE_NODE *GpeDevice; ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; + ACPI_GPE_EVENT_INFO *GpeEventInfo; + UINT32 GpeNumber; + ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; UINT8 EnabledStatusByte; UINT32 StatusReg; @@ -486,6 +478,8 @@ GpeBlock = GpeXruptList->GpeBlockListHead; while (GpeBlock) { + GpeDevice = GpeBlock->Node; + /* * Read all of the 8-bit GPE status and enable registers in this GPE * block, saving all of them. Find all currently active GP events. @@ -554,16 +548,55 @@ { /* Examine one GPE bit */ + GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * + ACPI_GPE_REGISTER_WIDTH) + j]; + GpeNumber = j + GpeRegisterInfo->BaseGpeNumber; + if (EnabledStatusByte & (1 << j)) { - /* - * Found an active GPE. Dispatch the event to a handler - * or method. - */ - IntStatus |= AcpiEvGpeDispatch (GpeBlock->Node, - &GpeBlock->EventInfo[((ACPI_SIZE) i * - ACPI_GPE_REGISTER_WIDTH) + j], - j + GpeRegisterInfo->BaseGpeNumber); + /* Invoke global event handler if present */ + + AcpiGpeCount++; + if (AcpiGbl_GlobalEventHandler) + { + AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, + GpeDevice, GpeNumber, + AcpiGbl_GlobalEventHandlerContext); + } + + /* Found an active GPE */ + + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER) + { + /* Dispatch the event to a raw handler */ + + GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; + + /* + * There is no protection around the namespace node + * and the GPE handler to ensure a safe destruction + * because: + * 1. The namespace node is expected to always + * exist after loading a table. + * 2. The GPE handler is expected to be flushed by + * AcpiOsWaitEventsComplete() before the + * destruction. + */ + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= GpeHandlerInfo->Address ( + GpeDevice, GpeNumber, GpeHandlerInfo->Context); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } + else + { + /* + * Dispatch the event to a standard handler or + * method. + */ + IntStatus |= AcpiEvGpeDispatch (GpeDevice, + GpeEventInfo, GpeNumber); + } } } } @@ -599,8 +632,7 @@ void *Context) { ACPI_GPE_EVENT_INFO *GpeEventInfo = Context; - ACPI_STATUS Status; - ACPI_GPE_EVENT_INFO *LocalGpeEventInfo; + ACPI_STATUS Status = AE_OK; ACPI_EVALUATE_INFO *Info; ACPI_GPE_NOTIFY_INFO *Notify; @@ -608,49 +640,9 @@ ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod); - /* Allocate a local GPE block */ - - LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO)); - if (!LocalGpeEventInfo) - { - ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, - "while handling a GPE")); - return_VOID; - } - - Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); - if (ACPI_FAILURE (Status)) - { - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - - /* Must revalidate the GpeNumber/GpeBlock */ - - if (!AcpiEvValidGpeEvent (GpeEventInfo)) - { - Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - - /* - * Take a snapshot of the GPE info for this level - we copy the info to - * prevent a race condition with RemoveHandler/RemoveBlock. - */ - ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo, - sizeof (ACPI_GPE_EVENT_INFO)); - - Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); - if (ACPI_FAILURE (Status)) - { - ACPI_FREE (LocalGpeEventInfo); - return_VOID; - } - /* Do the correct dispatch - normal method or implicit notify */ - switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) + switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags)) { case ACPI_GPE_DISPATCH_NOTIFY: /* @@ -664,7 +656,7 @@ * June 2012: Expand implicit notify mechanism to support * notifies on multiple device objects. */ - Notify = LocalGpeEventInfo->Dispatch.NotifyList; + Notify = GpeEventInfo->Dispatch.NotifyList; while (ACPI_SUCCESS (Status) && Notify) { Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode, @@ -689,7 +681,7 @@ * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the * _Lxx/_Exx control method that corresponds to this GPE */ - Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode; + Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode; Info->Flags = ACPI_IGNORE_RETURN_VALUE; Status = AcpiNsEvaluate (Info); @@ -700,23 +692,26 @@ { ACPI_EXCEPTION ((AE_INFO, Status, "while evaluating GPE method [%4.4s]", - AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode))); + AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode))); } break; default: - return_VOID; /* Should never happen */ + goto ErrorExit; /* Should never happen */ } /* Defer enabling of GPE until all notify handlers are done */ Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, - AcpiEvAsynchEnableGpe, LocalGpeEventInfo); - if (ACPI_FAILURE (Status)) + AcpiEvAsynchEnableGpe, GpeEventInfo); + if (ACPI_SUCCESS (Status)) { - ACPI_FREE (LocalGpeEventInfo); + return_VOID; } + +ErrorExit: + AcpiEvAsynchEnableGpe (GpeEventInfo); return_VOID; } @@ -740,11 +735,13 @@ void *Context) { ACPI_GPE_EVENT_INFO *GpeEventInfo = Context; + ACPI_CPU_FLAGS Flags; + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); (void) AcpiEvFinishGpe (GpeEventInfo); + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); - ACPI_FREE (GpeEventInfo); return; } @@ -785,7 +782,7 @@ /* * Enable this GPE, conditionally. This means that the GPE will - * only be physically enabled if the EnableForRun bit is set + * only be physically enabled if the EnableMask bit is set * in the EventInfo. */ (void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE); @@ -823,15 +820,6 @@ ACPI_FUNCTION_TRACE (EvGpeDispatch); - /* Invoke global event handler if present */ - - AcpiGpeCount++; - if (AcpiGbl_GlobalEventHandler) - { - AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, GpeDevice, - GpeNumber, AcpiGbl_GlobalEventHandlerContext); - } - /* * Always disable the GPE so that it does not keep firing before * any asynchronous activity completes (either from the execution @@ -874,7 +862,7 @@ * 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: Index: drivers/bus/acpi/acpica/events/evgpeblk.c =================================================================== --- drivers/bus/acpi/acpica/events/evgpeblk.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evgpeblk.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -590,8 +590,9 @@ * 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; Index: drivers/bus/acpi/acpica/events/evgpeinit.c =================================================================== --- drivers/bus/acpi/acpica/events/evgpeinit.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evgpeinit.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -491,8 +491,10 @@ 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 */ @@ -499,7 +501,7 @@ return_ACPI_STATUS (AE_OK); } - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_METHOD) { /* Index: drivers/bus/acpi/acpica/events/evgpeutil.c =================================================================== --- drivers/bus/acpi/acpica/events/evgpeutil.c (revision 69845) +++ drivers/bus/acpi/acpica/events/evgpeutil.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -187,60 +187,6 @@ /******************************************************************************* * - * 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 * * PARAMETERS: GPE_WALK_CALLBACK @@ -488,8 +434,10 @@ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j]; - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER)) { /* Delete an installed handler block */ @@ -497,7 +445,7 @@ 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 */ Index: drivers/bus/acpi/acpica/events/evhandler.c =================================================================== --- drivers/bus/acpi/acpica/events/evhandler.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evhandler.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evmisc.c =================================================================== --- drivers/bus/acpi/acpica/events/evmisc.c (revision 69845) +++ drivers/bus/acpi/acpica/events/evmisc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evregion.c =================================================================== --- drivers/bus/acpi/acpica/events/evregion.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evregion.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -360,7 +360,7 @@ 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 & Index: drivers/bus/acpi/acpica/events/evrgnini.c =================================================================== --- drivers/bus/acpi/acpica/events/evrgnini.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evrgnini.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evsci.c =================================================================== --- drivers/bus/acpi/acpica/events/evsci.c (revision 69845) +++ drivers/bus/acpi/acpica/events/evsci.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/events/evxface.c =================================================================== --- drivers/bus/acpi/acpica/events/evxface.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -124,7 +124,22 @@ #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: AcpiInstallNotifyHandler @@ -894,7 +909,7 @@ /******************************************************************************* * - * FUNCTION: AcpiInstallGpeHandler + * FUNCTION: AcpiEvInstallGpeHandler * * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT * defined GPEs) @@ -901,20 +916,24 @@ * GpeNumber - The GPE number within the GPE block * Type - Whether this GPE should be treated as an * edge- or level-triggered interrupt. + * IsRawHandler - Whether this GPE should be handled using + * the special GPE handler mode. * Address - Address of the handler * Context - Value passed to the handler on each GPE * * RETURN: Status * - * DESCRIPTION: Install a handler for a General Purpose Event. + * DESCRIPTION: Internal function to install a handler for a General Purpose + * Event. * ******************************************************************************/ -ACPI_STATUS -AcpiInstallGpeHandler ( +static ACPI_STATUS +AcpiEvInstallGpeHandler ( ACPI_HANDLE GpeDevice, UINT32 GpeNumber, UINT32 Type, + BOOLEAN IsRawHandler, ACPI_GPE_HANDLER Address, void *Context) { @@ -924,7 +943,7 @@ ACPI_CPU_FLAGS Flags; - ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler); + ACPI_FUNCTION_TRACE (EvInstallGpeHandler); /* Parameter validation */ @@ -962,8 +981,10 @@ /* Make sure that there isn't a handler there already */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_HANDLER) || + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER)) { Status = AE_ALREADY_EXISTS; goto FreeAndExit; @@ -980,8 +1001,10 @@ * automatically during initialization, in which case it has to be * disabled now to avoid spurious execution of the handler. */ - if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) || - (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) && + if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_METHOD) || + (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) == + ACPI_GPE_DISPATCH_NOTIFY)) && GpeEventInfo->RuntimeCount) { Handler->OriginallyEnabled = TRUE; @@ -1002,7 +1025,8 @@ /* Setup up dispatch flags to indicate handler (vs. method/notify) */ GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); - GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_HANDLER); + GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ? + ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER)); AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); @@ -1017,11 +1041,91 @@ 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 * * PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT @@ -1076,8 +1180,10 @@ /* Make sure that a handler is indeed installed */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != - ACPI_GPE_DISPATCH_HANDLER) + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != + ACPI_GPE_DISPATCH_HANDLER) && + (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != + ACPI_GPE_DISPATCH_RAW_HANDLER)) { Status = AE_NOT_EXIST; goto UnlockAndExit; @@ -1094,6 +1200,7 @@ /* Remove the handler */ Handler = GpeEventInfo->Dispatch.Handler; + GpeEventInfo->Dispatch.Handler = NULL; /* Restore Method node (if any), set dispatch flags */ @@ -1107,8 +1214,10 @@ * 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); Index: drivers/bus/acpi/acpica/events/evxfevnt.c =================================================================== --- drivers/bus/acpi/acpica/events/evxfevnt.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evxfevnt.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -473,7 +473,8 @@ if (InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED; + LocalEventStatus |= + (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET); } /* Fixed event currently active? */ @@ -487,7 +488,7 @@ if (InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_SET; + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET; } (*EventStatus) = LocalEventStatus; Index: drivers/bus/acpi/acpica/events/evxfgpe.c =================================================================== --- drivers/bus/acpi/acpica/events/evxfgpe.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evxfgpe.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -219,7 +219,7 @@ GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber); if (GpeEventInfo) { - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { Status = AcpiEvAddGpeReference (GpeEventInfo); @@ -293,12 +293,21 @@ * RETURN: Status * * DESCRIPTION: Enable or disable an individual GPE. This function bypasses - * the reference count mechanism used in the AcpiEnableGpe and - * AcpiDisableGpe interfaces -- and should be used with care. + * the reference count mechanism used in the AcpiEnableGpe(), + * AcpiDisableGpe() interfaces. + * This API is typically used by the GPE raw handler mode driver + * to switch between the polling mode and the interrupt mode after + * the driver has enabled the GPE. + * The APIs should be invoked in this order: + * AcpiEnableGpe() <- Ensure the reference count > 0 + * AcpiSetGpe(ACPI_GPE_DISABLE) <- Enter polling mode + * AcpiSetGpe(ACPI_GPE_ENABLE) <- Leave polling mode + * AcpiDisableGpe() <- Decrease the reference count * - * Note: Typically used to disable a runtime GPE for short period of time, - * then re-enable it, without disturbing the existing reference counts. This - * is useful, for example, in the Embedded Controller (EC) driver. + * Note: If a GPE is shared by 2 silicon components, then both the drivers + * should support GPE polling mode or disabling the GPE for long period + * for one driver may break the other. So use it with care since all + * firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode. * ******************************************************************************/ @@ -333,7 +342,7 @@ { case ACPI_GPE_ENABLE: - Status = AcpiEvEnableGpe (GpeEventInfo); + Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); break; case ACPI_GPE_DISABLE: @@ -502,7 +511,7 @@ * known as an "implicit notify". Note: The GPE is assumed to be * level-triggered (for windows compatibility). */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) { /* @@ -517,7 +526,7 @@ * If we already have an implicit notify on this GPE, add * this device to the notify list. */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NOTIFY) { /* Ensure that the device is not already in the list */ @@ -874,6 +883,44 @@ 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 Index: drivers/bus/acpi/acpica/events/evxfregn.c =================================================================== --- drivers/bus/acpi/acpica/events/evxfregn.c (revision 69866) +++ drivers/bus/acpi/acpica/events/evxfregn.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exconfig.c =================================================================== --- drivers/bus/acpi/acpica/executer/exconfig.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exconfig.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exconvrt.c =================================================================== --- drivers/bus/acpi/acpica/executer/exconvrt.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exconvrt.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/excreate.c =================================================================== --- drivers/bus/acpi/acpica/executer/excreate.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/excreate.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exdebug.c =================================================================== --- drivers/bus/acpi/acpica/executer/exdebug.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exdebug.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exdump.c =================================================================== --- drivers/bus/acpi/acpica/executer/exdump.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exdump.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -856,7 +856,7 @@ 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; Index: drivers/bus/acpi/acpica/executer/exfield.c =================================================================== --- drivers/bus/acpi/acpica/executer/exfield.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exfield.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exfldio.c =================================================================== --- drivers/bus/acpi/acpica/executer/exfldio.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exfldio.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -361,13 +361,13 @@ } 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 */ Index: drivers/bus/acpi/acpica/executer/exmisc.c =================================================================== --- drivers/bus/acpi/acpica/executer/exmisc.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exmisc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exmutex.c =================================================================== --- drivers/bus/acpi/acpica/executer/exmutex.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exmutex.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exnames.c =================================================================== --- drivers/bus/acpi/acpica/executer/exnames.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exnames.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exoparg1.c =================================================================== --- drivers/bus/acpi/acpica/executer/exoparg1.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exoparg1.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exoparg2.c =================================================================== --- drivers/bus/acpi/acpica/executer/exoparg2.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exoparg2.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exoparg3.c =================================================================== --- drivers/bus/acpi/acpica/executer/exoparg3.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exoparg3.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -198,8 +198,19 @@ /* 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: ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X", Index: drivers/bus/acpi/acpica/executer/exoparg6.c =================================================================== --- drivers/bus/acpi/acpica/executer/exoparg6.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exoparg6.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exprep.c =================================================================== --- drivers/bus/acpi/acpica/executer/exprep.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exprep.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exregion.c =================================================================== --- drivers/bus/acpi/acpica/executer/exregion.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exregion.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -247,8 +247,8 @@ * one page, which is similar to the original code that used a 4k * maximum window. */ - PageBoundaryMapLength = - ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address; + PageBoundaryMapLength = (ACPI_SIZE) + (ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address); if (PageBoundaryMapLength == 0) { PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE; @@ -261,13 +261,12 @@ /* Create a new mapping starting at the address given */ - MemInfo->MappedLogicalAddress = AcpiOsMapMemory ( - (ACPI_PHYSICAL_ADDRESS) Address, MapLength); + MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength); if (!MemInfo->MappedLogicalAddress) { ACPI_ERROR ((AE_INFO, "Could not map memory at 0x%8.8X%8.8X, size %u", - ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength)); + ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength)); MemInfo->MappedLength = 0; return_ACPI_STATUS (AE_NO_MEMORY); } @@ -287,7 +286,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", - BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address))); + BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); /* * Perform the memory read or write @@ -410,7 +409,7 @@ 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 */ Index: drivers/bus/acpi/acpica/executer/exresnte.c =================================================================== --- drivers/bus/acpi/acpica/executer/exresnte.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exresnte.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exresolv.c =================================================================== --- drivers/bus/acpi/acpica/executer/exresolv.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exresolv.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exresop.c =================================================================== --- drivers/bus/acpi/acpica/executer/exresop.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exresop.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exstore.c =================================================================== --- drivers/bus/acpi/acpica/executer/exstore.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exstore.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exstoren.c =================================================================== --- drivers/bus/acpi/acpica/executer/exstoren.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exstoren.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exstorob.c =================================================================== --- drivers/bus/acpi/acpica/executer/exstorob.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exstorob.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exsystem.c =================================================================== --- drivers/bus/acpi/acpica/executer/exsystem.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exsystem.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/executer/exutils.c =================================================================== --- drivers/bus/acpi/acpica/executer/exutils.c (revision 69866) +++ drivers/bus/acpi/acpica/executer/exutils.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwacpi.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwacpi.c (revision 69866) +++ drivers/bus/acpi/acpica/hardware/hwacpi.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwesleep.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwesleep.c (revision 69845) +++ drivers/bus/acpi/acpica/hardware/hwesleep.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwgpe.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwgpe.c (revision 69866) +++ drivers/bus/acpi/acpica/hardware/hwgpe.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -130,7 +130,12 @@ ACPI_GPE_BLOCK_INFO *GpeBlock, void *Context); +static ACPI_STATUS +AcpiHwGpeEnableWrite ( + UINT8 EnableMask, + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo); + /****************************************************************************** * * FUNCTION: AcpiHwGetGpeRegisterBit @@ -200,13 +205,13 @@ /* Set or clear just the bit that corresponds to this GPE */ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); - switch (Action) + switch (Action & ~ACPI_GPE_SAVE_MASK) { case ACPI_GPE_CONDITIONAL_ENABLE: - /* Only enable if the EnableForRun bit is set */ + /* Only enable if the corresponding EnableMask bit is set */ - if (!(RegisterBit & GpeRegisterInfo->EnableForRun)) + if (!(RegisterBit & GpeRegisterInfo->EnableMask)) { return (AE_BAD_PARAMETER); } @@ -232,6 +237,10 @@ /* Write the updated enable mask */ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); + if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK)) + { + GpeRegisterInfo->EnableMask = (UINT8) EnableMask; + } return (Status); } @@ -315,7 +324,7 @@ /* GPE currently handled? */ - if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER; @@ -343,6 +352,19 @@ LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED; } + /* GPE currently enabled (enable bit == 1)? */ + + Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + if (RegisterBit & InByte) + { + LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET; + } + /* GPE currently active (status bit == 1)? */ Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress); @@ -353,7 +375,7 @@ if (RegisterBit & InByte) { - LocalEventStatus |= ACPI_EVENT_FLAG_SET; + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET; } /* Set return value */ @@ -365,6 +387,37 @@ /****************************************************************************** * + * 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 * * PARAMETERS: GpeXruptInfo - GPE Interrupt info @@ -392,7 +445,7 @@ { /* Disable all GPEs in this register */ - Status = AcpiHwWrite (0x00, &GpeBlock->RegisterInfo[i].EnableAddress); + Status = AcpiHwGpeEnableWrite (0x00, &GpeBlock->RegisterInfo[i]); if (ACPI_FAILURE (Status)) { return (Status); @@ -465,6 +518,7 @@ { UINT32 i; ACPI_STATUS Status; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; /* NOTE: assumes that all GPEs are currently disabled */ @@ -473,7 +527,8 @@ for (i = 0; i < GpeBlock->RegisterCount; i++) { - if (!GpeBlock->RegisterInfo[i].EnableForRun) + GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; + if (!GpeRegisterInfo->EnableForRun) { continue; } @@ -480,8 +535,8 @@ /* Enable all "runtime" GPEs in this register */ - Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForRun, - &GpeBlock->RegisterInfo[i].EnableAddress); + Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun, + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); @@ -514,6 +569,7 @@ { UINT32 i; ACPI_STATUS Status; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; /* Examine each GPE Register within the block */ @@ -520,15 +576,14 @@ for (i = 0; i < GpeBlock->RegisterCount; i++) { - if (!GpeBlock->RegisterInfo[i].EnableForWake) - { - continue; - } + GpeRegisterInfo = &GpeBlock->RegisterInfo[i]; - /* Enable all "wake" GPEs in this register */ - - Status = AcpiHwWrite (GpeBlock->RegisterInfo[i].EnableForWake, - &GpeBlock->RegisterInfo[i].EnableAddress); + /* + * Enable all "wake" GPEs in this register and disable the + * remaining ones. + */ + Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake, + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); Index: drivers/bus/acpi/acpica/hardware/hwpci.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwpci.c (revision 69866) +++ drivers/bus/acpi/acpica/hardware/hwpci.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwregs.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwregs.c (revision 69866) +++ drivers/bus/acpi/acpica/hardware/hwregs.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwsleep.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwsleep.c (revision 69845) +++ drivers/bus/acpi/acpica/hardware/hwsleep.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwtimer.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwtimer.c (revision 69845) +++ drivers/bus/acpi/acpica/hardware/hwtimer.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwvalid.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwvalid.c (revision 69866) +++ drivers/bus/acpi/acpica/hardware/hwvalid.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -227,8 +227,8 @@ ByteWidth = ACPI_DIV_8 (BitWidth); LastAddress = Address + ByteWidth - 1; - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %p LastAddress %p Length %X", - ACPI_CAST_PTR (void, Address), ACPI_CAST_PTR (void, LastAddress), + ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", + ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress), ByteWidth)); /* Maximum 16-bit address in I/O space */ @@ -236,8 +236,8 @@ if (LastAddress > ACPI_UINT16_MAX) { ACPI_ERROR ((AE_INFO, - "Illegal I/O port address/length above 64K: %p/0x%X", - ACPI_CAST_PTR (void, Address), ByteWidth)); + "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", + ACPI_FORMAT_UINT64 (Address), ByteWidth)); return_ACPI_STATUS (AE_LIMIT); } @@ -268,8 +268,8 @@ 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); Index: drivers/bus/acpi/acpica/hardware/hwxface.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwxface.c (revision 69845) +++ drivers/bus/acpi/acpica/hardware/hwxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/hardware/hwxfsleep.c =================================================================== --- drivers/bus/acpi/acpica/hardware/hwxfsleep.c (revision 69845) +++ drivers/bus/acpi/acpica/hardware/hwxfsleep.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acapps.h =================================================================== --- drivers/bus/acpi/acpica/include/acapps.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acapps.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -124,7 +124,7 @@ /* Common info for tool signons */ #define ACPICA_NAME "Intel ACPI Component Architecture" -#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2014 Intel Corporation" +#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2015 Intel Corporation" #if ACPI_MACHINE_WIDTH == 64 #define ACPI_WIDTH "-64" @@ -141,15 +141,15 @@ /* Macros for signons and file headers */ #define ACPI_COMMON_SIGNON(UtilityName) \ - "\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \ + "\n%s\n%s version %8.8X%s\n%s\n\n", \ ACPICA_NAME, \ - UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \ + UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ ACPICA_COPYRIGHT #define ACPI_COMMON_HEADER(UtilityName, Prefix) \ - "%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \ + "%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \ Prefix, ACPICA_NAME, \ - Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \ + Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ Prefix, ACPICA_COPYRIGHT, \ Prefix Index: drivers/bus/acpi/acpica/include/acbuffer.h =================================================================== --- drivers/bus/acpi/acpica/include/acbuffer.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acbuffer.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/accommon.h =================================================================== --- drivers/bus/acpi/acpica/include/accommon.h (revision 69845) +++ drivers/bus/acpi/acpica/include/accommon.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acconfig.h =================================================================== --- drivers/bus/acpi/acpica/include/acconfig.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acconfig.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acdebug.h =================================================================== --- drivers/bus/acpi/acpica/include/acdebug.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acdebug.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,7 +149,7 @@ #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);} Index: drivers/bus/acpi/acpica/include/acdisasm.h =================================================================== --- drivers/bus/acpi/acpica/include/acdisasm.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acdisasm.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -201,6 +201,7 @@ /* Types used only for the Data Table Compiler */ ACPI_DMT_BUFFER, + ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */ ACPI_DMT_DEVICE_PATH, ACPI_DMT_LABEL, ACPI_DMT_PCI_PATH, @@ -423,9 +424,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[]; -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[]; @@ -494,6 +493,15 @@ * dmtbdump */ void +AcpiDmDumpBuffer ( + void *Table, + UINT32 BufferOffset, + UINT32 Length, + UINT32 AbsoluteOffset, + char *Header, + BOOLEAN MultiLine); + +void AcpiDmDumpAsf ( ACPI_TABLE_HEADER *Table); @@ -1068,6 +1076,10 @@ */ void AdDisassemblerHeader ( - char *Filename); + char *Filename, + UINT8 TableType); +#define ACPI_IS_AML_TABLE 0 +#define ACPI_IS_DATA_TABLE 1 + #endif /* __ACDISASM_H__ */ Index: drivers/bus/acpi/acpica/include/acdispat.h =================================================================== --- drivers/bus/acpi/acpica/include/acdispat.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acdispat.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acevents.h =================================================================== --- drivers/bus/acpi/acpica/include/acevents.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acevents.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -269,10 +269,6 @@ ACPI_GPE_CALLBACK GpeWalkCallback, void *Context); -BOOLEAN -AcpiEvValidGpeEvent ( - ACPI_GPE_EVENT_INFO *GpeEventInfo); - ACPI_STATUS AcpiEvGetGpeDevice ( ACPI_GPE_XRUPT_INFO *GpeXruptInfo, Index: drivers/bus/acpi/acpica/include/acexcep.h =================================================================== --- drivers/bus/acpi/acpica/include/acexcep.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acexcep.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acglobal.h =================================================================== --- drivers/bus/acpi/acpica/include/acglobal.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acglobal.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -382,9 +382,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_disasm); -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_verbose); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Disasm); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Verbose); ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods); ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods); ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList); @@ -397,9 +398,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_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); Index: drivers/bus/acpi/acpica/include/achware.h =================================================================== --- drivers/bus/acpi/acpica/include/achware.h (revision 69845) +++ drivers/bus/acpi/acpica/include/achware.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acinterp.h =================================================================== --- drivers/bus/acpi/acpica/include/acinterp.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acinterp.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/aclocal.h =================================================================== --- drivers/bus/acpi/acpica/include/aclocal.h (revision 69866) +++ drivers/bus/acpi/acpica/include/aclocal.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -126,7 +126,7 @@ /* Total number of aml opcodes defined */ -#define AML_NUM_OPCODES 0x81 +#define AML_NUM_OPCODES 0x82 /* Forward declarations */ @@ -592,6 +592,7 @@ 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; Index: drivers/bus/acpi/acpica/include/acmacros.h =================================================================== --- drivers/bus/acpi/acpica/include/acmacros.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acmacros.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -136,24 +136,13 @@ #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. * If the hardware supports the transfer of unaligned data, just do the store. Index: drivers/bus/acpi/acpica/include/acnames.h =================================================================== --- drivers/bus/acpi/acpica/include/acnames.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acnames.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acnamesp.h =================================================================== --- drivers/bus/acpi/acpica/include/acnamesp.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acnamesp.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acobject.h =================================================================== --- drivers/bus/acpi/acpica/include/acobject.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acobject.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acopcode.h =================================================================== --- drivers/bus/acpi/acpica/include/acopcode.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acopcode.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -184,6 +184,7 @@ #define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA) #define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST) #define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME) +#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA) #define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG) #define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST) #define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) @@ -317,6 +318,7 @@ #define ARGI_DWORD_OP ARGI_INVALID_OPCODE #define ARGI_ELSE_OP ARGI_INVALID_OPCODE #define ARGI_EVENT_OP ARGI_INVALID_OPCODE +#define ARGI_EXTERNAL_OP ARGI_LIST3 (ARGI_STRING, ARGI_INTEGER, ARGI_INTEGER) #define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) #define ARGI_FIELD_OP ARGI_INVALID_OPCODE #define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) Index: drivers/bus/acpi/acpica/include/acoutput.h =================================================================== --- drivers/bus/acpi/acpica/include/acoutput.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acoutput.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acparser.h =================================================================== --- drivers/bus/acpi/acpica/include/acparser.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acparser.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acpi.h =================================================================== --- drivers/bus/acpi/acpica/include/acpi.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acpi.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acpiosxf.h =================================================================== --- drivers/bus/acpi/acpica/include/acpiosxf.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acpiosxf.h (working copy) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acpixf.h =================================================================== --- drivers/bus/acpi/acpica/include/acpixf.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acpixf.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -118,7 +118,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20141107 +#define ACPI_CA_VERSION 0x20150410 #include "acconfig.h" #include "actypes.h" @@ -575,7 +575,7 @@ ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS AcpiFindRootPointer ( - ACPI_SIZE *RsdpAddress)) + ACPI_PHYSICAL_ADDRESS *RsdpAddress)) ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS @@ -776,6 +776,15 @@ 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 ( ACPI_HANDLE GpeDevice, UINT32 GpeNumber, @@ -960,6 +969,11 @@ ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_STATUS +AcpiEnableAllWakeupGpes ( + void)) + +ACPI_HW_DEPENDENT_RETURN_STATUS ( +ACPI_STATUS AcpiGetGpeDevice ( UINT32 GpeIndex, ACPI_HANDLE *GpeDevice)) Index: drivers/bus/acpi/acpica/include/acpredef.h =================================================================== --- drivers/bus/acpi/acpica/include/acpredef.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acpredef.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/acresrc.h =================================================================== --- drivers/bus/acpi/acpica/include/acresrc.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acresrc.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -425,8 +425,9 @@ /* - * rsdump + * rsdump - Debugger support */ +#ifdef ACPI_DEBUGGER void AcpiRsDumpResourceList ( ACPI_RESOURCE *Resource); @@ -434,6 +435,7 @@ void AcpiRsDumpIrqList ( UINT8 *RouteTable); +#endif /* Index: drivers/bus/acpi/acpica/include/acrestyp.h =================================================================== --- drivers/bus/acpi/acpica/include/acrestyp.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acrestyp.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -417,6 +417,36 @@ UINT8 MaxAddressFixed; \ ACPI_RESOURCE_ATTRIBUTE Info; +typedef struct acpi_address16_attribute +{ + UINT16 Granularity; + UINT16 Minimum; + UINT16 Maximum; + UINT16 TranslationOffset; + UINT16 AddressLength; + +} ACPI_ADDRESS16_ATTRIBUTE; + +typedef struct acpi_address32_attribute +{ + UINT32 Granularity; + UINT32 Minimum; + UINT32 Maximum; + UINT32 TranslationOffset; + UINT32 AddressLength; + +} ACPI_ADDRESS32_ATTRIBUTE; + +typedef struct acpi_address64_attribute +{ + UINT64 Granularity; + UINT64 Minimum; + UINT64 Maximum; + UINT64 TranslationOffset; + UINT64 AddressLength; + +} ACPI_ADDRESS64_ATTRIBUTE; + typedef struct acpi_resource_address { ACPI_RESOURCE_ADDRESS_COMMON @@ -426,11 +456,7 @@ typedef struct acpi_resource_address16 { ACPI_RESOURCE_ADDRESS_COMMON - UINT16 Granularity; - UINT16 Minimum; - UINT16 Maximum; - UINT16 TranslationOffset; - UINT16 AddressLength; + ACPI_ADDRESS16_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS16; @@ -438,11 +464,7 @@ typedef struct acpi_resource_address32 { ACPI_RESOURCE_ADDRESS_COMMON - UINT32 Granularity; - UINT32 Minimum; - UINT32 Maximum; - UINT32 TranslationOffset; - UINT32 AddressLength; + ACPI_ADDRESS32_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS32; @@ -450,11 +472,7 @@ typedef struct acpi_resource_address64 { ACPI_RESOURCE_ADDRESS_COMMON - UINT64 Granularity; - UINT64 Minimum; - UINT64 Maximum; - UINT64 TranslationOffset; - UINT64 AddressLength; + ACPI_ADDRESS64_ATTRIBUTE Address; ACPI_RESOURCE_SOURCE ResourceSource; } ACPI_RESOURCE_ADDRESS64; @@ -463,11 +481,7 @@ { 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; Index: drivers/bus/acpi/acpica/include/acstruct.h =================================================================== --- drivers/bus/acpi/acpica/include/acstruct.h (revision 69845) +++ drivers/bus/acpi/acpica/include/acstruct.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -141,12 +141,7 @@ #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 { struct acpi_walk_state *Next; /* Next WalkState in list */ Index: drivers/bus/acpi/acpica/include/actables.h =================================================================== --- drivers/bus/acpi/acpica/include/actables.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actables.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -142,8 +142,9 @@ * tbdata - table data structure management */ ACPI_STATUS -AcpiTbGetNextRootIndex ( - UINT32 *TableIndex); +AcpiTbGetNextTableDescriptor ( + UINT32 *TableIndex, + ACPI_TABLE_DESC **TableDesc); void AcpiTbInitTableDescriptor ( @@ -245,14 +246,6 @@ 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); Index: drivers/bus/acpi/acpica/include/actbl.h =================================================================== --- drivers/bus/acpi/acpica/include/actbl.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actbl.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/actbl1.h =================================================================== --- drivers/bus/acpi/acpica/include/actbl1.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actbl1.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/actbl2.h =================================================================== --- drivers/bus/acpi/acpica/include/actbl2.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actbl2.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -147,6 +147,7 @@ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ +#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ @@ -1051,7 +1052,8 @@ 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 */ @@ -1156,6 +1158,24 @@ /******************************************************************************* * + * 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 * Version 1 * @@ -1185,10 +1205,9 @@ /******************************************************************************* * * SLIC - Software Licensing Description Table - * Version 1 * - * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems", - * Copyright 2006 + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", + * November 29, 2011. Copyright 2011 Microsoft * ******************************************************************************/ @@ -1201,62 +1220,6 @@ } 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 Index: drivers/bus/acpi/acpica/include/actbl3.h =================================================================== --- drivers/bus/acpi/acpica/include/actbl3.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actbl3.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/actypes.h =================================================================== --- drivers/bus/acpi/acpica/include/actypes.h (revision 69866) +++ drivers/bus/acpi/acpica/include/actypes.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -232,7 +232,6 @@ #endif /* ACPI_USE_SYSTEM_INTTYPES */ - typedef INT64 ACPI_NATIVE_INT; typedef UINT64 ACPI_SIZE; typedef UINT64 ACPI_IO_ADDRESS; @@ -272,12 +271,31 @@ #endif /* ACPI_USE_SYSTEM_INTTYPES */ - typedef INT32 ACPI_NATIVE_INT; typedef UINT32 ACPI_SIZE; + +#ifdef ACPI_32BIT_PHYSICAL_ADDRESS + +/* + * OSPMs can define this to shrink the size of the structures for 32-bit + * none PAE environment. ASL compiler may always define this to generate + * 32-bit OSPM compliant tables. + */ typedef UINT32 ACPI_IO_ADDRESS; typedef UINT32 ACPI_PHYSICAL_ADDRESS; +#else /* ACPI_32BIT_PHYSICAL_ADDRESS */ + +/* + * It is reported that, after some calculations, the physical addresses can + * wrap over the 32-bit boundary on 32-bit PAE environment. + * https://bugzilla.kernel.org/show_bug.cgi?id=87971 + */ +typedef UINT64 ACPI_IO_ADDRESS; +typedef UINT64 ACPI_PHYSICAL_ADDRESS; + +#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */ + #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX @@ -794,15 +812,16 @@ * 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? - * +------------- + * +-------------+-+-+-+-+-+ + * | Bits 31:5 |4|3|2|1|0| + * +-------------+-+-+-+-+-+ + * | | | | | | + * | | | | | +- Enabled? + * | | | | +--- Enabled for wake? + * | | | +----- Status bit set? + * | | +------- Enable bit set? + * | +--------- Has a handler? + * +--------------- */ typedef UINT32 ACPI_EVENT_STATUS; @@ -809,8 +828,10 @@ #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 */ @@ -817,11 +838,15 @@ #define ACPI_GPE_ENABLE 0 #define ACPI_GPE_DISABLE 1 #define ACPI_GPE_CONDITIONAL_ENABLE 2 +#define ACPI_GPE_SAVE_MASK 4 +#define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK) +#define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK) + /* * GPE info flags - Per GPE * +-------+-+-+---+ - * | 7:4 |3|2|1:0| + * | 7:5 |4|3|2:0| * +-------+-+-+---+ * | | | | * | | | +-- Type of dispatch:to method, handler, notify, or none @@ -833,13 +858,15 @@ #define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x01 #define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x02 #define ACPI_GPE_DISPATCH_NOTIFY (UINT8) 0x03 -#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x03 +#define ACPI_GPE_DISPATCH_RAW_HANDLER (UINT8) 0x04 +#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x07 +#define ACPI_GPE_DISPATCH_TYPE(flags) ((UINT8) ((flags) & ACPI_GPE_DISPATCH_MASK)) -#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x04 +#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x08 #define ACPI_GPE_EDGE_TRIGGERED (UINT8) 0x00 -#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x04 +#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x08 -#define ACPI_GPE_CAN_WAKE (UINT8) 0x08 +#define ACPI_GPE_CAN_WAKE (UINT8) 0x10 /* * Flags for GPE and Lock interfaces @@ -1412,6 +1439,7 @@ #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 */ Index: drivers/bus/acpi/acpica/include/acutils.h =================================================================== --- drivers/bus/acpi/acpica/include/acutils.h (revision 69866) +++ drivers/bus/acpi/acpica/include/acutils.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -795,6 +795,12 @@ AcpiUtMatchPredefinedMethod ( char *Name); +void +AcpiUtGetExpectedReturnTypes ( + char *Buffer, + UINT32 ExpectedBtypes); + +#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP) const ACPI_PREDEFINED_INFO * AcpiUtMatchResourceName ( char *Name); @@ -805,15 +811,11 @@ const ACPI_PREDEFINED_INFO *ThisName, BOOLEAN MultiLine); -void -AcpiUtGetExpectedReturnTypes ( - char *Buffer, - UINT32 ExpectedBtypes); - UINT32 AcpiUtGetResourceBitWidth ( char *Buffer, UINT16 Types); +#endif /* @@ -854,13 +856,6 @@ UINT16 Action, ACPI_GENERIC_STATE **StateList); -ACPI_STATUS -AcpiUtCreatePkgStateAndPush ( - void *InternalObject, - void *ExternalObject, - UINT16 Index, - ACPI_GENERIC_STATE **StateList); - ACPI_GENERIC_STATE * AcpiUtCreateControlState ( void); @@ -899,9 +894,11 @@ AcpiUtIsPciRootBridge ( char *Id); +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP) BOOLEAN AcpiUtIsAmlTable ( ACPI_TABLE_HEADER *Table); +#endif ACPI_STATUS AcpiUtWalkPackageTree ( @@ -990,6 +987,7 @@ AcpiUtStrupr ( char *SrcString); +#ifdef ACPI_ASL_COMPILER void AcpiUtStrlwr ( char *SrcString); @@ -998,6 +996,7 @@ AcpiUtStricmp ( char *String1, char *String2); +#endif ACPI_STATUS AcpiUtStrtoul64 ( @@ -1010,9 +1009,11 @@ char *String, UINT16 MaxLength); +#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP void UtConvertBackslashes ( char *Pathname); +#endif BOOLEAN AcpiUtValidAcpiName ( @@ -1259,9 +1260,11 @@ /* * 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 */ Index: drivers/bus/acpi/acpica/include/amlcode.h =================================================================== --- drivers/bus/acpi/acpica/include/amlcode.h (revision 69845) +++ drivers/bus/acpi/acpica/include/amlcode.h (working copy) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -137,6 +137,7 @@ #define AML_PACKAGE_OP (UINT16) 0x12 #define AML_VAR_PACKAGE_OP (UINT16) 0x13 /* ACPI 2.0 */ #define AML_METHOD_OP (UINT16) 0x14 +#define AML_EXTERNAL_OP (UINT16) 0x15 /* ACPI 6.0 */ #define AML_DUAL_NAME_PREFIX (UINT16) 0x2e #define AML_MULTI_NAME_PREFIX_OP (UINT16) 0x2f #define AML_NAME_CHAR_SUBSEQ (UINT16) 0x30 @@ -281,7 +282,6 @@ #define AML_INT_RESERVEDFIELD_OP (UINT16) 0x0031 #define AML_INT_ACCESSFIELD_OP (UINT16) 0x0032 #define AML_INT_BYTELIST_OP (UINT16) 0x0033 -#define AML_INT_STATICSTRING_OP (UINT16) 0x0034 #define AML_INT_METHODCALL_OP (UINT16) 0x0035 #define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036 #define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037 Index: drivers/bus/acpi/acpica/include/amlresrc.h =================================================================== --- drivers/bus/acpi/acpica/include/amlresrc.h (revision 69866) +++ drivers/bus/acpi/acpica/include/amlresrc.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/accygwin.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/accygwin.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/accygwin.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acdragonfly.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acdragonfly.h (revision 0) +++ drivers/bus/acpi/acpica/include/platform/acdragonfly.h (working copy) @@ -0,0 +1,202 @@ +/****************************************************************************** + * + * 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 /* DragonFly uses GCC */ +#include + +#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 +#include +#include +#include + +#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_ */ Property changes on: drivers/bus/acpi/acpica/include/platform/acdragonfly.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: drivers/bus/acpi/acpica/include/platform/acdragonflyex.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acdragonflyex.h (revision 0) +++ drivers/bus/acpi/acpica/include/platform/acdragonflyex.h (working copy) @@ -0,0 +1,156 @@ +/****************************************************************************** + * + * 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__ */ Property changes on: drivers/bus/acpi/acpica/include/platform/acdragonflyex.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: drivers/bus/acpi/acpica/include/platform/acefi.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acefi.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/acefi.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acenv.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acenv.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/acenv.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,6 +149,7 @@ #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 */ Index: drivers/bus/acpi/acpica/include/platform/acenvex.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acenvex.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/acenvex.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acfreebsd.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acfreebsd.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acfreebsd.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acgcc.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acgcc.h (revision 69863) +++ drivers/bus/acpi/acpica/include/platform/acgcc.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/achaiku.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/achaiku.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/achaiku.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acintel.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acintel.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acintel.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/aclinux.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/aclinux.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/aclinux.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/aclinuxex.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/aclinuxex.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/aclinuxex.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acmacosx.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acmacosx.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acmacosx.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acmsvc.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acmsvc.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/acmsvc.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acnetbsd.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acnetbsd.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acnetbsd.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,6 +120,10 @@ #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 @@ -129,8 +133,10 @@ #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 #include @@ -160,15 +166,10 @@ #endif /* DDB */ #endif /* ACPI_DEBUG */ -static __inline int -isprint(int ch) -{ - return(isspace(ch) || isascii(ch)); -} +#else /* defined(_KERNEL) || defined(_STANDALONE) */ -#else /* _KERNEL */ - #include +#include /* Not building kernel code, so use libc */ #define ACPI_USE_STANDARD_HEADERS @@ -175,12 +176,10 @@ #define __cli() #define __sti() +#define __cdecl -/* XXX */ -#define __inline inline +#endif /* defined(_KERNEL) || defined(_STANDALONE) */ -#endif /* _KERNEL */ - /* Always use NetBSD code over our local versions */ #define ACPI_USE_SYSTEM_CLIBRARY #define ACPI_USE_NATIVE_DIVIDE Index: drivers/bus/acpi/acpica/include/platform/acos2.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acos2.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acos2.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acwin.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acwin.h (revision 69866) +++ drivers/bus/acpi/acpica/include/platform/acwin.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/include/platform/acwin64.h =================================================================== --- drivers/bus/acpi/acpica/include/platform/acwin64.h (revision 69845) +++ drivers/bus/acpi/acpica/include/platform/acwin64.h (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsaccess.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsaccess.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsaccess.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsalloc.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsalloc.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsalloc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsarguments.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsarguments.c (revision 69845) +++ drivers/bus/acpi/acpica/namespace/nsarguments.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsconvert.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsconvert.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsconvert.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsdump.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsdump.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsdump.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -386,9 +386,9 @@ { 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: @@ -461,7 +461,7 @@ 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 Index: drivers/bus/acpi/acpica/namespace/nsdumpdv.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsdumpdv.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsdumpdv.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nseval.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nseval.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nseval.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsinit.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsinit.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsinit.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsload.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsload.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsload.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsnames.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsnames.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsnames.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsobject.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsobject.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsobject.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsparse.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsparse.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsparse.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nspredef.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nspredef.c (revision 69845) +++ drivers/bus/acpi/acpica/namespace/nspredef.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsprepkg.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsprepkg.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsprepkg.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsrepair.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsrepair.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsrepair.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsrepair2.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsrepair2.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsrepair2.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nssearch.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nssearch.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nssearch.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsutils.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsutils.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsutils.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nswalk.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nswalk.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nswalk.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsxfeval.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsxfeval.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsxfeval.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsxfname.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsxfname.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsxfname.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/namespace/nsxfobj.c =================================================================== --- drivers/bus/acpi/acpica/namespace/nsxfobj.c (revision 69866) +++ drivers/bus/acpi/acpica/namespace/nsxfobj.c (working copy) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psargs.c =================================================================== --- drivers/bus/acpi/acpica/parser/psargs.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psargs.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psloop.c =================================================================== --- drivers/bus/acpi/acpica/parser/psloop.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psloop.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psobject.c =================================================================== --- drivers/bus/acpi/acpica/parser/psobject.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psobject.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psopcode.c =================================================================== --- drivers/bus/acpi/acpica/parser/psopcode.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psopcode.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -405,7 +405,11 @@ /* 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 !*/ }; Index: drivers/bus/acpi/acpica/parser/psopinfo.c =================================================================== --- drivers/bus/acpi/acpica/parser/psopinfo.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psopinfo.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -298,7 +298,7 @@ /* 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, Index: drivers/bus/acpi/acpica/parser/psparse.c =================================================================== --- drivers/bus/acpi/acpica/parser/psparse.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psparse.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psscope.c =================================================================== --- drivers/bus/acpi/acpica/parser/psscope.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psscope.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/pstree.c =================================================================== --- drivers/bus/acpi/acpica/parser/pstree.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/pstree.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psutils.c =================================================================== --- drivers/bus/acpi/acpica/parser/psutils.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psutils.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/pswalk.c =================================================================== --- drivers/bus/acpi/acpica/parser/pswalk.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/pswalk.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/parser/psxface.c =================================================================== --- drivers/bus/acpi/acpica/parser/psxface.c (revision 69866) +++ drivers/bus/acpi/acpica/parser/psxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsaddr.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsaddr.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsaddr.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -149,7 +149,7 @@ * 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}, @@ -189,7 +189,7 @@ * 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}, @@ -229,7 +229,7 @@ * 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}, @@ -275,7 +275,7 @@ * 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} }; Index: drivers/bus/acpi/acpica/resources/rscalc.c =================================================================== --- drivers/bus/acpi/acpica/resources/rscalc.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rscalc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rscreate.c =================================================================== --- drivers/bus/acpi/acpica/resources/rscreate.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rscreate.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsdump.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsdump.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsdump.c (working copy) @@ -1,6 +1,6 @@ /******************************************************************************* * - * Module Name: rsdump - Functions to display the resource structures. + * Module Name: rsdump - AML debugger support for resource structures. * ******************************************************************************/ @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,9 +120,11 @@ #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME ("rsdump") +/* + * All functions in this module are used by the AML Debugger only + */ +#if defined(ACPI_DEBUGGER) -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) - /* Local prototypes */ static void @@ -161,8 +163,8 @@ static void AcpiRsDumpWordList ( - UINT16 Length, - UINT16 *Data); + UINT16 Length, + UINT16 *Data); static void AcpiRsDumpDwordList ( @@ -171,8 +173,8 @@ static void AcpiRsDumpShortByteList ( - UINT8 Length, - UINT8 *Data); + UINT8 Length, + UINT8 *Data); static void AcpiRsDumpResourceSource ( @@ -185,11 +187,137 @@ 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); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiRsDumpDescriptor * * PARAMETERS: Resource - Buffer containing the resource @@ -360,7 +488,8 @@ /* * 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: @@ -367,7 +496,8 @@ /* * Optional ResourceSource for Address resources */ - AcpiRsDumpResourceSource (ACPI_CAST_PTR (ACPI_RESOURCE_SOURCE, Target)); + AcpiRsDumpResourceSource (ACPI_CAST_PTR ( + ACPI_RESOURCE_SOURCE, Target)); break; default: @@ -471,131 +601,6 @@ /******************************************************************************* * - * 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* * * PARAMETERS: Title - Name of the resource field @@ -692,8 +697,8 @@ static void AcpiRsDumpShortByteList ( - UINT8 Length, - UINT8 *Data) + UINT8 Length, + UINT8 *Data) { UINT8 i; Index: drivers/bus/acpi/acpica/resources/rsdumpinfo.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsdumpinfo.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsdumpinfo.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -233,11 +233,12 @@ { {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} }; @@ -245,11 +246,12 @@ { {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} }; @@ -257,11 +259,12 @@ { {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} }; @@ -269,11 +272,13 @@ { {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} }; Index: drivers/bus/acpi/acpica/resources/rsinfo.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsinfo.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsinfo.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsio.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsio.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsio.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsirq.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsirq.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsirq.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rslist.c =================================================================== --- drivers/bus/acpi/acpica/resources/rslist.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rslist.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsmemory.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsmemory.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsmemory.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsmisc.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsmisc.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsmisc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsserial.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsserial.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsserial.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsutils.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsutils.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsutils.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/resources/rsxface.c =================================================================== --- drivers/bus/acpi/acpica/resources/rsxface.c (revision 69866) +++ drivers/bus/acpi/acpica/resources/rsxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -133,11 +133,11 @@ 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); Index: drivers/bus/acpi/acpica/tables/tbdata.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbdata.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbdata.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -193,7 +193,8 @@ 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: @@ -299,7 +300,8 @@ 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); @@ -509,11 +511,11 @@ 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; } } @@ -601,11 +603,12 @@ /******************************************************************************* * - * 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 * @@ -612,10 +615,12 @@ ******************************************************************************/ 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 */ @@ -630,8 +635,18 @@ } } - *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); } Index: drivers/bus/acpi/acpica/tables/tbfadt.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbfadt.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbfadt.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/tables/tbfind.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbfind.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbfind.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/tables/tbinstal.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbinstal.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbinstal.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -273,8 +273,8 @@ 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); } @@ -340,8 +340,8 @@ 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); } @@ -353,8 +353,8 @@ 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; } @@ -440,7 +440,6 @@ */ AcpiTbUninstallTable (&NewTableDesc); *TableIndex = i; - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_ACPI_STATUS (AE_OK); } } @@ -448,7 +447,7 @@ /* Add the table to the global root table list */ - Status = AcpiTbGetNextRootIndex (&i); + Status = AcpiTbGetNextTableDescriptor (&i, NULL); if (ACPI_FAILURE (Status)) { goto ReleaseAndExit; @@ -531,11 +530,11 @@ 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 */ @@ -557,49 +556,6 @@ /******************************************************************************* * - * 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 * * PARAMETERS: TableDesc - Table descriptor @@ -630,7 +586,7 @@ 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); Index: drivers/bus/acpi/acpica/tables/tbprint.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbprint.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbprint.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -216,18 +216,12 @@ 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)) @@ -238,8 +232,8 @@ 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, @@ -252,9 +246,9 @@ 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)); Index: drivers/bus/acpi/acpica/tables/tbutils.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbutils.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbutils.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/tables/tbxface.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbxface.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/tables/tbxfload.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbxfload.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbxfload.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/tables/tbxfroot.c =================================================================== --- drivers/bus/acpi/acpica/tables/tbxfroot.c (revision 69866) +++ drivers/bus/acpi/acpica/tables/tbxfroot.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -230,7 +230,7 @@ ACPI_STATUS AcpiFindRootPointer ( - ACPI_SIZE *TableAddress) + ACPI_PHYSICAL_ADDRESS *TableAddress) { UINT8 *TablePtr; UINT8 *MemRover; @@ -290,7 +290,7 @@ PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr); - *TableAddress = PhysicalAddress; + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress; return_ACPI_STATUS (AE_OK); } } @@ -321,7 +321,7 @@ PhysicalAddress = (UINT32) (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr)); - *TableAddress = PhysicalAddress; + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress; return_ACPI_STATUS (AE_OK); } Index: drivers/bus/acpi/acpica/utilities/utaddress.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utaddress.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utaddress.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -189,10 +189,10 @@ 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); @@ -251,10 +251,10 @@ } 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; @@ -338,12 +338,12 @@ 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); } Index: drivers/bus/acpi/acpica/utilities/utalloc.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utalloc.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utalloc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utbuffer.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utbuffer.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utbuffer.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -230,6 +230,15 @@ 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)) { Index: drivers/bus/acpi/acpica/utilities/utcache.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utcache.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utcache.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utclib.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utclib.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utclib.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -547,28 +547,25 @@ 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); } Index: drivers/bus/acpi/acpica/utilities/utcopy.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utcopy.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utcopy.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utdebug.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utdebug.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utdebug.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utdecode.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utdecode.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utdecode.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utdelete.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utdelete.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utdelete.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/uterror.c =================================================================== --- drivers/bus/acpi/acpica/utilities/uterror.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/uterror.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/uteval.c =================================================================== --- drivers/bus/acpi/acpica/utilities/uteval.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/uteval.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utexcep.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utexcep.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utexcep.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utfileio.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utfileio.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utfileio.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utglobal.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utglobal.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utglobal.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -183,12 +183,19 @@ {"_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 */ Index: drivers/bus/acpi/acpica/utilities/uthex.c =================================================================== --- drivers/bus/acpi/acpica/utilities/uthex.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/uthex.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utids.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utids.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utids.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utinit.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utinit.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utinit.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utlock.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utlock.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utlock.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utmath.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utmath.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utmath.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utmisc.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utmisc.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utmisc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -156,6 +156,7 @@ } +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP) /******************************************************************************* * * FUNCTION: AcpiUtIsAmlTable @@ -186,6 +187,7 @@ return (FALSE); } +#endif /******************************************************************************* Index: drivers/bus/acpi/acpica/utilities/utmutex.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utmutex.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utmutex.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utobject.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utobject.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utobject.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utosi.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utosi.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utosi.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -177,6 +177,7 @@ {"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 */ Index: drivers/bus/acpi/acpica/utilities/utownerid.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utownerid.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utownerid.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utpredef.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utpredef.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utpredef.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utprint.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utprint.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utprint.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -514,11 +514,11 @@ 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; @@ -540,6 +540,9 @@ continue; } + Type = 0; + Base = 10; + /* Process sign */ do Index: drivers/bus/acpi/acpica/utilities/utresrc.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utresrc.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utresrc.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utstate.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utstate.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utstate.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -122,44 +122,6 @@ /******************************************************************************* * - * 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 * * PARAMETERS: ListHead - Head of the state stack Index: drivers/bus/acpi/acpica/utilities/utstring.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utstring.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utstring.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/uttrack.c =================================================================== --- drivers/bus/acpi/acpica/utilities/uttrack.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/uttrack.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utuuid.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utuuid.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utuuid.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License @@ -120,6 +120,7 @@ ACPI_MODULE_NAME ("utuuid") +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP) /* * UUID support functions. * @@ -171,3 +172,4 @@ AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]); } } +#endif Index: drivers/bus/acpi/acpica/utilities/utxface.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utxface.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utxface.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utxferror.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utxferror.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utxferror.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utxfinit.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utxfinit.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utxfinit.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/acpica/utilities/utxfmutex.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utxfmutex.c (revision 69866) +++ drivers/bus/acpi/acpica/utilities/utxfmutex.c (working copy) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp. * All rights reserved. * * 2. License Index: drivers/bus/acpi/buspdo.c =================================================================== --- drivers/bus/acpi/buspdo.c (revision 69845) +++ drivers/bus/acpi/buspdo.c (working copy) @@ -1058,8 +1058,8 @@ 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) { @@ -1068,8 +1068,8 @@ 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 { @@ -1086,8 +1086,8 @@ 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; @@ -1102,8 +1102,8 @@ 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) { @@ -1112,8 +1112,8 @@ 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 { @@ -1130,8 +1130,8 @@ 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; @@ -1147,8 +1147,8 @@ 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) { @@ -1157,8 +1157,8 @@ 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 { @@ -1175,8 +1175,8 @@ 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; @@ -1192,8 +1192,8 @@ 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) { @@ -1202,8 +1202,8 @@ 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 { @@ -1220,8 +1220,8 @@ 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; @@ -1537,9 +1537,9 @@ 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) { @@ -1548,9 +1548,9 @@ 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 { @@ -1567,9 +1567,9 @@ 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; @@ -1585,9 +1585,9 @@ 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) { @@ -1596,9 +1596,9 @@ 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 { @@ -1615,9 +1615,9 @@ 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; @@ -1634,9 +1634,9 @@ 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) { @@ -1645,9 +1645,9 @@ 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 { @@ -1664,9 +1664,9 @@ 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; @@ -1683,9 +1683,9 @@ 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) { @@ -1694,9 +1694,9 @@ 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 { @@ -1713,9 +1713,9 @@ 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;