interruptfirmwareuefiacpi

How to tell what kind of event a SCI represents?


I am trying to understand the ACPI event programming model.

According to the ACPI 6.5 spec, SCI (System Control Interrupt) will be raised for two kinds of events: fixed event and general-purpose event.

Below are some quote from the ACPI 6.5 spec Section 5.6.1 Table 5.185.

PM1x_STS bits raise fixed ACPI events. While a PM1x_STS bit is set, if the matching PM1x_EN bit is set, the ACPI SCI event is raised.

GPEx_STS bits raise general-purpose events. While a GPEx_STS bit is set, if the matching GPEx_EN bit is set, then the general-purpose SCI event is raised.

My question is,

When a SCI is received by the OSPM (a subsystem of the OS for power management and platform configuration), how could OSPM know which kind of event the SCI represents?

I think this question is important because it will affects how the OSPM decides how to handle the event. For fixed event, it will handle by itself. For general-purpose event, it may call some ASL control method. Unfortunately, it seems the ACPI spec mentions nothing about it.

ADD 1

Let me put my question another way:

When OSPM sees a SCI, it can check the PM1x_STS register or the GPEx_STS register to see what triggered the SCI. But how could the OSPM know which register to check? Or does it check both?

Thanks.


Solution

  • The answer to your ADD 1 is that it has to read both. That's true with any piece of hardware that has multiple interrupt sources -- it is the responsibility of the interrupt handler to determine the exact cause of the interrupt.