On 04/10/2025 10:00, Damien Zammit wrote:
-------- Original Message --------
On 4/10/25 3:43 pm, Michael Kelly <[email protected]> wrote:
There are 2 overrides showing but nothing related to 10 or 11:
Int override bus=0 src=0 GSI=00000002 Flags=0000
Int override bus=0 src=9 GSI=00000009 Flags=000d
I'm guessing pin 10 or 11 are dynamically set by ACPI for the ahci device
rather than statically assigned by the mainboard layout. (But you could check
this in acpi_init.c)
They aren't statically assigned. The _CRS and _PRS entries all have an
'entry->source[0]' (see acpi_get_irq_number()).
It could be that PRS has a set of irqs and one is chosen and configured with
SRS method. Its not impossible that both 10 and 11 are allowed values and ACPI
configures one if I understand correctly. If this mechanism is not working we
could have a bug in acpi_init.c in libacpica. You could add more debug prints
in there and see what you find.
Based on research (this PCI detail is admittedly new to me), I've seen
it described (https://f.osdev.org/viewtopic.php?t=29558) that to
identify the interrupt that is actually assigned to the device, it is
necessary to make a mapping between the device's interrupt pin
(discovered by PCI enumeration) and the possibilities listed within the
ACPI tables. In other words, one needs to identify whether INTA, INTB,
INTC or INTD is is the pin in use with pci device bus:dev:fun. Then
filter the entries in the _PRT to those matching the same pin. ie replace:
if ((prt_dev == dev) && (prt_func == 0xffff))
with
if ((prt_dev == dev) && (prt_func == 0xffff) && entry->pin ==
pci_dev_pin)
The above strategy would return the correct 11 IRQ in my case. I'd like
to have coded this suggestion to make clear what I'm describing but I'm
still puzzling over the best method of reading the PCI configuration
space header to determine pci_dev_pin in the code fragment. I don't want
to waste my time if I'm horribly wrong. I've seen that on my machine,
Linux lspci -vvv shows INTB used. There are _PRS mappings that refer to
IRQ 10 in INTA which would be selected first by the existing code.
Please have patience if I'm talking rubbish......
Cheers,
Mike.