[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

386 IRQ handling question



>>>>> "erik" == erik ivanenko <erik.ivanenko at utoronto.ca> writes:

erik> In irq.c, there is a function that enables IRQ lines
erik> ( BSP_irq_enable_at_i8259s).

erik> According to the i386ex manual:

erik> "Whenever the 82C59A receives an interrupt request, it sets the
erik> request's pending bit ( regardless of whether the IR signal is masked).
erik> The pending bit remains set until the interrupt is serviced or you read
erik> the interrupt request register.  Therefore, before unmasking an IR
erik> signal, read the interrupt request register to clear pending
erik> interrupts."

erik> In this light, should the BSP_irq_enable_at_i8259s() be modified to read
erik> the IRR before unmasking the interrupt?

No it is already done in the low level assembly level in cpu_asm.s.
Maybe for the reset problem, you ccould add the line you want to read 
pending IR at boot time.

NB : I never have seen such code in BSP_irq_enable_at_i8259s() in either 
Linux, Chorus or other system.


-- eric