From patchwork Fri May 6 21:35:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 619456 X-Patchwork-Delegate: hdegoede@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3r1lSY3c3Cz9s5g for ; Sat, 7 May 2016 07:35:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b=KOU3GXbw; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DFA60A7624; Fri, 6 May 2016 23:35:38 +0200 (CEST) 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 lLmInW0wDuNb; Fri, 6 May 2016 23:35:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78CCEA75F6; Fri, 6 May 2016 23:35:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 940B9A75F6 for ; Fri, 6 May 2016 23:35:34 +0200 (CEST) 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 Af5I_oEeHf_g for ; Fri, 6 May 2016 23:35:34 +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-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by theia.denx.de (Postfix) with ESMTPS id 40895A75BF for ; Fri, 6 May 2016 23:35:31 +0200 (CEST) Received: by mail-lf0-f44.google.com with SMTP id m64so145145639lfd.1 for ; Fri, 06 May 2016 14:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=BT6g4c5zGcUsi8hIzxm29DIt/KPYAo4jy9fM2wk1nno=; b=KOU3GXbwK58DigV+pBi/BgHsMZ+UkPbi0BmnW9/+pQjelpzf33O7sCaSGrl/anLKeW lSxlRi+7UnStdCyaq3cHzxTwJ8L9VbxAdKQdpeXvl7BPgarSF0AJIot2sPmXysyfZJFg nHXMhe91JEp572SsozkJhNXEyfak9C+cdbgrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=BT6g4c5zGcUsi8hIzxm29DIt/KPYAo4jy9fM2wk1nno=; b=gSXrFkpHqsR3z3h6uCGwmUVbY93ObacTYZbCQUj/hUflI/m7Hz2TBfwn7d/t2GMTnS mDGQcFAgbBkbwiQMn6qs6obZhh6dPFfQiaGU5d+4SFteeCb/BayFPL3815YWKK1OmgAD IkRbT8BxELejSky7CgWwPxvwkkFTR9Gp1bgy62cknf0GIzYXVP1H7Gn2noU5fHPFK9lm wEzIcCvAI2nXu/+zxESoZRG02iPBmrHojcUAVJX/xKYKIxLlRkZGjh3ZuLoad5tM4Q4k lJx0KpyOmI/CmJsune11h/x0dMARPHFoEs5YmJPhX5dbZkrAbBdHY2yEkehnwJ6LEIt8 94iA== X-Gm-Message-State: AOPr4FXMHoK8Ga1rQpQPsJPrv265w7gsygOEtiMAjmFsuMWsfIM9tiXl14hRPQcc64AVsi694/yFjilGoznMtELN MIME-Version: 1.0 X-Received: by 10.25.34.68 with SMTP id i65mr10435139lfi.125.1462570530607; Fri, 06 May 2016 14:35:30 -0700 (PDT) Received: by 10.25.150.20 with HTTP; Fri, 6 May 2016 14:35:30 -0700 (PDT) In-Reply-To: <572D0C5B.8040406@arm.com> References: <1462396534-32390-1-git-send-email-andre.przywara@arm.com> <1462396534-32390-4-git-send-email-andre.przywara@arm.com> <572D0C5B.8040406@arm.com> Date: Fri, 6 May 2016 14:35:30 -0700 Message-ID: From: Steve Rae To: =?UTF-8?Q?Andr=C3=A9_Przywara?= X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: U-Boot Mailing List , Ian Campbell Subject: Re: [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On Fri, May 6, 2016 at 2:27 PM, André Przywara wrote: > On 06/05/16 22:15, Steve Rae wrote: > > Hi Andre, > > > > On Wed, May 4, 2016 at 2:15 PM, Andre Przywara > > wrote: > > > > The Allwinner provided boot0 boot loader requires a header before the > > U-Boot binary to both check its validity and to find other blobs to > > load. There is a tool called boot0img which fills the header > > appropriately. > > Reserve some space at the beginning of the binary to later hold the > > header if needed. > > Please note that the header is jumped over already by U-Boot anyway, > > so filling the header is optional and can be skipped if for instance > > boot0 is not used. > > > > Signed-off-by: Andre Przywara > > > > --- > > arch/arm/cpu/armv8/start.S | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S > > index deb44a8..b4c4867 100644 > > --- a/arch/arm/cpu/armv8/start.S > > +++ b/arch/arm/cpu/armv8/start.S > > @@ -21,6 +21,9 @@ > > _start: > > b reset > > > > +#ifdef CONFIG_ARCH_SUNXI > > + .space 0x5fc /* can be filled with a boot0 header if > > needed */ > > +#endif > > > > > > NAK ! > > this is NOT the _only_ board that would need this, so I propose: > > Well, I was thinking about this as well, but wondered why nobody has > ever come up with something like this before. > > So I am happy indeed with a more generic solution. > > > > > #ifdef CONFIG_RESERVE_SPACE_BOOT0 > > .space CONFIG_RESERVE_SPACE_BOOT0 > > #endif > > If you don't mind, I will put these three lines as your patch in a new > post. Feel free to send it yourself if you prefer this. > And it seems that boot0 is an Allwinner term, so maybe some more generic > naming like CONFIG_RESERVED_HEADER_SPACE or the like? > I'm OK with your "v2" - thanks! And Broadcom uses the term "boot0" -- but your define is fine if "boot0" is too vendor specific! PS. would you add it the "arm" as well - thanks! > Cheers, > Andre. > > > > > Thanks, Steve > > > > .align 3 > > > > .globl _TEXT_BASE > > -- > > 2.7.3 > > > > _______________________________________________ > > U-Boot mailing list > > U-Boot@lists.denx.de > > http://lists.denx.de/mailman/listinfo/u-boot > > > > > > diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 49238ed..f0d0bb1 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -60,6 +60,10 @@ _start: ldr pc, _irq ldr pc, _fiq +#ifdef CONFIG_RESERVE_SPACE_BOOT0 + .space CONFIG_RESERVE_SPACE_BOOT0 +#endif +