Stray irq 7's

John Baldwin jhb at freebsd.org
Wed Jul 26 18:39:42 UTC 2006


On Sunday 23 July 2006 16:29, Douglas W. Goodall wrote:
> I am a very knowlegeable OS software engineer and I know the stray irq7
> problem intimately.
> 
> The PIC (programable interrupt controller) used in PCs is sensitive and will
> raise an IR7 interrupt without a valid cause. This has been going on since
> S100 systems. We used to call it the vacuum cleaner interrupt because just
> about anything can cause it.
> 
> The only fix for it is to enhance the source code of the interrupt routine
> to accept the interrupt and scrub the PIC.
> 
> The problem is documented in the Intel publications. I have the same problem
> with my Sharp PC-MM20.
> You have two choices.  See if you can ignore the problem, if it doesn't
> occur too often. Or encourage the FreeBSD
> Engineers to add the required code to the interrupt code.  Or do it
> yourself. The PIC is complicated though and
> if you place it in the wrong mode, things will not work correctly.

Sadly the code already does the check (see src/sys/i386/isa/atpic.c):

	/*
	 * If we don't have an event, see if this is a spurious
	 * interrupt.
	 */
	if (isrc->is_event == NULL &&
	    (iframe.if_vec == 7 || iframe.if_vec == 15)) {
		int port, isr;

		/*
		 * Read the ISR register to see if IRQ 7/15 is really
		 * pending.  Reset read register back to IRR when done.
		 */
		port = ((struct atpic *)isrc->is_pic)->at_ioaddr;
		mtx_lock_spin(&icu_lock);
		outb(port, OCW3_SEL | OCW3_RR | OCW3_RIS);
		isr = inb(port);
		outb(port, OCW3_SEL | OCW3_RR);
		mtx_unlock_spin(&icu_lock);
		if ((isr & IRQ_MASK(7)) == 0)
			return;
	}

-- 
John Baldwin


More information about the freebsd-mobile mailing list