Date: Mon, 14 Feb 2000 21:12:30 +0300 (MSK) From: nms@Brigada-A.Ethereal.RU To: FreeBSD-gnats-submit@freebsd.org Subject: kern/16712: PNP memory range size calculated wrong Message-ID: <20000214181230.506D31D6@Brigada-A.Ethereal.RU>
next in thread | raw e-mail | index | archive | help
>Number: 16712
>Category: kern
>Synopsis: ISA PNP memory range size calculated wrong
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 14 10:20:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Nikolai Saoukh
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:
FreeBSD Manor 4.0-CURRENT FreeBSD 4.0-CURRENT #8: Mon Feb 14 12:59:41 MSK 2000 nms@Manor:/usr/src/sys/compile/MANOR i386
>Description:
File src/sys/isa/pnpparse.c (version 1.2), lines 270-271, 286-287
treat memory range size as byte size, while it is expressed in
256 byte chucks.
>How-To-Repeat:
Any PNP card with io memory should reveal this bug.
>Fix:
--- pnpparse.c Fri Oct 15 01:03:01 1999
+++ pnpparse.c.new Thu Feb 10 12:42:14 2000
@@ -262,4 +262,6 @@
case PNP_TAG_MEMORY_RANGE:
if (bootverbose) {
+ int temp = I16(resinfo + 7) << 8;
+
printf("%s: adding memory range "
"%#x-%#x, size=%#x, "
@@ -267,7 +269,6 @@
pnp_eisaformat(id),
I16(resinfo + 1)<<8,
- (I16(resinfo + 3)<<8)
- + I16(resinfo + 7) - 1,
- I16(resinfo + 7),
+ (I16(resinfo + 3)<<8) + temp - 1,
+ temp,
I16(resinfo + 5));
}
@@ -283,7 +284,7 @@
config->ic_mem[config->ic_nmem].ir_end =
(I16(resinfo + 3)<<8)
- + I16(resinfo + 7) - 1;
+ + (I16(resinfo + 7) << 8) - 1;
config->ic_mem[config->ic_nmem].ir_size =
- I16(resinfo + 7);
+ I16(resinfo + 7) << 8;
config->ic_mem[config->ic_nmem].ir_align =
I16(resinfo + 5);
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000214181230.506D31D6>
