From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1598C207DF2AB for ; Fri, 1 Jun 2018 08:26:33 -0700 (PDT) Received: by mail-io0-x241.google.com with SMTP id d73-v6so30101111iog.3 for ; Fri, 01 Jun 2018 08:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uKCYidXmZnyXyhP9iSCZOc+IED4eh21d8gHSA5IdRVU=; b=H3cvww13VY8OAq6wVG3Dq1UtEo8sFNIZbeNM6WEKOtMaVCcc1RIU5YVdw47bVlsvhb Gr7e5WtiU500yxLQQKjSJwGa7vYtpEL1iJQ2ThJtxDfYyHG5kZO6DFCRC2GzPA+GXTZ6 nKeDujMJl+aaX6GBCJPVzO0Fs3NcJzzQQoZbI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uKCYidXmZnyXyhP9iSCZOc+IED4eh21d8gHSA5IdRVU=; b=eN3sKG34dL9Q7Ogdq2MIJQT+sYV41MFwkC+br3KbTKT1GifIJPjSkYyDAyyMqPhd2v WGj9J4O0VurUOWhrVAu+oHyJ9mNI5hWRRwF8wIZ/o4gSSlamI1IS1I0oSg21KbHDBECD CkCOlatCMHX/qFG9qDc/1mrpTkkSo6mbDONY95Y/yPnH5Oy7sG1nbwaB6R2vKy6FsIYL VEEgHp9OiOKQBksixHOw2znI8txJ73D1Bu8Yv5uOrYMRzdx9vYg/uHdaG9hWlWNEskFj p+0QEy8GHU7vvEv/vfN0r2vgBkuA/w7QTJxcqT++mVFXIOUUV8eR1u1dgoRsiNZzhjDM qP6w== X-Gm-Message-State: APt69E0TbLCShlVeLDYHwqFcZ58LgEg/bOle08iTfFCS+uKC+hlMfnWc O4aq/8PXrW/P+3eXrJDjHfYktSkUGBMlerR4rq9Quw== X-Google-Smtp-Source: ADUXVKKt/IjFko3RCLmTflKt5kqDZHLeQIi9Xss0N9BxrD/fqSL5cRMhw+8IXwIPXvnEHENGr47pRFxbCpoHiPH5tw0= X-Received: by 2002:a6b:978e:: with SMTP id z136-v6mr11665861iod.60.1527866792367; Fri, 01 Jun 2018 08:26:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bb86:0:0:0:0:0 with HTTP; Fri, 1 Jun 2018 08:26:31 -0700 (PDT) In-Reply-To: <1527863526-5494-2-git-send-email-mw@semihalf.com> References: <1527863526-5494-1-git-send-email-mw@semihalf.com> <1527863526-5494-2-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Fri, 1 Jun 2018 17:26:31 +0200 Message-ID: To: Marcin Wojtas Cc: "edk2-devel@lists.01.org" , Leif Lindholm , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Hua Jing , Grzegorz Jaszczyk , davidsn@marvell.com Subject: Re: [platforms PATCH 1/4] Marvell/Armada70x0Db: Shift main FV from 0x0 address X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 15:26:33 -0000 Content-Type: text/plain; charset="UTF-8" On 1 June 2018 at 16:32, Marcin Wojtas wrote: > When using PEI phase, UEFI interprets 0x0 address > of boot FV as an error. In order to avoid it, shift > it to 0x1000 and put a hardcoded 'jump to 0x1000' at > offset 0x0. This patch is a preparation for using PEI > by Armada platforms. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas Reviewed-by: Ard Biesheuvel > --- > Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > index befb107..69cb4cd 100644 > --- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > @@ -49,7 +49,21 @@ NumBlocks = 0x400 > # > ################################################################################ > > -0x00000000|0x00100000 > +# > +# UEFI has trouble dealing with FVs that reside at physical address 0x0. > +# So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the > +# real FV at offset 0x1000 > +# > +0x00000000|0x00001000 > +DATA = { > +!if $(ARCH) == AARCH64 > + 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM > +!else > + 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM > +!endif > +} > + > +0x00001000|0x000ff000 > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > @@ -191,7 +205,6 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c > # PEI phase firmware volume > [FV.FVMAIN_COMPACT] > FvAlignment = 8 > -FvForceRebase = TRUE > ERASE_POLARITY = 1 > MEMORY_MAPPED = TRUE > STICKY_WRITE = TRUE > -- > 2.7.4 >