From owner-freebsd-bugs Mon Feb 14 10:19:47 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by builder.freebsd.org (Postfix) with ESMTP id AE56D4ADA for ; Mon, 14 Feb 2000 10:19:43 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id KAA99665; Mon, 14 Feb 2000 10:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from Brigada-A.Ethereal.RU (Brigada-A.ethereal.ru [195.230.65.30]) by builder.freebsd.org (Postfix) with ESMTP id C1AC84A23 for ; Mon, 14 Feb 2000 10:12:29 -0800 (PST) Received: by Brigada-A.Ethereal.RU (Postfix, from userid 1002) id 506D31D6; Mon, 14 Feb 2000 21:12:30 +0300 (MSK) Message-Id: <20000214181230.506D31D6@Brigada-A.Ethereal.RU> Date: Mon, 14 Feb 2000 21:12:30 +0300 (MSK) From: nms@Brigada-A.Ethereal.RU Reply-To: nms@Brigada-A.Ethereal.RU To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/16712: PNP memory range size calculated wrong Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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