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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 42AEDC2BA19 for ; Mon, 13 Apr 2020 16:21:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19A1320735 for ; Mon, 13 Apr 2020 16:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586794908; bh=IqpUxkVtHDEgwWhX20VGe8wZL2/R4vFyk/X+sHaBDTI=; h=From:To:Cc:Subject:Date:List-ID:From; b=s4I+npHO4iu1QXyW6dReafQvfdJ6UID+6+uxU+h+LxaliH+LFr/AjXatSMAyqabSy xqoV1YXkvihw/MYfd1PR8viJm81F/EXoE7COEcQw4Z5pWig27ZRYLLvIE0IcEpFX7V NAZ2ZugXDgbLTBwyRZB5SIdPAu3QHGTlg4kqCAMU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731466AbgDMQVr (ORCPT ); Mon, 13 Apr 2020 12:21:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731410AbgDMQVq (ORCPT ); Mon, 13 Apr 2020 12:21:46 -0400 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 06DD020678; Mon, 13 Apr 2020 16:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586794906; bh=IqpUxkVtHDEgwWhX20VGe8wZL2/R4vFyk/X+sHaBDTI=; h=From:To:Cc:Subject:Date:From; b=IDI3leQ+aYl2QfNm1UfMxzARYKVpCwhL+mdURWoQsBbQKowKg30LvzrqGIIiSpAwa pPxelkW+Yot2fR9cud0erCGgqWjG2mH0I7wIHfyjbroHR/BX49XsSzRUXvh8h5tU+2 z5bg9CLBwPAy8BOz0P+im+3M4g2IlnWRHyBMZkOk= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Geert Uytterhoeven , Nicolas Pitre , Linus Walleij , Russell King Subject: [PATCH v2 0/5] ARM: simplify handover from UEFI to decompressor Date: Mon, 13 Apr 2020 18:21:30 +0200 Message-Id: <20200413162135.14955-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org The EFI stub in the ARM kernel runs in the context of the firmware, which means it runs with the caches and MMU on. Currently, we relocate the zImage so it appears in the first 128 MiB, disable the MMU and caches and invoke the decompressor via its ordinary entry point. However, since we can pass the base of DRAM directly, there is no need to relocate the zImage, which also means there is no need to disable and re-enable the caches and create new page tables etc. This simplification is implemented by patch #5. Patches #1 - #4 are prerequisite changes to permit the decompressor to execute from the offset chosen by the UEFI firmware. Note that this applies onto v5.7-rc1 with Geert's patch 'ARM: boot: Obtain start of physical memory from DTB' applied [0] Changes since v1: - tweak some asm sequences in #2 to fix the Thumb2 build - switch immediately to the new stack in #5 Cc: Geert Uytterhoeven Cc: Nicolas Pitre Cc: Linus Walleij Cc: Russell King [0] https://lore.kernel.org/linux-arm-kernel/20200320144348.12865-1-geert+renesas@glider.be/ Ard Biesheuvel (5): ARM: decompressor: move headroom variable out of LC0 ARM: decompressor: split off _edata and stack base into separate object ARM: decompressor: defer loading of the contents of the LC0 structure ARM: decompressor: move GOT into .data for EFI enabled builds ARM: decompressor: run decompressor in place if loaded via UEFI arch/arm/boot/compressed/head.S | 89 ++++++++------------ arch/arm/boot/compressed/vmlinux.lds.S | 5 ++ drivers/firmware/efi/libstub/arm32-stub.c | 45 ++-------- 3 files changed, 45 insertions(+), 94 deletions(-) -- 2.17.1