Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Jan 2004 03:34:44 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        dfr@nlsystems.com
Cc:        freebsd-arch@freebsd.org
Subject:   Re: IRQ 2 problem
Message-ID:  <20040101.033444.103565788.imp@bsdimp.com>
In-Reply-To: <1072952198.3233.24.camel@herring.nlsystems.com>
References:  <XFMail.20031231141216.jhb@FreeBSD.org> <20031231.132536.38326387.imp@bsdimp.com> <1072952198.3233.24.camel@herring.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1072952198.3233.24.camel@herring.nlsystems.com>
            Doug Rabson <dfr@nlsystems.com> writes:
: On Wed, 2003-12-31 at 20:25, M. Warner Losh wrote:
: > In message: <XFMail.20031231141216.jhb@FreeBSD.org>
: >             John Baldwin <jhb@FreeBSD.org> writes:
: > : 
: > : On 31-Dec-2003 Rostislav Krasny wrote:
: > : > --- "M. Warner Losh" <imp@bsdimp.com> wrote:
: > : >> In message: <20031230.190927.108191769.imp@bsdimp.com>
: > : >>             "M. Warner Losh" <imp@bsdimp.com> writes:
: > : >> : The reason that it iasn't been committed is because it is
: > : >> incorrect.
: > : >> : 
: > : >> :
: > : >>
: > : > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=15473+0+archive/2003/freebsd-arch/20030831.freebsd-ar
: > : > ch
: > : >> : 
: > : >> : has the particulars.
: > : >> 
: > : >> Does your machine have an APIC?  My laptop doesn't seem to exhibit
: > : >> the problem.
: > : > 
: > : > No, it doesn't seem to have an APIC. This is Pentium MMX 200MHz machine
: > : > based on Intel's 430TX chipset.
: > : > 
: > : > What is the correct way to fix this IRQ 2 problem? I can help to test it.
: > : 
: > : IRQ 2 in FreeBSD is spelled IRQ 9.  If a PNP device wants to use IRQ 2, it
: > : can be set to IRQ 2 in hardware, but it must use IRQ 9 when doing the
: > : bus_alloc_resource() and bus_setup_intr().
: > 
: > Actually the problem appears to be that the hardware wants 9 too.  '2'
: > shouldn't be used at all, nor given out in allocation when we're using
: > AT PIC because that's the chaining IRQ.  That's the current problem.
: > Eg, the isa bus is handing out '2' when it has no buisness doing so.
: 
: The original fix for this which has been lost over the years was to
: exclude IRQ2 from the set of available interrupts. When the PnP code
: attempted to allocate an irq for the device, it would try for 2, not get
: it and settle for 9.
: 
: At some point, IRQ2 was added back into the set but the PIC driver was
: fixed to allocate IRQ2 itself as early as possible. This matches the way
: the hardware is wired together and has a certain 'rightness' to it.
: Unfortunately the PIC driver doesn't seem to allocate IRQ2 for itself
: any more which makes it available for broken PnP devices.

It looks like IRQ2 isn't registered as an interrupt source, so when we
create the resource map, it looks like we skip it and shouldn't be
handing it out...

Warner



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