Subject: !console on Sun 4
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: port-sparc
Date: 10/08/2002 22:53:05
Put a 1.6G kernel on my 4/330.  The console keyboard doesn't get attached
as console.  Can't type anything.  Looking at src/sys/arch/sparc/dev/zs.c :

  		zsc->zsc_promunit =
			(paddr == 0xf1000000) ? 0 :
			(paddr == 0xf0000000) ? 1 :
			(paddr == 0xe0000000) ? 2 : -2;

but paddr is a bus_addr_t (u_int64_t) and contains the iospace in the top
32 bits, so contains 0x1f1000000, etc.

Is this the correct fix (it makes things work) :

--- zs.c.dist	Sun Aug 25 11:04:43 2002
+++ zs.c	Tue Oct  8 22:47:29 2002
@@ -368,6 +368,8 @@
 			 * sake of the comparison here.
 			 */
 			paddr |= 0xf0000000;
+		/* We're just comparing the address (not the iospace) here */
+		paddr = BUS_ADDR_PADDR(paddr);
 		zsc->zsc_promunit =
 			(paddr == 0xf1000000) ? 0 :
 			(paddr == 0xf0000000) ? 1 :

Thanks,

J

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/