[Libre-soc-bugs] [Bug 407] XICS interrupt controller is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jul 28 18:10:29 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=407

--- Comment #9 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #8)

> this again is the virtualisation of interrupts, not the actual interrupts. 
> cinsequently whilst the same registers appear (CPRR, PIPR) there's nothing
> about those.
> 
> my feeling is that the spec has never been released: the qemu XICS code for
> example is written *by* someone at IBM who had internal access to it.

Oy gevalt! Such a headache, although I think Jacob may have found what we are
looking for:... will edit with reference to mailing list archives once they are
up-to-date enough to include jacob's mail.

```
from: Jacob Lifshay <programmerjake at gmail.com>
to: Libre-RISCV General Development <libre-riscv-dev at lists.libre-riscv.org>
date: Jul 28, 2020, 9:51 AM PDT
subject: Re: [libre-riscv-dev] how do we test external interrupts?

I found what looks like the reference source:
in
https://github.com/torvalds/linux/blob/ab02b61f24c76b1659086fcc8b00cbeeb6e95ac7/Documentation/virt/kvm/devices/xics.rst
> This device emulates the XICS (eXternal Interrupt Controller
Specification) defined in PAPR.

https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference

https://github.com/OpenPOWERFoundation/Linux-Architecture-Reference

Jacob
```

I think this is the key part:

https://github.com/OpenPOWERFoundation/Linux-Architecture-Reference/blob/master/LoPAR/ch_interrupt_controller.xml
PowerPC External Interrupt Architecture:
```
<chapter  xmlns="http://docbook.org/ns/docbook"
          xmlns:xl="http://www.w3.org/1999/xlink"
          xml:id="dbdoclet.50569331_37856"
          version="5.0"
          xml:lang="en">
  <title>Interrupt Controller</title>

  <para>This chapter specifies the requirements for the LoPAR interrupt
  controller. Platforms may chose to virtualize the interrupt controller or to
  provide the PowerPC External Interrupt option. </para>

  <section>
    <title>Interrupt Controller Virtualization</title>
    <para>Virtualization of the interrupt controller is done through the
    Interrupt Support hcalls. See <xref
linkend="dbdoclet.50569344_26787"/>.</para>
  </section>

  <section xml:id="dbdoclet.50569331_29157">
    <title>PowerPC External Interrupt Option</title>
    <para>The PowerPC External Interrupt option is based upon a subset of the
    PowerPC External Interrupt Architecture. The PowerPC External Interrupt
    Architecture contains a register-level architectural definition of an
interrupt
    control structure. This architecture defines means for assigning properties
    such as priority, destination, etc., to I/O and interprocessor interrupts,
as
    well as an interface for presenting them to processors. It supports both
    specific and distributed methods for interrupt delivery. See also
    <!-- FIXME: xref linkend="error_section"/--><citetitle>A PowerPC External
    Interrupt</citetitle>.htm#38341.--></para>
    <para>In NUMA platform configurations, the interrupt controllers may be
    configured in disjoint domains. The firmware makes the server numbers
visible
    to any single OS image appear to come from a single space without
duplication.
    This may be done by appropriately initializing the interrupt presentation
    controllers or the firmware may translate the server numbers presented to
it in
    RTAS calls before entering them into the interrupt controller registers.
The OS
    is made aware that certain interrupts are only served by certain servers by
the
    inclusion of the <emphasis
role="bold"><literal>&#x201C;ibm,interrupt-domain&#x201D;</literal></emphasis>
    property in the interrupt controller nodes.</para>

    <section xml:id="sec_ext_int_opt_req">
      <title>PowerPC External Interrupt Option Requirements</title>
      <para>The following are the requirements for the PowerPC External
      Interrupt option. Additional requirements and information relative to the
MSI
      option, when implemented with this option, are listed in <xref
      linkend="dbdoclet.50569331_33067"/>.</para>
```

I'll upload just this 'chapter' (only 750 lines of text) to the wiki?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list