In Linux the event management driver allows an agent driver to register handlers for the platform management events. These events can be power management events such as suspend callback, zero users, device state change, or any error event.
When an agent driver registers for the specific event, the event manager registers those
events with the firmware. When any of these registered events occurs, the firmware
notifies the ATF through the IPI. The ATF informs the Linux event manager driver through
the SGI. During the event manager driver initialization, it informs the ATF about which
SGI to use for the communication though the PM IOCTL EEMI API
.
When the event manager driver gets the SGI interrupt, it reads callback data to know which event has occurred and then calls the respective agent driver handler based on the event. The agent driver can unregister for the event when it does not need the event for which handler was previously registered, to be notified.