Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2002 11:59:55 +0100 (BST)
From:      Bruce M Simpson <bms@spc.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/42745: pccard misreports allocated memory range
Message-ID:  <20020913105955.35B549693@triage.dollah.com>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020913105955.35B549693>