From owner-p4-projects@FreeBSD.ORG Sat Feb 16 22:07:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD2EF16A421; Sat, 16 Feb 2008 22:07:53 +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 55FF416A418; Sat, 16 Feb 2008 22:07:53 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id BF74313C442; Sat, 16 Feb 2008 22:07:52 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 8B2CF1439F; Sat, 16 Feb 2008 23:16:03 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19719-01; Sat, 16 Feb 2008 23:16:02 +0100 (CET) Message-ID: <47B75EB3.2020001@semihalf.com> Date: Sat, 16 Feb 2008 23:07:47 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> In-Reply-To: <200802162141.m1GLfgkj048217@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: 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: Sat, 16 Feb 2008 22:07:54 -0000 Marcel Moolenaar wrote: > http://perforce.freebsd.org/chv.cgi?CH=135517 > > Change 135517 by marcel@marcel_jnpr on 2008/02/16 21:41:02 > > 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): - U-Boot does not handle interrupts so there's no context save/restore of exceptions, other than very few cases - there's one paricular asynchronous way for U-Boot code to regain control without those dedicated r14/29 regs saved: decrementer, which can hit anytime while in the app code, and which usually leads to hangs/corruption as U-Boot code use them blindly - without better handling of U-Boot exeptions such save/restore done only at the external app level will not be safe I'm afraid.. Rafal PS. I guess it would be good to synchronise somehow the work, as we seem to tackle the same pieces, which is a waste of resources.