Interrupt Mechanisms on non-x86 Architectures

This is a situation where I need the help of you OSnews readers who are experienced with low-level development on ARM, SPARC, PowerPC, MIPS, and other hardware architectures we have on computers nowadays. The issue is that I’m currently designing the part of my hobby kernel which takes care of interrupts. Although I mostly work on x86 at the moment, I’d like to keep this code portable to other hardware architectures in the future. To do that, I have to know how interrupt handling works on as much HW architectures as possible.

What I’m interested in is every process which OS developers have control on and/or must take into account between the moment where some piece of hardware connected to the computer’s motherboard emits an interrupt signal and the moment where the CPU is done switching to the interrupt handling code. As an example, on x86, the legacy PIC would fit in that category, and the interrupt/exception vector mechanism would also fit.

If there’s no standard way to do something, please mention the way(s) it’s *usually* done.

The interrupt handling model which I’m currently checking for portability is:

  • Hardware emits an interrupt signal

  • On its way, the signal optionally encounters one or more PICs which either stop it or direct it to one of the CPU’s interrupt pins (this means that PIC drivers are necessary on architectures which have one, but that they may be written separately)

  • The CPU reacts to the signal on its interrupt pin by fetching a “vector”, noticeable containing the memory address of the interrupt handler associated to that pin, doing some arch-specific tricks, and executing code at said address

Thanks in advance for your answers !

40 Comments

  1. 2011-02-27 2:54 pm
    • 2011-02-27 3:15 pm
      • 2011-02-27 10:14 pm
        • 2011-02-27 10:26 pm
          • 2011-02-27 10:57 pm
          • 2011-02-28 8:06 am
          • 2011-02-28 11:15 am
  2. 2011-02-27 3:49 pm
    • 2011-02-27 3:52 pm
    • 2011-03-01 9:15 am
  3. 2011-02-27 3:56 pm
    • 2011-02-27 4:03 pm
      • 2011-02-28 6:34 am
    • 2011-02-27 5:22 pm
      • 2011-02-27 6:07 pm
        • 2011-02-28 3:21 pm
      • 2011-02-28 5:44 am
      • 2011-02-28 7:06 am
  4. 2011-02-27 7:52 pm
    • 2011-02-27 8:01 pm
      • 2011-02-28 7:12 pm
  5. 2011-02-28 5:45 am
  6. 2011-02-28 7:59 am
    • 2011-02-28 8:22 am
    • 2011-02-28 9:32 am
  7. 2011-02-28 9:31 am
    • 2011-02-28 11:11 am
      • 2011-02-28 11:11 pm
        • 2011-03-01 6:36 am
  8. 2011-02-28 11:41 am
  9. 2011-02-28 1:47 pm
    • 2011-02-28 7:21 pm
      • 2011-03-01 10:31 am
        • 2011-03-01 10:52 pm
          • 2011-03-02 12:33 am
    • 2011-03-01 8:38 am
  10. 2011-02-28 3:40 pm
    • 2011-03-01 7:36 am
  11. 2011-03-01 7:36 am
  12. 2011-03-01 10:25 am