Skip to content

acpi: wire and expose the SCI pin - #1230

Open
lgfa29 wants to merge 5 commits into
masterfrom
luiz/sci-or-gate
Open

lgfa29 wants to merge 5 commits into
masterfrom
luiz/sci-or-gate

Conversation

@lgfa29

@lgfa29 lgfa29 commented Oct 16, 2026

Copy link
Copy Markdown
Member

According to the ACPI spec., the SCI pin is driven by multiple inputs that are OR'ed to determine if the guest should receive an interrupt1.

Introduce OrGate, a new component that can front an Arc<dyn IntrPin> as output and and expose multiple inputs. The output pin state is driven by the OR value of the inputs.

The new sci_pin() method of Piix3Lpc creates and returns a new input to the OR gate fronting the SCI pin.

Footnotes

  1. https://uefi.org/specs/ACPI/6.6/04_ACPI_Hardware_Specification.html#example-event-structure-for-a-legacyacpi-compatible-event-model ↩

According to the ACPI spec., the SCI pin is driven by multiple inputs
that are OR'ed to determine if the guest should receive an
interrupt[^1].

Introduce `OrGate`, a new component that can front an `Arc<dyn IntrPin>`
as output and and expose multiple inputs. The output pin state is driven
by the OR value of the inputs.

The new `sci_pin()` method of `Piix3Lpc` creates and returns a new input
to the OR gate fronting the SCI pin.

[^1]: https://uefi.org/specs/ACPI/6.6/04_ACPI_Hardware_Specification.html#example-event-structure-for-a-legacyacpi-compatible-event-model
@lgfa29
lgfa29 requested review from iximeow and lifning October 16, 2026 22:26
When working on more ACPI features, I realized that it would make more
sense for an Acpi struct to own the SCI OrGate.

The Acpi struct will hold and manage ACPI registers, so it should the
one controlling inputs to the SCI gate.
Comment on lines -106 to -108
#[allow(unused)]
// XXX: wire up SCI notifications
sci_pin: Arc<LNKPin>,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I was working on the ACPI GPE registers I realized that it would make more sense to move the SCI pin and OrGate to an ACPI-related struct. This struct is going to hold ACPI state, so I think it makes sense that it also controls who connects to the SCI pin.

The struct is not being used in this PR, but here's a preview of how it will look like: c9fd6b7. Other components that an input to the SCI can call acpi.sci_pin().

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third time's the charm I guess 😅

After making more progress on the GPE implementation I realized that 08b005c is a much better way to wire the SCI. It's now completely out of the chipset (apart from wiring it to an IRQ pin) and lives entirely within the ACPI scope.

Comment thread lib/propolis/src/intr_pins.rs Resolved
The SCI is an ACPI concept and is just wired to a pin the chipset. This
new code organization removes he SCI entirely from the chipset apart
from creating the pin from an IRQ pin. The SCI pin itself is now fully
owned by the `Acpi` component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants