Page 2 of 2

Re: Am I detecting PCI interrupt routing correctly?

Posted: Wed Sep 21, 2016 11:44 pm
by MollenOS
Yes, I'm pretty sure you should have recursive mutexes for the ACPICA implementation

Re: Am I detecting PCI interrupt routing correctly?

Posted: Thu Sep 22, 2016 6:46 am
by mariuszp
MollenOS wrote:Yes, I'm pretty sure you should have recursive mutexes for the ACPICA implementation
Ugh, and yet the default implementation (using semaphores) doesn't provide that. Oh well. I already have recursive mutexes, I'll jsut add them to OSL.

Re: Am I detecting PCI interrupt routing correctly?

Posted: Thu Sep 22, 2016 7:26 am
by mariuszp
I implemented recursive mutexes and now it doesn't crash, but it STILL fails to get the IRQ routing table for the PCI root bridge:
14408246_1656183344693459_2069355227_o.jpg
EDIT: According to ACPICA documentation, this "embedded controller" requires a handler supplied by the OS. Could it be that I need such a handler to be able to get the PCI IRQ routing table on this laptop? In this case, are there any directions on how that should be implemented?

Re: Am I detecting PCI interrupt routing correctly?

Posted: Thu Sep 22, 2016 8:12 am
by MollenOS
You still have issues with your Mutex implementation, and you have issues with your region handlers. Do a few things,

1. Ensure the way ACPICA asks you to map memory is done correctly, you CANNOT just redirect to vmem_map and vmem_unmap because of how they usually are implemented vs the way ACPICA expects it to be mapped (maybe you have implemented correct, but make sure). This was my biggest issue with ACPICA to date.
2. Your semaphore or mutex implementation probably is wrong still
3. Check the way ACPICA communicates with your physical ram, io-devices and pci-devices, they need to be correct, that's most likely why you are getting the region error.
4. Update ACPICA to the newest version, I had issues with one verison, which were fixed in a later version.

You need to fix ALL the errors ACPI spits out, otherwise the pci irq routing won't execute anyway. I get zero errors on real hw and virtual machines with my ACPICA, you should be able to too.

Re: Am I detecting PCI interrupt routing correctly?

Posted: Thu Sep 22, 2016 5:30 pm
by mariuszp
Well, according to the error message, I get the region error because there is no handler for the EC region.

And there isn't; and ACPICA does not allow me to set it to ACPI_DEFAULT_HANDLER.

Could it perhaps be that this is required by the laptop?

EDIT: Also, the mutex errors disappeared after updating ACPICA.