Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2006 14:38:38 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-mobile@freebsd.org
Cc:        "Douglas W. Goodall" <douglas_goodall@mac.com>
Subject:   Re: Stray irq 7's
Message-ID:  <200607261438.39241.jhb@freebsd.org>
In-Reply-To: <000901c6ae96$c03a2000$6dce46c0@dougwide>
References:  <000901c6ae96$c03a2000$6dce46c0@dougwide>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607261438.39241.jhb>