Subject: kern/20777: can't map memory 64bit PCI device on 32bit system
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nakagawa@bu.jp.nec.com>
List: netbsd-bugs
Date: 03/17/2003 18:56:25
>Number:         20777
>Category:       kern
>Synopsis:       can't map memory 64bit PCI device on 32bit system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 17 18:57:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     NAKAGAWA Yoshihisa
>Release:        1.6 RELEASE and 1.6P
>Organization:
NEC, Japan
>Environment:
>Description:
Broadcom BCM5690 is 64bit PCI device, but only bits[39:0] of the 64bit address decode. So, in pci_mem_find():pci_map.c, "mask1" become 0x000000ff.
>How-To-Repeat:
use not 64bit-full-decode PCI device. ex) BCM5690
>Fix:
use this pach:

--- pci_map.c.org	Tue Mar 18 11:40:43 2003
+++ pci_map.c	Tue Mar 18 11:41:24 2003
@@ -184,7 +184,7 @@
 		 * bus_addr_t is 64-bit, then so is bus_size_t.
 		 */
 		if (sizeof(u_int64_t) > sizeof(bus_addr_t) &&
-		    (address1 != 0 || mask1 != 0xffffffff)) {
+		    address1 != 0) {
 			printf("pci_mem_find: 64-bit memory map which is "
 			    "inaccessible on a 32-bit platform\n");
 			return (1);

>Release-Note:
>Audit-Trail:
>Unformatted: