Bugs in the PPC/shared interrupt code + dec21140

Till Straumann strauman at SLAC.Stanford.EDU
Fri Feb 21 20:21:53 UTC 2003


Eric,

it seems that you didn't really use priorities that much
(on the shared/PPC BSP) ;-)

  - The generic openpic_init() routine sets all priorities
    to 8

  - irq management installer calls openpic_set_priority()
    which actually sets the TASK PRIORITY of a CPU, not
    the priority of a interrupt line.
    If openpic_init() had actually set the priorities to
    the correct ones (passed in the configuration), the
    effect of openpic_set_priority() would even be fatal
    (effectively disabling interrupts for the CPU)

  --> I'll try to fix this (PR#360)

  - one more interesting quirk: The dec21140 driver reads
    the PCI_INTERRUPT_LINE from PCI config space. It actually
    misses to add the BSP_PCI_IRQ_LOWEST_OFFSET to that number
    before connecting the interrupt handler.
    So, why does it work in spite of that?
      a) The MVME2306 (for sake of backwards compat) actually
         routes some PCI interrupts (ethernet, universe)
         to the ISA PIC AS WELL.
      b) The firmware stores the ISA interrupt number in
         PCI config space

    Hence, the dec21140 PCI driver on MVME23xx actually
    does NOT use the OpenPIC but an ISA interrupt.

  --> fix to this would require the dec21140 driver to
      a) add the correct PIC_IRQ_LOWEST_OFFSET to the
         PCI_INTERRUPT_LINE
      b) bootloader would have to do some fixup on the
         PCI_INTERRUPT_LINE register to replace the
         ISA interrupt lines with the OpenPIC ones.
--> submitted as PR#361

Interesting

-- Till




More information about the users mailing list