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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,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 20FC7C43464 for ; Fri, 18 Sep 2020 10:32:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C43FD20771 for ; Fri, 18 Sep 2020 10:32:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mf2gxeCI"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Br0X/Bko" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C43FD20771 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+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=merlin.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=KO6egkuxZLxeom1W6EhG6OIXU8s8fdpbY1FTz1TD9Mg=; b=mf2gxeCI01sz+LqGnOzIY+YJOy m1Opk8KBt5/0vcmH7Y0z6RYMGG5jUIJjWU4KjT1oD6FDB0+qfyWyWh0ZsDp1Y59nz7ADDrr0sJ/lH WC1CItM+LuPmDQOkzfKtEtgtJRRCg28yI5vnfzorrAyoC0X0xK47Vm8HkmeVb+KtG2ewHkm9IZ7Bi Z3vk6MU7TOFGbFU1kmuWPtVQcYwe6aFYVLaEdod9dDBjww41ztmZqcHsnv0oxnCvjxWiAkaYQDvLG e5B/mhCkhgbNhALI+Gef7q/4oR6jbcI7TpU+vn13HUdJAOqoi2w1yw9fuE6KopDUaMLUyBXA5t4I7 K8lsp0dA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJDfe-0000oV-Ny; Fri, 18 Sep 2020 10:31:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJDfb-0000nu-OK for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 10:31:12 +0000 Received: from e123331-lin.nice.arm.com (adsl-119.109.242.22.tellas.gr [109.242.22.119]) (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 68EC920771; Fri, 18 Sep 2020 10:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600425070; bh=TLXrobjiQlDGswky3yG7no5chAToDauzPz6FD8pw+TA=; h=From:To:Cc:Subject:Date:From; b=Br0X/BkoMg1i0pm/A91EfH/2QnYD1R8TcPXq7UH+ps1mTl9gPH1y9H7YVSorgx2hc p+ifu5p+AXyw/ikAFzGBlK6ssRu1OxiTLS8ydDjqguIbAYvYdSfSxnGltzvD9vQXvm aMGWyTREw6dYlGyYm8NlzUWdYB+EP2ahzry1TeAo= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [RFC/RFT PATCH 0/6] ARM: p2v: reduce min alignment to 2 MiB Date: Fri, 18 Sep 2020 13:30:56 +0300 Message-Id: <20200918103102.18107-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-20200918_063111_870304_149C65F5 X-CRM114-Status: GOOD ( 16.05 ) 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: linux-efi@vger.kernel.org, Nicolas Pitre , Linus Walleij , Russell King , Santosh Shilimkar , Zhen Lei , Ard Biesheuvel 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is inspired by Zhei Len's series [0], which updates the ARM p2v patching code to optionally support p2v relative alignments of as little as 64 KiB. Reducing this alignment is necessary for some specific Huawei boards, but given that reducing this minimum alignment will make the boot sequence more robust for all platforms, especially EFI boot, which no longer relies on the 128 MB masking of the decompressor load address, but uses firmware memory allocation routines to find a suitable spot for the decompressed kernel. This series is not based on Zhei Len's code, but addresses the same problem, and takes some feedback given in the review into account: - use of a MOVW instruction to avoid two adds/adcs sequences when dealing with the carry on LPAE - add support for Thumb2 kernels as well - make the change unconditional - it will bit rot otherwise, and has value for other platforms as well. The first four patches are general cleanup and preparatory changes. Patch #5 implements the switch to a MOVW instruction without changing the minimum alignment. Patch #6 reduces the minimum alignment to 2 MiB. Tested on QEMU in ARM/!LPAE, ARM/LPAE, Thumb2/!LPAE and Thumb2/LPAE modes. Cc: Zhen Lei Cc: Russell King Cc: Santosh Shilimkar Cc: Linus Walleij Cc: Nicolas Pitre [0] https://lore.kernel.org/linux-arm-kernel/20200915015204.2971-1-thunder.leizhen@huawei.com/ Ard Biesheuvel (6): ARM: p2v: factor out shared loop processing ARM: p2v: factor out BE8 handling ARM: p2v: drop redundant 'type' argument from __pv_stub ARM: p2v: use relative references in patch site arrays ARM: p2v: switch to MOVW for Thumb2 and ARM/LPAE ARM: p2v: reduce p2v alignment requirement to 2 MiB arch/arm/Kconfig | 2 +- arch/arm/include/asm/memory.h | 58 ++++++--- arch/arm/kernel/head.S | 136 ++++++++++++-------- 3 files changed, 123 insertions(+), 73 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel