From bms@spc.org  Fri Sep 13 08:39:45 2002
Return-Path: <bms@spc.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7848237B400
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <bms@spc.org>
Reply-To: Bruce M Simpson <bms@spc.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pccard misreports allocated memory range
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         42745
>Category:       i386
>Synopsis:       pccard misreports allocated memory range
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 13 08:42:49 PDT 2002
>Closed-Date:    Fri Sep 13 10:26:05 MDT 2002
>Last-Modified:  Fri Sep 13 10:26:05 MDT 2002
>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:
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Fri Sep 13 10:25:46 MDT 2002 
State-Changed-Why:  
Fixed to print things better in boot verbose. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42745 
>Unformatted:
