Lines Matching +full:permanently +full:- +full:attached

3  * Module Name: evgpe - General Purpose Event handling and dispatch
11 * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
108 * any of its subsidiaries will export/re-export any technical data, process,
130 * 3. Neither the names of the above-listed copyright holders nor the names
177 * PARAMETERS: GpeEventInfo - GPE to update
197 GpeRegisterInfo = GpeEventInfo->RegisterInfo;
207 ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
211 if (GpeEventInfo->RuntimeCount)
213 ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, (UINT8) RegisterBit);
216 GpeRegisterInfo->EnableMask = GpeRegisterInfo->EnableForRun;
225 * PARAMETERS: GpeEventInfo - GPE to enable
254 * PARAMETERS: GpeEventInfo - GPE to be blocked/unblocked
255 * IsMasked - Whether the GPE is masked or not
275 GpeRegisterInfo = GpeEventInfo->RegisterInfo;
287 if (RegisterBit & GpeRegisterInfo->MaskForRun)
293 ACPI_SET_BIT (GpeRegisterInfo->MaskForRun, (UINT8) RegisterBit);
297 if (!(RegisterBit & GpeRegisterInfo->MaskForRun))
302 ACPI_CLEAR_BIT (GpeRegisterInfo->MaskForRun, (UINT8) RegisterBit);
303 if (GpeEventInfo->RuntimeCount &&
304 !GpeEventInfo->DisableForDispatch)
318 * PARAMETERS: GpeEventInfo - Add a reference to this GPE
319 * ClearOnEnable - Clear GPE status before enabling it
324 * hardware-enabled.
339 if (GpeEventInfo->RuntimeCount == ACPI_UINT8_MAX)
344 GpeEventInfo->RuntimeCount++;
345 if (GpeEventInfo->RuntimeCount == 1)
362 GpeEventInfo->RuntimeCount--;
374 * PARAMETERS: GpeEventInfo - Remove a reference to this GPE
379 * removed, the GPE is hardware-disabled.
393 if (!GpeEventInfo->RuntimeCount)
398 GpeEventInfo->RuntimeCount--;
399 if (!GpeEventInfo->RuntimeCount)
411 GpeEventInfo->RuntimeCount++;
423 * PARAMETERS: GpeNumber - Raw GPE number
424 * GpeBlock - A GPE info block
430 * the low-level implementation of EvGetGpeEventInfo.
447 (GpeNumber < GpeBlock->BlockBaseNumber))
452 GpeIndex = GpeNumber - GpeBlock->BlockBaseNumber;
453 if (GpeIndex >= GpeBlock->GpeCount)
458 return (&GpeBlock->EventInfo[GpeIndex]);
466 * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1
467 * GpeNumber - Raw GPE number
492 /* A NULL GpeDevice means use the FADT-defined GPE block(s) */
513 /* A Non-NULL GpeDevice means this is a GPE Block Device */
517 !ObjDesc->Device.GpeBlock)
522 return (AcpiEvLowGetGpeInfo (GpeNumber, ObjDesc->Device.GpeBlock));
530 * PARAMETERS: GpeXruptList - Interrupt block for this interrupt.
531 * Can have multiple GPE blocks attached.
571 /* Examine all GPE blocks attached to this interrupt level */
573 GpeBlock = GpeXruptList->GpeBlockListHead;
576 GpeDevice = GpeBlock->Node;
579 * Read all of the 8-bit GPE status and enable registers in this GPE
582 for (i = 0; i < GpeBlock->RegisterCount; i++)
586 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
592 if (!(GpeRegisterInfo->EnableForRun |
593 GpeRegisterInfo->EnableForWake))
596 "Ignore disabled registers for GPE %02X-%02X: "
598 GpeRegisterInfo->BaseGpeNumber,
599 GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
600 GpeRegisterInfo->EnableForRun,
601 GpeRegisterInfo->EnableForWake));
611 GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
613 GpeNumber = j + GpeRegisterInfo->BaseGpeNumber;
621 GpeBlock = GpeBlock->Next;
633 * PARAMETERS: Context (GpeEventInfo) - Info for this GPE
639 * therefore does NOT execute at interrupt level - so that
658 /* Do the correct dispatch - normal method or implicit notify */
660 switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
668 * from this thread -- because handlers may in turn run other
674 Notify = GpeEventInfo->Dispatch.NotifyList;
678 Notify->DeviceNode, ACPI_NOTIFY_DEVICE_WAKE);
680 Notify = Notify->Next;
699 Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode;
700 Info->Flags = ACPI_IGNORE_RETURN_VALUE;
710 AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode)));
738 * PARAMETERS: Context (GpeEventInfo) - Info for this GPE
768 * PARAMETERS: GpeEventInfo - Info for this GPE
784 if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
788 * GPE is level-triggered, we clear the GPE status bit after
804 GpeEventInfo->DisableForDispatch = FALSE;
813 * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1
814 * GpeEventInfo - Info for this GPE
815 * GpeNumber - Number relative to the parent GPE block
862 GpeRegisterInfo = GpeEventInfo->RegisterInfo;
870 Status = AcpiHwRead (&EnableReg, &GpeRegisterInfo->EnableAddress);
878 Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress);
892 GpeRegisterInfo->EnableForRun,
893 GpeRegisterInfo->EnableForWake));
913 if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
918 GpeHandlerInfo = GpeEventInfo->Dispatch.Handler;
931 IntStatus |= GpeHandlerInfo->Address (
932 GpeDevice, GpeNumber, GpeHandlerInfo->Context);
953 * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1
954 * GpeEventInfo - Info for this GPE
955 * GpeNumber - Number relative to the parent GPE block
983 * GPE and leave it disabled permanently to prevent further such
995 * If edge-triggered, clear the GPE status bit now. Note that
996 * level-triggered events are cleared after the GPE is serviced.
998 if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
1012 GpeEventInfo->DisableForDispatch = TRUE;
1021 switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
1027 ReturnValue = GpeEventInfo->Dispatch.Handler->Address (
1029 GpeEventInfo->Dispatch.Handler->Context);
1031 /* If requested, clear (if level-triggered) and re-enable the GPE */
1043 * NOTE: Level-triggered GPEs are cleared after the method completes.
1050 "Unable to queue handler for GPE %02X - event disabled",