NetBSD Problem Report #20556

Received: (qmail 7363 invoked by uid 605); 3 Mar 2003 02:20:48 -0000
Message-Id: <20030303022046.07D1D5DC6@home.mewburn.net>
Date: Mon,  3 Mar 2003 13:20:46 +1100 (EST)
From: lukem@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: lukem@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
X-Send-Pr-Version: 3.95

>Number:         20556
>Category:       port-sparc
>Synopsis:       sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 03 02:21:00 +0000 2003
>Closed-Date:    Mon May 18 03:42:33 +0000 2009
>Last-Modified:  Mon May 18 03:42:33 +0000 2009
>Originator:     Luke Mewburn
>Release:        NetBSD 20030303
>Organization:
>Environment:
System: NetBSD cerberus.mewburn.net 1.6N NetBSD 1.6N (CERBERUS from GENERIC32-$Revision: 1.56 $) #1: Sun Feb 16 21:04:57 EST 2003 lukem@argo.mewburn.net:/var/scratch/obj.sparc/z/src/netbsd/src-clean/sys/arch/sparc/compile/CERBERUS sparc64
Architecture: sparc
Machine: sparc64

>Description:
	I'm building a sparc release on my Ultra 5 (which runs a
	variant of the GENERIC32 kernel) with:
		build.sh -m sparc64 -a sparc ...
	(I.e, 32 bit userland).

	The boot blocks in sys/arch/sparc/stand fail to build on lines
	such as:
		paddr_t foo;
		printf("%lx", foo);
	with errors such as:
		warning: long unsigned int format, different type arg (arg 2)

	The `obvious' fix of casting foo to (u_long) appeases the
	compiler in boot/boot.c and common/mmu.c, but then we
	hit a problem in sys/lib/libsa/loadfile_aout.c with:
		warning: cast to pointer from integer of different size
	(lines 136, 140, 151, (etc)), at which point I punted until
	receiving further advice...

	This looks like it's related to the code in
	sys/arch/sparc/include/types.h which seems to effectively do:
		#if defined(SUN4U) && !defined(__arch64__)
		typedef unsigned long long int paddr_t
		#else
		typedef unsigned long int paddr_t
		#endif


>How-To-Repeat:
	(see above)

>Fix:
	NFI; my sparc foo isn't that good.  It appears that this may
	one of the issues associated with having sys/arch/sparc
	containing MACHINE dependent as well as MACHINE_ARCH dependent code.
>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@duskware.de>
To: lukem@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-sparc/20556: sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
Date: Mon, 3 Mar 2003 08:09:23 +0100

 On Mon, Mar 03, 2003 at 01:20:46PM +1100, lukem@netbsd.org wrote:
 > 		paddr_t foo;
 > 		printf("%lx", foo);

 Yes, paddr_t stays 64 bit, even if compiling a ultra sparc 32bit kernel.
 Can't you just use PRIui64 as a format in these places?

 This hasn't been hit before since all people I know running 32bit sparc64 
 systems cross compile a sparc release from i386 ;-)

 Martin

From: Luke Mewburn <lukem@netbsd.org>
To: Martin Husemann <martin@duskware.de>
Cc: lukem@netbsd.org, gnats-bugs@gnats.netbsd.org
Subject: Re: port-sparc/20556: sparc boot blocks not building for MACHINE==sparc64,MACHINE_ARCH==sparc
Date: Tue, 4 Mar 2003 13:16:07 +1100

 On Mon, Mar 03, 2003 at 08:09:23AM +0100, Martin Husemann wrote:
   | On Mon, Mar 03, 2003 at 01:20:46PM +1100, lukem@netbsd.org wrote:
   | > 		paddr_t foo;
   | > 		printf("%lx", foo);
   | 
   | Yes, paddr_t stays 64 bit, even if compiling a ultra sparc 32bit kernel.
   | Can't you just use PRIui64 as a format in these places?

 Probably.  Will that cause size bloat for the sparc32-compiled-by-sparc
 bootblocks?  (I suppose I could just try it and see :)

 BTW: we need a name for "sparc64 systems running sparc32 kernel/userland",
 to differentiate from "sparc64 systems running sparc64 userland".
 Someone (who shall rename nameless until they decide to speak up :)
 suggested "sparc44".


   | This hasn't been hit before since all people I know running 32bit sparc64 
   | systems cross compile a sparc release from i386 ;-)

 Heh.
State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 18 May 2009 03:42:33 +0000
State-Changed-Why:
this is supported via building a sparc world and using GENERIC_SUN4U kernel.
build.sh doesn't even accept "-m sparc64 -a sparc" anymore.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.