From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54E47C34047 for ; Wed, 19 Feb 2020 09:44:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03F342464E for ; Wed, 19 Feb 2020 09:44:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M3+WuGsP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="flinfKnP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03F342464E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=nqJgnRdQKZK4eUERTcKaG2Ol68sfnFwLAvOuSL1ldWc=; b=M3+ WuGsPwrGLhvmNb8wc4YxcZgQeZi2lMct0QYSgvUf5HvRndPL7Nc2DX7rbRwMaTi9vgXrXYv2+/pPk s9r+qBPWMVFkMXIxWWLvn2yUUtqiNG2pxGnoZMaDeWxcHMIiXPH+8NLc4MA06f5EFQm4Ka7tHYu4l 4kY6tsKqQz+qafMc9hHOxwsO2RlIBHWTB3WoaC1rl0AI9y7rDPBey3KHwaN4TsWHiZOgYBTKDmb1x vquwEoY/Jf8Noct/BHAXxLP+YIaEu3SEWKqxHoVb/OFLtj4U9iuqxh3vw/Zwiuul38NckTiM1RxuB A54PdbZbPtEpW8+fHGh1tToeASw5p3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4Ltp-00028C-I1; Wed, 19 Feb 2020 09:44:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4LtW-0001vR-Qu for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 09:43:52 +0000 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DAC682464E; Wed, 19 Feb 2020 09:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582105428; bh=sIKEUXEhrhihy/PCD1g07Ji9azmc+leKwztylDMz8vU=; h=From:To:Cc:Subject:Date:From; b=flinfKnP+5qymhAG170Z1tht57sV66eRALIlZAi+gNMk/XJN+keNg08Zp5ECcE8C4 M40Ai6i6DjX1JyP+m6izFSO+jQqZnjyYZJXzHqGdQVryrxm/MkFsJNiiUBuY3GwdwR j/zWFTme30Xn95b7diwH9se5voC0BjU9Sk702bC4= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Subject: [PATCH v2 0/4] ARM: decompressor: use by-VA cache maintenance for v7 cores Date: Wed, 19 Feb 2020 10:43:36 +0100 Message-Id: <20200219094340.16597-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_014350_894152_5267B64C X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , Tony Lindgren , Marc Zyngier , Russell King , Catalin Marinas , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org While making changes to the EFI stub startup code, I noticed that we are still doing set/way maintenance on the caches when booting on v7 cores. This works today on VMs by virtue of the fact that KVM traps set/way ops and cleans the whole address space by VA on behalf of the guest, and on most v7 hardware, the set/way ops are in fact sufficient when only one core is running, as there usually is no system cache. But on systems like SynQuacer, for which 32-bit firmware is available, the current cache maintenance only pushes the data out to the L3 system cache, where it is not visible to the CPU once it turns the MMU and caches off. So instead, switch to the by-VA cache maintenance that the architecture requires for v7 and later (and ARM1176, as a side effect). Changes since v1: - include the EFI patch that was sent out separately before (#1) - split the preparatory work to pass the region to clean in r0/r1 in a EFI specific one and one for the decompressor - this way, the first two patches can go on a stable branch that is shared between the ARM tree and the EFI tree - document the meaning of the values in r0/r1 upon entry to cache_clean_flush - take care to treat the region end address as exclusive - switch to clean+invalidate to align with the other implementations - drop some code that manages the stack pointer value before calling cache_clean_flush(), which is no longer necessary - take care to clean the entire region that is covered by the relocated zImage if it needs to relocate itself before decompressing https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm32-efi-cache-ops Cc: Russell King Cc: Marc Zyngier Cc: Nicolas Pitre Cc: Catalin Marinas Cc: Tony Lindgren Ard Biesheuvel (4): efi/arm: work around missing cache maintenance in decompressor handover efi/arm: pass start and end addresses to cache_clean_flush() ARM: decompressor: prepare cache_clean_flush for doing by-VA maintenance ARM: decompressor: switch to by-VA cache maintenance for v7 cores arch/arm/boot/compressed/head.S | 133 +++++++++++--------- 1 file changed, 74 insertions(+), 59 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel