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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 1AD38C433E2 for ; Wed, 9 Sep 2020 17:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEBEE2166E for ; Wed, 9 Sep 2020 17:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599671994; bh=vLcbpNnan0Q9ikoYUFHXD8BV6Bv0VtlMkv6yFnjnxqo=; h=From:To:Cc:Subject:Date:List-ID:From; b=JX5faDDML2PZftSw6HwLoEnYPD1wofAb3J1sce/ITmNqR6o680HfjFLZFVvYOdcx2 lCce8SgHK5fRTyAVdHnlLB9zpHdmZ4RTiTvvKeMToema8sYw9V5ZPPWR3dAW3YBbXz BfPFiM5ciy+amXgy7HKvDQuXIV1lr9z+QqMmWOgA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730116AbgIIRTv (ORCPT ); Wed, 9 Sep 2020 13:19:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:54044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729529AbgIIP1W (ORCPT ); Wed, 9 Sep 2020 11:27:22 -0400 Received: from e123331-lin.nice.arm.com (adsl-204.109.242.29.tellas.gr [109.242.29.204]) (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 5B6BA22240; Wed, 9 Sep 2020 15:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599664602; bh=vLcbpNnan0Q9ikoYUFHXD8BV6Bv0VtlMkv6yFnjnxqo=; h=From:To:Cc:Subject:Date:From; b=bC20eOwYllY4VpagoF1zjyK8WcH8S9wOtNszc9xFAJvY1uyGUUDUGkYzgNa4og026 EhZXztxmYuG4m/x6HWyrpkGtF3oJinzLDcTyozTaa21LsPHEwAQGdBuptkfOgpdUL0 6Vsl13MHMhZ09SnVu5jdZYxT/xZ50Jz7Ub0Dyd/I= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Maxim Uvarov , Heinrich Schuchardt , Atish Patra , Palmer Dabbelt , Jens Wiklander , Francois Ozog , Etienne CARRIERE , Takahiro Akashi , Patrice CHOTARD , Sumit Garg , Grant Likely , Ilias Apalodimas , Christophe Priouzeau , Rouven Czerwinski , Patrick DELAUNAY Subject: [PATCH RFC/RFT 0/3] efi/libstub: arm32: Remove dependency on dram_base Date: Wed, 9 Sep 2020 18:16:20 +0300 Message-Id: <20200909151623.16153-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 Maxim reports boot failures on platforms that describe reserved memory regions in DT that are disjoint from system DRAM, and which are converted to EfiReservedMemory regions by the EFI subsystem in u-boot. As it turns out, the whole notion of discovering the base of DRAM is problematic, and it would be better to simply rely on the EFI memory allocation routines instead, and derive the FDT and initrd allocation limits from the actual placement of the kernel (which is what defines the start of the linear region anyway) Finally, we should be able to get rid of get_dram_base() entirely. However, as RISC-V only just started using it, we will need to address that at a later time. Cc: Maxim Uvarov Cc: Heinrich Schuchardt Cc: Atish Patra Cc: Palmer Dabbelt Cc: Jens Wiklander Cc: Francois Ozog Cc: Etienne CARRIERE Cc: Takahiro Akashi Cc: Patrice CHOTARD Cc: Sumit Garg Cc: Grant Likely Cc: Ilias Apalodimas Cc: Christophe Priouzeau Cc: Rouven Czerwinski Cc: Patrick DELAUNAY Ard Biesheuvel (3): efi/libstub: Export efi_low_alloc_above() to other units efi/libstub: Use low allocation for the uncompressed kernel efi/libstub: base FDT and initrd placement on image address not DRAM base arch/arm/include/asm/efi.h | 6 +- arch/arm64/include/asm/efi.h | 2 +- drivers/firmware/efi/libstub/arm32-stub.c | 177 ++++---------------- drivers/firmware/efi/libstub/efi-stub.c | 2 +- drivers/firmware/efi/libstub/efistub.h | 3 + drivers/firmware/efi/libstub/relocate.c | 4 +- 6 files changed, 47 insertions(+), 147 deletions(-) -- 2.17.1 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=-7.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=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 0B770C43461 for ; Wed, 9 Sep 2020 15:18:08 +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 95BA722286 for ; Wed, 9 Sep 2020 15:18:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YdW/H3O0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="bC20eOwY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95BA722286 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=GbZlCF5xToBytDPvu+7FEHyEjbCofoFtKTp0wkuBsFg=; b=YdW/H3O0hXg4MPJnMy5npO08qr pOz4M5mJqrhTuOh9HNLV5FQH5RkcO8sBgGu+XT+fXdaNYiFdbY7mb0wEHwEhRIgOZurFGLxJu5KZ5 qdwS2qxZ7nM2uiPP61HX2ildOHztXsrXS1nlaeFE2jaA/tzn/1m07y+VVkfspskb3GlNosiH/ouyf EujT+N016/EHxRar2dmF7yLCCQJMe+qgPyUiqjsE5Fc/zsFyKdCyDDmJWwf28WeEgMldEpRtZ8Mdz YhPCluo48GlYjo46JXcKUB9SJRbl93CF6Nvk7JmgJ1Z4MhnX1GyB5oOsvfhqIYhJV6iOojx9A+xv2 dB8RvR0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG1q2-00010K-G7; Wed, 09 Sep 2020 15:16:46 +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 1kG1pz-0000zq-Ou for linux-arm-kernel@lists.infradead.org; Wed, 09 Sep 2020 15:16:44 +0000 Received: from e123331-lin.nice.arm.com (adsl-204.109.242.29.tellas.gr [109.242.29.204]) (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 5B6BA22240; Wed, 9 Sep 2020 15:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599664602; bh=vLcbpNnan0Q9ikoYUFHXD8BV6Bv0VtlMkv6yFnjnxqo=; h=From:To:Cc:Subject:Date:From; b=bC20eOwYllY4VpagoF1zjyK8WcH8S9wOtNszc9xFAJvY1uyGUUDUGkYzgNa4og026 EhZXztxmYuG4m/x6HWyrpkGtF3oJinzLDcTyozTaa21LsPHEwAQGdBuptkfOgpdUL0 6Vsl13MHMhZ09SnVu5jdZYxT/xZ50Jz7Ub0Dyd/I= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Subject: [PATCH RFC/RFT 0/3] efi/libstub: arm32: Remove dependency on dram_base Date: Wed, 9 Sep 2020 18:16:20 +0300 Message-Id: <20200909151623.16153-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-20200909_111643_898620_3C2F3883 X-CRM114-Status: GOOD ( 13.99 ) 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: Etienne CARRIERE , Francois Ozog , Maxim Uvarov , Rouven Czerwinski , Takahiro Akashi , Heinrich Schuchardt , Ilias Apalodimas , Patrice CHOTARD , Patrick DELAUNAY , Jens Wiklander , Atish Patra , Grant Likely , Palmer Dabbelt , Christophe Priouzeau , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Sumit Garg 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 Maxim reports boot failures on platforms that describe reserved memory regions in DT that are disjoint from system DRAM, and which are converted to EfiReservedMemory regions by the EFI subsystem in u-boot. As it turns out, the whole notion of discovering the base of DRAM is problematic, and it would be better to simply rely on the EFI memory allocation routines instead, and derive the FDT and initrd allocation limits from the actual placement of the kernel (which is what defines the start of the linear region anyway) Finally, we should be able to get rid of get_dram_base() entirely. However, as RISC-V only just started using it, we will need to address that at a later time. Cc: Maxim Uvarov Cc: Heinrich Schuchardt Cc: Atish Patra Cc: Palmer Dabbelt Cc: Jens Wiklander Cc: Francois Ozog Cc: Etienne CARRIERE Cc: Takahiro Akashi Cc: Patrice CHOTARD Cc: Sumit Garg Cc: Grant Likely Cc: Ilias Apalodimas Cc: Christophe Priouzeau Cc: Rouven Czerwinski Cc: Patrick DELAUNAY Ard Biesheuvel (3): efi/libstub: Export efi_low_alloc_above() to other units efi/libstub: Use low allocation for the uncompressed kernel efi/libstub: base FDT and initrd placement on image address not DRAM base arch/arm/include/asm/efi.h | 6 +- arch/arm64/include/asm/efi.h | 2 +- drivers/firmware/efi/libstub/arm32-stub.c | 177 ++++---------------- drivers/firmware/efi/libstub/efi-stub.c | 2 +- drivers/firmware/efi/libstub/efistub.h | 3 + drivers/firmware/efi/libstub/relocate.c | 4 +- 6 files changed, 47 insertions(+), 147 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel