From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LepNF-0000UN-R1 for mharc-grub-devel@gnu.org; Wed, 04 Mar 2009 06:34:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LepND-0000UF-I6 for grub-devel@gnu.org; Wed, 04 Mar 2009 06:34:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LepNC-0000U1-AV for grub-devel@gnu.org; Wed, 04 Mar 2009 06:34:51 -0500 Received: from [199.232.76.173] (port=55013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LepNC-0000Ty-6Z for grub-devel@gnu.org; Wed, 04 Mar 2009 06:34:50 -0500 Received: from mta-out.inet.fi ([195.156.147.13]:37423 helo=jenni2.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LepNB-0002Zx-Em for grub-devel@gnu.org; Wed, 04 Mar 2009 06:34:49 -0500 Received: from [192.168.1.102] (84.248.105.254) by jenni2.inet.fi (8.5.014) id 49ACEB21000FAB1A for grub-devel@gnu.org; Wed, 4 Mar 2009 13:34:48 +0200 Message-ID: <49AE6756.10404@nic.fi> Date: Wed, 04 Mar 2009 13:34:46 +0200 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: The development of GRUB 2 References: <20090303.181513.19285049.davem@davemloft.net> In-Reply-To: <20090303.181513.19285049.davem@davemloft.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH 1/7]: Fix sparc64 setjmp implementation. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 11:34:52 -0000 David Miller wrote: > This corrects the sparc64 setjmp implementation. > > We need to store the return address register, the > stack pointer, and frame pointer into the jump buf. > > And on longjmp we need restore those registers, flush the register > window state, and pull in the top-most register window. > > 2009-03-03 David S. Miller > > * normal/sparc64/setjmp.S: Fix setjmp implementation. > * include/grub/sparc64/setjmp.h: Update grub_jmp_buf[]. > --- > include/grub/sparc64/setjmp.h | 3 +-- > normal/sparc64/setjmp.S | 18 +++++++++++++----- > 2 files changed, 14 insertions(+), 7 deletions(-) > > diff --git a/include/grub/sparc64/setjmp.h b/include/grub/sparc64/setjmp.h > index 12d8e01..183a820 100644 > --- a/include/grub/sparc64/setjmp.h > +++ b/include/grub/sparc64/setjmp.h > @@ -19,8 +19,7 @@ > #ifndef GRUB_SETJMP_CPU_HEADER > #define GRUB_SETJMP_CPU_HEADER 1 > > -/* FIXME (sparc64). */ > -typedef unsigned long grub_jmp_buf[20]; > +typedef unsigned long grub_jmp_buf[3]; I assume unsigned long is 64bit in sparc? Would it be more practical to use grub_uint64_t? Are there any other registers that needs to be preserved ? Other than that I cannot decipher more from that asm :). If you have tested it and it works. It probably ain't bad idea to commit this patch.