From patchwork Tue Jun 10 23:15:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 31712 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A185820675 for ; Tue, 10 Jun 2014 23:15:43 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf479287ykq.4 for ; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:references:in-reply-to:cc:subject:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list :content-transfer-encoding:content-type; bh=LDYZrSPjs/u41iDLftO0bbuIQQXcXWvr/IclNUg8+JY=; b=UMboAORWvNSKYhsPl0qZwf2g/EX4F29837mp/QFrI21YQFzDzLhSBzL7dJ+yWuTHsy 7gb8JVlZJogO6m8SxgmKCH96R+Q9AkGunmexmSUUR3zwwkNUhmfnCCGIwtIAWFVtoo6G 0c1A/Tr8InTlvajw4mWgUko/coZdQ8E0cxav1c+7JJUBa/ENXQ17rjgqrEx3x8TDZnSf 2MRKuHYFlIsMk2EMvG+pF8eotZsbUXioBvYgnfWQzt9uILYZwC/xv0hqbuy6cIq8AbVP vHncI8gAeExeKkzSlamRuryxnxxX4aSgexnHiNbs5TqoeX+kkzLZ64lsGJKVIBncKMMD bH7Q== X-Gm-Message-State: ALoCoQkF3+bAiZZAwo+07ABhy9Hhxn8CfYA/wwjF8NkWk7vDKm8z3dr0WT48cOy0cZpADB2AgnkC X-Received: by 10.236.2.162 with SMTP id 22mr188563yhf.26.1402442143389; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.48 with SMTP id w45ls2216370qgd.73.gmail; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) X-Received: by 10.52.163.161 with SMTP id yj1mr161107vdb.35.1402442143240; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id n10si13623324vei.8.2014.06.10.16.15.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 16:15:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so5166873veb.16 for ; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr34778328vcm.11.1402442143044; Tue, 10 Jun 2014 16:15:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp261095vcb; Tue, 10 Jun 2014 16:15:42 -0700 (PDT) X-Received: by 10.180.228.39 with SMTP id sf7mr40175993wic.26.1402442141872; Tue, 10 Jun 2014 16:15:41 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id u3si19076413wiw.56.2014.06.10.16.15.41 for ; Tue, 10 Jun 2014 16:15:41 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B437D4A020; Wed, 11 Jun 2014 01:15:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mNJk7JF8FDSo; Wed, 11 Jun 2014 01:15:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4ED5F4A021; Wed, 11 Jun 2014 01:15:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4CDC94A021 for ; Wed, 11 Jun 2014 01:15:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q4Mr4aTluqpM for ; Wed, 11 Jun 2014 01:15:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gw3-out.broadcom.com (mail-gw3-out.broadcom.com [216.31.210.64]) by theia.denx.de (Postfix) with ESMTP id 644054A020 for ; Wed, 11 Jun 2014 01:15:26 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.01,455,1400050800"; d="scan'208";a="33559561" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw3-out.broadcom.com with ESMTP; 10 Jun 2014 16:19:20 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 10 Jun 2014 16:15:25 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Tue, 10 Jun 2014 16:15:25 -0700 Received: from [10.136.4.105] (lbrmn-vmlnx03.ric.broadcom.com [10.136.4.105]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D060E9FA2D; Tue, 10 Jun 2014 16:15:13 -0700 (PDT) Message-ID: <53979199.5010100@broadcom.com> Date: Tue, 10 Jun 2014 16:15:37 -0700 From: Steve Rae User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Wolfgang Denk References: <1400105145-6628-1-git-send-email-drambo@broadcom.com> <1400107265.16796.8.camel@yellow> <5374CD55.3010703@broadcom.com> <20140515152119.9939F38047D@gemini.denx.de> <5374E64B.1060104@broadcom.com> <20140515191957.74A853804B6@gemini.denx.de> <538367B7.5090108@broadcom.com> <538D18C5.206@broadcom.com> <53961CFE.4090106@broadcom.com> <539746C4.9040004@broadcom.com> <20140610181341.7E10138131B@gemini.denx.de> <53975EC2.1080209@broadcom.com> <20140610203500.0D37038131B@gemini.denx.de> In-Reply-To: <20140610203500.0D37038131B@gemini.denx.de> Cc: Darwin Rambo , U-Boot Subject: Re: [U-Boot] [PATCH] arm: Allow u-boot to run from offset base address X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srae@broadcom.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On 14-06-10 01:35 PM, Wolfgang Denk wrote: > Dear Steve, > > In message <53975EC2.1080209@broadcom.com> you wrote: >> >>> I still cannot understand why _start and CONFIG_SYS_TEXT_BASE would >>> have to be the same. There is no such requirement. What exactly >>> prevents you from assigning _start a location at offset 0x20 to the >>> start of the text segment, i. e. CONFIG_SYS_TEXT_BASE ? >> >> Wolfgang et al. >> >> I agree that they do not need to be the same... >> So our issue is that basically "for every ARMv7 board in the company", >> we are currently maintaining our own modified/customized version of >> "arch/arm/cpu/armv7/start.S" in order to add the appropriate 32 byte >> header... > > There should be more clever ways to implement this. If nothing else > comes to mind, an #ifdef in "arch/arm/cpu/armv7/start.S" should be > sufficient to condistionally insert / adjust any offset that might be > needed for a specific board. > >> And we could choose to do it using other methods, but they all require >> us to maintain a customized version of linker scripts, or some other >> code, or .... > > ... or a CONFIG setting in your board config file resp. your board's > defconfig. > >> The request here is that with the addition of some relatively >> straightforward (upstreamed) code, then this can be handled >> automatically by a post-processing step and we would be able to use a >> pristine version of the upstreamed code... > > I'm sorry, but I disagree especially on the "straightforward" part. > Also, I see no reason to make the existing code unnecessarily complex, > and add more disadvantages (like increased meory footprint etc.) when > the same purpose can be implemented without adding any special code at > all. > >> Our desire is to get this into the beginnings of the "ARMv8" boards, so >> that we can avoid the maintenance issues we have with the current ARMv7 >> boards. >> >> We appreciate your consideration of this request. > > These are two different things: implementing a clean and easy way to > support a necessary feature is one thing; to do it in the suggested > way by adding code where none is needed is another thing. > > I'm all for adding support for any features that are useful, even if > only for a single user, as long as they don't hurt other users. All > I'm asking is to chose another way to implement this feature. So far, > I did not see any arguments that my alternative proposals would cause > any problems to you? > OK - I think that one of the alternate proposals would be to conditionally reserve a "32 byte block" prior to the _start symbol (in "arch/arm/cpu/armv8/start.S") which would then be filled in by a post-processing step... This could be implemented by: b reset And then in our board config file: #define CONFIG_CUSTOM_HEADER_RESERVED_BYTES 32 And we could implement a similar algorithm in the armv7/start.S as you stated above. Are we understanding your proposals properly? Would this be an acceptable solution? Thanks, Steve > Best regards, > > Wolfgang Denk > diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S index 4b11aa4..8fd72f1 100644 --- a/arch/arm/cpu/armv8/start.S +++ b/arch/arm/cpu/armv8/start.S @@ -18,6 +18,10 @@ * *************************************************************************/ +#ifdef CONFIG_CUSTOM_HEADER_RESERVED_BYTES + .skip CONFIG_CUSTOM_HEADER_RESERVED_BYTES +#endif + .globl _start _start: