Ignore:
Timestamp:
2019-06-09T11:31:38Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c48de91
Parents:
b401b33
Message:

Introduce PIC operations indirection mechanism

Some architectures switch from one interrupt controller implementation
to another during runtime. By providing a cleaner indirection mechanism,
it is possible e.g. for the ia32 IRQ 7 handler to distinguish i8259
spurious interrupts from actual IRQ 7 device interrupts, even when the
i8259 interrupt controller is no longer active.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mach/malta/malta.c

    rb401b33 r2a103b5  
    7575{
    7676        uint8_t isa_irq = host2uint32_t_le(pio_read_32(GT64120_PCI0_INTACK));
    77         if (pic_is_spurious(isa_irq)) {
    78                 pic_handle_spurious(isa_irq);
     77        if (i8259_is_spurious(isa_irq)) {
     78                i8259_handle_spurious(isa_irq);
    7979#ifdef CONFIG_DEBUG
    8080                log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt %u",
     
    9393#endif
    9494        }
    95         pic_eoi(isa_irq);
     95        i8259_eoi(isa_irq);
    9696}
    9797
     
    146146                        indev_t *srln = srln_wire(srln_instance, sink);
    147147                        ns16550_wire(tty_instance, srln);
    148                         pic_enable_irqs(1 << TTY_ISA_IRQ);
     148                        i8259_enable_irqs(1 << TTY_ISA_IRQ);
    149149                }
    150150        }
Note: See TracChangeset for help on using the changeset viewer.