Date: Mon, 18 Sep 2000 04:41:37 +0900 From: Motomichi Matsuzaki <mzaki@e-mail.ne.jp> To: hackers@FreeBSD.ORG Subject: PnP resource programming Message-ID: <86em2ihklq.wl@tkc.att.ne.jp>
next in thread | raw e-mail | index | archive | help
(Note: Initially pointed out by Hirokazu WATANABE <gwna@geocities.co.jp>)
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 <mzaki@e-mail.ne.jp>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86em2ihklq.wl>
