Subject: kern/3290: panic in if_fea driver
To: None <gnats-bugs@gnats.netbsd.org>
From: Azuma OKAMOTO <lfo@sayori.dais.is.tohoku.ac.jp>
List: netbsd-bugs
Date: 03/05/1997 14:26:51
>Number:         3290
>Category:       kern
>Synopsis:       panic in if_fea driver
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar  4 21:35:00 1997
>Last-Modified:
>Originator:     Azuma OKAMOTO
>Organization:
	Tohoku University
>Release:        Mar 1, 1997
>Environment:
	PC with DEC DEFEA-UA, NetBSD/i386

System: NetBSD sayori3.dais.is.tohoku.ac.jp 1.2C NetBSD 1.2C (SAYORI_486) #1: Wed Mar 5 11:56:51 JST 1997 lfo@sayori3.dais.is.tohoku.ac.jp:/usr/src/sys/arch/i386/compile/SAYORI_486 i386


>Description:
	: fea0 at eisa0 slot 3
	: extent_alloc_region: extent `ioport' (0x0 - 0xffff)
	: extent_alloc_region: start 0xd0000, end 0xd03ff
	: panic: extent_alloc_region: region lies outside extent

	if_fea driver mistakes mem space for i/o space, because
	sc->sc_csrtag (in if_fea.c/pdq_eisa_attach()) is not initialized,
	and treated as I386_BUS_SPACE_IO (is 0).

>How-To-Repeat:
	Install DEC DEFEA and just boot.
>Fix:

--- sys/dev/eisa/if_fea.c.ORIG	Thu Feb 13 21:19:27 1997
+++ sys/dev/eisa/if_fea.c	Wed Mar  5 13:48:21 1997
@@ -497,6 +497,8 @@
     sc->sc_csrtag = sc->sc_iotag;
     sc->sc_csrhandle = sc->sc_iobase;
 #else
+    sc->sc_csrtag = ea->ea_memt;
+
     if (maddr == 0 || msize == 0) {
 	printf("\n%s: error: memory not enabled! ECU reconfiguration required\n",
 	    sc->sc_dev.dv_xname);
>Audit-Trail:
>Unformatted: