From owner-freebsd-sparc64@FreeBSD.ORG Mon Jan 26 02:17:26 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE48D16A4CE for ; Mon, 26 Jan 2004 02:17:26 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4EDA43D4C for ; Mon, 26 Jan 2004 02:17:19 -0800 (PST) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])i0QAHCL03807; Mon, 26 Jan 2004 11:17:12 +0100 (MET) Date: Mon, 26 Jan 2004 11:17:12 +0100 (CET) From: Harti Brandt To: Ken Smith In-Reply-To: <20040126050914.GB4242@electra.cse.Buffalo.EDU> Message-ID: <20040126111645.C21778@beagle.fokus.fraunhofer.de> References: <6.0.1.1.2.20040124173355.027d4508@mail.firetide.com> <20040125155351.X18713@beagle.fokus.fraunhofer.de> <20040125174359.C18713@beagle.fokus.fraunhofer.de> <20040126050914.GB4242@electra.cse.Buffalo.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Cornejo cc: freebsd-sparc64@freebsd.org Subject: Re: fix for undefined symbol 'panic' X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 10:17:26 -0000 Looks good to me. harti On Mon, 26 Jan 2004, Ken Smith wrote: KS>On Sun, Jan 25, 2004 at 05:45:29PM +0100, Harti Brandt wrote: KS> KS>> Go ahead. I think the arguments are passed in %o0, %o1 and %o2. I don't KS>> know in what order, however. KS> KS>Thanks. I think this is it. With this in place the kernel compiles. KS>I checked it by placing a bogus use of the macro into KS>sys/sparc64/sparc64/swtch.S and the resulting panic message was: KS> KS>panic: Test call to panic KS>at line 0 in file (null) KS>cpuid = 0; KS>Debugger("panic") KS>Stopped at Debugger+0x1c: ta %xcc, 1 KS>db> KS> KS>I don't hold much hope of getting the line number and filename right KS>(and I think you get the same results from the places the i386 assembly KS>code calls the new __panic, sys/i386/i386/swtch.s). KS> KS>I sent this in to my mentor for approval, but if anyone sees anything KS>wrong with it let me know. KS> KS>Thanks. KS> KS>Index: asmacros.h KS>=================================================================== KS>RCS file: /home/ncvs/src/sys/sparc64/include/asmacros.h,v KS>retrieving revision 1.17 KS>diff -u -r1.17 asmacros.h KS>--- asmacros.h 16 Jul 2003 00:08:43 -0000 1.17 KS>+++ asmacros.h 26 Jan 2004 04:52:24 -0000 KS>@@ -101,8 +101,10 @@ KS> .sect .rodata ; \ KS> 9: .asciz msg ; \ KS> .previous ; \ KS>- SET(9b, r1, %o0) ; \ KS>- call panic ; \ KS>+ SET(9b, r1, %o2) ; \ KS>+ clr %o1 ; \ KS>+ clr %o0 ; \ KS>+ call __panic ; \ KS> nop KS> KS> #ifdef INVARIANTS KS> KS> KS> -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org