(Note: Initially pointed out by Hirokazu WATANABE <[EMAIL PROTECTED]>)
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 <[EMAIL PROTECTED]>
Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message