interrupts on AMD hardware

Nobody III hungryninja101 at ...9...
Mon Apr 9 10:03:16 CEST 2018


I've been trying to figure out how to implement a simple solution to this.
Where can I implement this? Is it safe to implement it in its own component
that executes before usb_drv, ahci_drv, or any other driver starts? Using
the sequence component should prevent any race conditions.

Eventually, should the solution be added to acpi_drv? Or should it be its
own separate component?

I'd like to begin by writing a simple component that uses ACPICA to call
the _PIC method. This seems like an easy and reliable way to get the APIC
setup properly. Would this work?

After getting a basic solution working, we could work on implementing a
simpler heuristic-based solution to interpret the _PIC method without using
a full-blown AML parser.

In the end, an ACPICA-based fallback solution (in its own component) would
be useful anyway. It may increase the TCB dramatically, but at the very
least it would be helpful for debugging.

On Sun, Apr 8, 2018 at 2:22 AM, Nobody III <hungryninja101 at ...9...> wrote:

> I looked at my DSDT myself, and compared it to the DSDT on my laptop
> (which runs Genode without any problems). The _PRT method is very similar,
> but the _PIC method is very different. I don't fully understand what's
> going on, but it calls a method IRQC(), which sets a bunch of variables
> (PIRA, PIRB, PIRC, PIRD, PIRE, PIRF, PIRG, PIRH, HDAD, GEC, GPP0, GPP1,
> GPP2, GPP3, USB1, USB2, USB3, USB4, USB5, USB6, USB7, IDE, SATA) to 0x1F.
> It also sets Local1 = PD64. After returning from IRQC(), _PIC() sets PICM =
> Arg0.
>
> To better make sense of this, I need to know how Genode currently sets the
> interrupt model (PIC, APIC, or SAPIC). The ACPI specification requires PIC
> mode unless _PIC is called. How does Genode get around that?
>
> On Thu, Apr 5, 2018 at 1:43 AM, Christian Helmuth <
> christian.helmuth at ...1...> wrote:
>
>> Hello Ben,
>>
>> On Wed, Apr 04, 2018 at 01:23:42PM -0600, Nobody III wrote:
>> > Thanks for the analysis. The OSDev wiki says, "The ACPICA code is meant
>> to
>> > be directly integrated into the host OS, as a kernel-resident
>> subsystem."
>> > This suggests that we could likely use acpica without too much trouble.
>>
>> That's perfectly true for traditional monolithic kernels like Linux
>> but should not be taken as given for our approach of a minimal trusted
>> computing base. ACPI comes with significant complexity due to its
>> dependency on AML and therefore an AML interpreter. If there's the
>> slightest chance to keep ACPICA out of the TCB we should invest the
>> effort. A good example is our acpi_drv which implements the ATARE
>> approach [2] to statically parse PCI routing tables.
>>
>> > By the way, could you please give me a quick explanation of the _PIC and
>> > _PRT methods, and how they're stored?
>>
>> Please refer to the ACPI specification [1] sections "5.8.1 _PIC
>> Method" and "6.2.13 _PRT (PCI Routing Table)". Those methods are part
>> of the DSDT table and implemented in ASL/AML.
>>
>> [1] http://www.uefi.org/sites/default/files/resources/ACPI%206_2
>> _A_Sept29.pdf
>> [2] https://os.inf.tu-dresden.de/papers_ps/tr-atare-2009.pdf
>>
>> Regards
>> --
>> Christian Helmuth
>> Genode Labs
>>
>> https://www.genode-labs.com/ · https://genode.org/
>> https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
>>
>> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
>> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> genode-main mailing list
>> genode-main at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/genode-main
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20180409/990e417b/attachment.html>


More information about the users mailing list