From owner-freebsd-hackers Sun Sep 17 12:41:44 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tkc.att.ne.jp (tkc.att.ne.jp [165.76.16.7]) by hub.freebsd.org (Postfix) with ESMTP id 22DDC37B424 for ; Sun, 17 Sep 2000 12:41:40 -0700 (PDT) Received: from work.mzaki.nom (26.pool9.ipctokyo.att.ne.jp [165.76.205.26]) by tkc.att.ne.jp (8.8.8+Spin/3.6W-CONS(10/24/99)) id EAA18096; Mon, 18 Sep 2000 04:41:38 +0900 (JST) Date: Mon, 18 Sep 2000 04:41:37 +0900 Message-ID: <86em2ihklq.wl@tkc.att.ne.jp> From: Motomichi Matsuzaki To: hackers@FreeBSD.ORG Subject: PnP resource programming X-Mailer: Wanderlust/2.2.12 (Joyride) XEmacs/21.1 (Bryce Canyon) MIME-Version: 1.0 (generated by WEMI 1.13.7 - "Shimada") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG (Note: Initially pointed out by Hirokazu WATANABE ) PnP resource programming goes in pnp_set_config() in sys/isa/pnp.c: /* program memory resource registers */ for (i = 0; i < config->ic_nmem; i++) { pnp_write(PNP_MEM_...(i), ...); : : } /* zero'ing unused registers */ for (; i < ISA_NMEM; i++) { pnp_write(PNP_MEM_...(i), 0); : : } According to ISA PnP specifications, maximum number of memory resource set is 4 and there is only 4 sets of registers for memory resource programming. But ISA_NMEM is defined to 8 in sys/isa/isavar.h, and this code causes unexpected I/O writing. The same mistakes happen about port resources. There is only 8 sets of registers for port resource programming, but kernel writes into 50 sets of registers during PnP resource programming. I suggest that we should newly define ISA_PNP_NMEM and ISA_PNP_NPORT as 4 and 8 respectively, and use them as a substitute for ISA_NMEM and ISA_NPORT in above case. -- Motomichi Matsuzaki Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message