UINT32 AcpiEvFixedEventDetect ( void) { UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; UINT32 FixedStatus; UINT32 FixedEnable; UINT32 i; ACPI_STATUS Status; ACPI_FUNCTION_NAME (EvFixedEventDetect); /* * Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus); Status |= AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable); if (ACPI_FAILURE (Status)) { return (IntStatus); } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n", FixedEnable, FixedStatus)); /* * Check for all possible Fixed Events and dispatch those that are active */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { /* Both the status and enable bits must be on for this event */ if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) && (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask)) { /* * Found an active (signalled) event. Invoke global event * handler if present. */ AcpiFixedEventCount[i]++; if (AcpiGbl_GlobalEventHandler) { AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_FIXED, NULL, i, AcpiGbl_GlobalEventHandlerContext); } IntStatus |= AcpiEvFixedEventDispatch (i); } } return (IntStatus); }
UINT32 AcpiEvFixedEventDetect ( void) { UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; UINT32 FixedStatus; UINT32 FixedEnable; ACPI_NATIVE_UINT i; ACPI_FUNCTION_NAME (EvFixedEventDetect); /* * Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ (void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, &FixedStatus); (void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE, &FixedEnable); ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n", FixedEnable, FixedStatus)); /* * Check for all possible Fixed Events and dispatch those that are active */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { /* Both the status and enable bits must be on for this event */ if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) && (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask)) { /* Found an active (signalled) event */ AcpiFixedEventCount[i]++; IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i); } } return (IntStatus); }