From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22b; helo=mail-io0-x22b.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 13A7B21F3C1B9 for ; Tue, 10 Oct 2017 07:46:38 -0700 (PDT) Received: by mail-io0-x22b.google.com with SMTP id 189so1416286iow.10 for ; Tue, 10 Oct 2017 07:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=P0OuEPI0VY2HvICQ8RetGOStBwBHdoHGhaBq71F2SPE=; b=1n2onzThlAnvXyyDpPmzWrfl/KyCpcfIa+AR/j2arGEZCaOcG0BvhFDAvkJ0hWfFAi zqZFySYYDNSLo62HI5eJ9hjTaCJSFyiOoW3UrzYJyOAhWZbfLIM0ZA0FHMlfXFIefcdc VHR440RTT1Rn6XLF/xSlFRKyN8DYev1Ca3gDM1aE54EaZUnd2g3tHK3xaIpnc1vc1HfP PfUA1EkQxha4bUXi1EH7y88O6oRvGdf3K1HPc0qWEfsYE68nusCaxWzLPxalSSWAXgze u67BxQ7wR0FQsHk9g2wT4kcjojKhrAKVI99GZF+xxpxzn3RZj0++cdx+FOwiHQrhifC8 FhWw== 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=P0OuEPI0VY2HvICQ8RetGOStBwBHdoHGhaBq71F2SPE=; b=R6oQ3JO4timZkVfccKRGKwUFrTBwZwQAh6cCRw2TYFWkQPnbxiADSIav/lsCoMs24E ur2w5iV+ams9MYx8U2WHnBifT40S2EAroyLuldgEkiIrPeidLODgiUS4hdA3JL0EEixz tPPCB6vI03GAJ+wa948Z/SursAt5O+PcSjb62pyf0Ma2XGHnaP+XLAqZhp9BJ0iRGGIo araiDQPXUO6y3gvJ6HbxmHI9wBupUsSSt8+s8+HC5PQqmDsEuHG9kcE8NhyM8VP35pVq t0rJd3LfgZ9On/WoI/3U5tX4bTD0Vn/KjsWo25rdqEkagZYX99t9k2VkZo4mGPf6ql+t Ze9Q== X-Gm-Message-State: AMCzsaVu5n+dIUmgYbZfsoMduXxB/55QfGGcoeZGP+oH7FuZ2tkfGnnX jRsVkUkjD5cS0MThzZDWt4y87s+TKD7Mcyq0Loa0BQ== X-Google-Smtp-Source: AOwi7QDvS+Ycn9bUBXQQo8nMBAkbwU9gY67QY5y7yS2FKLFHlPLGnzQbVzJ5cCN5oUpF0CrAIvHo462RhCyWhcOgRHA= X-Received: by 10.107.184.194 with SMTP id i185mr18694112iof.155.1507647005732; Tue, 10 Oct 2017 07:50:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.157.141 with HTTP; Tue, 10 Oct 2017 07:50:04 -0700 (PDT) In-Reply-To: <20171010144359.z57jipw6hdlkyjxj@bivouac.eciton.net> References: <1507568462-28775-1-git-send-email-mw@semihalf.com> <1507568462-28775-5-git-send-email-mw@semihalf.com> <20171010144359.z57jipw6hdlkyjxj@bivouac.eciton.net> From: Marcin Wojtas Date: Tue, 10 Oct 2017 16:50:04 +0200 Message-ID: To: Leif Lindholm Cc: edk2-devel-01 , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Subject: Re: [platforms: PATCH 04/13] Marvell/Armada: Armada70x0Lib: Clean FV in the D-cache before boot X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 14:46:38 -0000 Content-Type: text/plain; charset="UTF-8" 2017-10-10 16:43 GMT+02:00 Leif Lindholm : > On Mon, Oct 09, 2017 at 07:00:53PM +0200, Marcin Wojtas wrote: >> From: Ard Biesheuvel >> >> To prevent cache coherency issues when chainloading via U-Boot, clean >> and invalidate the FV image in the caches before re-enabling the MMU. > > Is this only relevant for chainloading (which is not the expected > normal usage) or is it also important for warm-reset - for example for > capsule update (at least from within OS)? Initially it was done for chainloading purpose - I don't use it anymore, but just thought the patch itself is worth keeping. About capsule update - I haven't tried it, it's been not the top priority for me recently. > > If the former, I would prefer for this to be conditionalised, and not > included by default. How can we detect, that uefi is being chain-loaded? > > If the latter, please update the commit message. > I'm considering keeping this patch aside, until it may become necessary for capsule update, as I cannot guarantee now it's needed at all. What's your recommendation? Best regards, Marcin > / > Leif > >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> Signed-off-by: Marcin Wojtas >> --- >> Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S | 15 +++++++++++++++ >> Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.inf | 3 +++ >> 2 files changed, 18 insertions(+) >> >> diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S b/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S >> index 72f8cfc..7544361 100644 >> --- a/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S >> +++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/AArch64/ArmPlatformHelper.S >> @@ -17,6 +17,21 @@ >> >> ASM_FUNC(ArmPlatformPeiBootAction) >> mov x29, xzr >> + >> + MOV32 (x0, FixedPcdGet64 (PcdFvBaseAddress)) >> + MOV32 (x3, FixedPcdGet32 (PcdFvSize)) >> + add x3, x3, x0 >> + >> + mrs x1, ctr_el0 >> + and x1, x1, #0xf // Dminline >> + mov x2, #4 >> + lsl x1, x2, x1 // by-VA stride for D-cache maintenance >> + >> +0:dc civac, x0 >> + add x0, x0, x1 >> + cmp x0, x3 >> + b.lt 0b >> + >> ret >> >> //UINTN >> diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.inf b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.inf >> index 2e198c3..6966683 100644 >> --- a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.inf >> +++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.inf >> @@ -67,5 +67,8 @@ >> gArmTokenSpaceGuid.PcdArmPrimaryCoreMask >> gArmTokenSpaceGuid.PcdArmPrimaryCore >> >> + gArmTokenSpaceGuid.PcdFvBaseAddress >> + gArmTokenSpaceGuid.PcdFvSize >> + >> [Ppis] >> gArmMpCoreInfoPpiGuid >> -- >> 1.8.3.1 >>