From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:34:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3EC2616A420; Sun, 17 Feb 2008 17:34:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0422816A419; Sun, 17 Feb 2008 17:34:25 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.72]) by mx1.freebsd.org (Postfix) with ESMTP id E5E1613C44B; Sun, 17 Feb 2008 17:34:24 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout009/MantshX 4.0) with ESMTP id m1HHYO96017288; Sun, 17 Feb 2008 09:34:24 -0800 (PST) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m1HHYMfV024090 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 17 Feb 2008 09:34:23 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Rafal Jaworowski In-Reply-To: <47B84D9B.4010903@semihalf.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 17 Feb 2008 09:34:21 -0800 References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B84D9B.4010903@semihalf.com> X-Mailer: Apple Mail (2.919.2) Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:34:25 -0000 On Feb 17, 2008, at 7:07 AM, Rafal Jaworowski wrote: > Marcel Moolenaar wrote: >>>> Save U-Boot's registers at startup and restore them when >>>> performing a syscall. This way we don't have to compile >>>> code specially to avoid using those registers. Otherwise >>>> we have to encode knowledge of those registers in at least >>>> 4 makefiles and introduce a build knob to enable it all. >>>> This does not allow us to build everything with a single >>>> build world. >>> >>> Hi Marcel, >>> >>> I'm not quite sure this is sufficient... I already had a similar >>> save/restore >>> in place, but there is some general problem with U-Boot that leads >>> to >>> hangs >>> (experienced): >> >> Interesting, I didn't see any such problems with 1.3.2-rc1. >> > > After a bit of digging, I guess this is why it didn't bite you up > front: very > recently (last minute inclusions during 1.3.2-rc1 preparation) > Wolfgang > changed the dedicated regs layout... with r29 going -> r2 due to > certain > problems with gcc 4.x producing bigger code when not all 'high' > registers it > likes are available in the whole block etc. I'm happy I removed all that knowledge in makefiles and put it in a single source file. Maybe we should save and restore all registers so that we don't have to worry about it anymore. > Anyway, the pointer to global_data > now became r2, which is system/reserved according to ABI, so r29 > unsafety is > gone. I like that change. It makes a lot of sense. > I think the easiest way to go would be following this recent change > and switch > r14 -> r13. R13 is also non-volatile in ABI and serves small data area > pursposes, and we could use it for GOT ptr. This way no context save/ > restore > would be necessary at all. I'll follow up on this on u-boot-users ML. I like that too. If access to the GOT is not performance critical, it can also be put in the global data so that there's only r2... Anyway: Good catch! -- Marcel Moolenaar xcllnt@mac.com