From owner-freebsd-bugs Fri Sep 13 8:46:54 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBB7137B41A for ; Fri, 13 Sep 2002 08:46:47 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1257543E3B for ; Fri, 13 Sep 2002 08:46:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g8DFiUJU034308 for ; Fri, 13 Sep 2002 08:44:30 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g8DFiULm034307; Fri, 13 Sep 2002 08:44:30 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7848237B400 for ; Fri, 13 Sep 2002 08:39:45 -0700 (PDT) Received: from bigboy.spc.org (dolly.good1.com [195.206.69.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id A69C243E3B for ; Fri, 13 Sep 2002 08:39:44 -0700 (PDT) (envelope-from bms@spc.org) Message-Id: <20020913105955.35B549693@triage.dollah.com> Date: Fri, 13 Sep 2002 11:59:55 +0100 (BST) From: Bruce M Simpson Reply-To: Bruce M Simpson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: i386/42745: pccard misreports allocated memory range Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 42745 >Category: i386 >Synopsis: pccard misreports allocated memory range >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 13 08:42:49 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Bruce M Simpson >Release: FreeBSD 4.6-STABLE i386 >Organization: >Environment: System: FreeBSD triage.dollah.com 4.6-STABLE FreeBSD 4.6-STABLE #4: Sat Sep 7 13:55:56 BST 2002 root@:/usr/src/sys/compile/TRIAGE i386 >Description: Under -STABLE, OLDCARD reports memory ranges incorrectly; when no memory window has been allocated for a card, it reports the range as 0x0-0xFFFFFFFF. >How-To-Repeat: >Fix: The patch below fixes this problem, by simply printing the base address that would be used in real mode if a window had been allocated, until such time as the window *is* allocated. --- pccard-mem-range-printf.patch begins here --- --- pccard.orig/pccard.c Wed Jul 31 21:01:11 2002 +++ pccard/pccard.c Sun Sep 8 00:19:25 2002 @@ -244,7 +244,8 @@ "Assigning %s: io 0x%x-0x%x irq %d mem 0x%lx-0x%lx\n", device_get_nameunit(child), desc->iobase, desc->iobase + desc->iosize - 1, - irq, desc->mem, desc->mem + desc->memsize - 1); + irq, desc->mem, ((desc->memsize == 0) ? desc->mem : + (desc->mem + desc->memsize - 1))); } err = bus_set_resource(child, SYS_RES_IOPORT, 0, desc->iobase, desc->iosize); --- pccard-mem-range-printf.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message