Repository navigation
Conversation
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
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.
| #[allow(unused)] | ||
| // XXX: wire up SCI notifications | ||
| sci_pin: Arc<LNKPin>, |
There was a problem hiding this comment.
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().
There was a problem hiding this comment.
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.
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.
a558417 to
08b005c
Compare
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 anArc<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 ofPiix3Lpccreates and returns a new input to the OR gate fronting the SCI pin.Footnotes
https://uefi.org/specs/ACPI/6.6/04_ACPI_Hardware_Specification.html#example-event-structure-for-a-legacyacpi-compatible-event-model ↩