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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_1 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 E4784C43461 for ; Wed, 9 Sep 2020 15:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 947A62065E for ; Wed, 9 Sep 2020 15:42:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="jByNQsxq"; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="jByNQsxq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729449AbgIIPmd (ORCPT ); Wed, 9 Sep 2020 11:42:33 -0400 Received: from mail-am6eur05on2080.outbound.protection.outlook.com ([40.107.22.80]:65217 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730413AbgIIPlp (ORCPT ); Wed, 9 Sep 2020 11:41:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=jByNQsxq3O/bDjARyYwOde1TJcjRu2SHRFDoNins5fVLDymORWy7iYOVO7x6WlHg/eVyh58KqnmkdmNi8m93vFX2eua85rcxqceuBdC8r70KCJDqUS/QRhiCea8qUyQ6CAecfaKaPAeH7uK6rrZXSTe3mbZ6ToQp+YvQ/OfpU5U= Received: from DB6PR07CA0102.eurprd07.prod.outlook.com (2603:10a6:6:2c::16) by VE1PR08MB4750.eurprd08.prod.outlook.com (2603:10a6:802:a2::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Wed, 9 Sep 2020 15:25:59 +0000 Received: from DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::75) by DB6PR07CA0102.outlook.office365.com (2603:10a6:6:2c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.5 via Frontend Transport; Wed, 9 Sep 2020 15:25:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; vger.kernel.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;vger.kernel.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT051.mail.protection.outlook.com (10.152.21.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 15:25:59 +0000 Received: ("Tessian outbound 34b830c8a0ef:v64"); Wed, 09 Sep 2020 15:25:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a6bcfa01693a2049 X-CR-MTA-TID: 64aa7808 Received: from d5360866c24d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9015DB74-66C0-4351-A159-55DAD22CC4A4.1; Wed, 09 Sep 2020 15:25:43 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d5360866c24d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Sep 2020 15:25:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fit//n6TztDj7vrJKSxPCCEdPu9e3LC+jbDGNhYb/CO5WOzteEq6ODCbPksVxZmHH01GqUOsY7rT8x8i37UAa16w50AlU6GOj7DLOZIoB+JtUwl5xfZwIi+Radszq2DxUTRamJCyPRFFtrRmgfp668/Fhb1WIPwEl8oCfnKIinO+ADFOjpLD1ggDbYUTgizIqskZ/pJWs/UuoF8o7iQKGFinIePgOpf3RK3z0T2txZClh5hvyFVHyHQH9wz59PKs2GwvcCnnmX3DhRcadA9zSdalX4YGvmSjnZWtt4/PS/5OeKYdJaIQuHkmRGRgKAMCxnKgV9kgZMs9c8HWNSVfJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=nrI394J902SR/avhW19MFz75uJwb1TsI+tB83ahgRDaGF/i1tBKZjy9x/dfVAqCFDkDZm4Gmg2/uweTCsj2KLDaQKldzB/BS+TdaqwF0GkFROoapJKR+iw/I6+p6jHMGCtOX9jlnbND/fjNOw1dlbdNb1/DYSx6aVBtSFy0/u4AjhE08PWZ5eWUg1GyFdH7ABqdSZlJluj+3ZqwR+OIIjv6ZyHufzszoVqTMzhI6AkTEKI1TqXWFaUFlGxdQ3zPNnmzuR77PAJs1kdRpG8p/4PC6qHFuTR6fIGVQLTJVO2IGw/8cP5LO013f7VWkcGUUU/ek3Csjaz+IiYjWx/b7rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=jByNQsxq3O/bDjARyYwOde1TJcjRu2SHRFDoNins5fVLDymORWy7iYOVO7x6WlHg/eVyh58KqnmkdmNi8m93vFX2eua85rcxqceuBdC8r70KCJDqUS/QRhiCea8qUyQ6CAecfaKaPAeH7uK6rrZXSTe3mbZ6ToQp+YvQ/OfpU5U= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) by DB8PR08MB4986.eurprd08.prod.outlook.com (2603:10a6:10:e0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 9 Sep 2020 15:25:40 +0000 Received: from DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::2d77:cba8:3fc8:3d4f]) by DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::2d77:cba8:3fc8:3d4f%3]) with mapi id 15.20.3370.016; Wed, 9 Sep 2020 15:25:40 +0000 Subject: Re: [PATCH RFC/RFT 0/3] efi/libstub: arm32: Remove dependency on dram_base To: Ard Biesheuvel , linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Maxim Uvarov , Heinrich Schuchardt , Atish Patra , Palmer Dabbelt , Jens Wiklander , Francois Ozog , Etienne CARRIERE , Takahiro Akashi , Patrice CHOTARD , Sumit Garg , Ilias Apalodimas , Christophe Priouzeau , Rouven Czerwinski , Patrick DELAUNAY , nd References: <20200909151623.16153-1-ardb@kernel.org> From: Grant Likely Message-ID: <5b4c9d0f-d0c1-4627-d000-3bdf093b252a@arm.com> Date: Wed, 9 Sep 2020 16:25:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: <20200909151623.16153-1-ardb@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0201.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::21) To DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.16.178] (188.30.219.21) by LO2P265CA0201.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 15:25:38 +0000 X-Originating-IP: [188.30.219.21] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dd4799af-5365-43d1-06d7-08d854d4a76f X-MS-TrafficTypeDiagnostic: DB8PR08MB4986:|VE1PR08MB4750: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1dxJQ0mc8mYhaPouiuLPMoeKsZpGXUyJBRnxdyH97E89PLdZhW9zK2uX15WLn7E5N5dhlvClaC1mfLiyREQfze7G50Qz+46zV1+XXOMAcv4VaskBvRCvT3RYTH2vw+q98cN3+Dkwm7FM2AUG14tCSDvuSVRo5FhdTJBiMbWw2FuhdlhKoBYAMHou8nQVa1KlQY7RsGIOYk7Mw1hHtq10VuLYXpVJunHYMRqx2kmJAE3PdyRwMj1Fix0wF6tcxSTDKJ+WLWSjTm2OFqg64dx8inDWAy2NHHxoJ89+Hogt2DQ/LN5gQ7jPKMgfipF7fTRCg1iCsret2uuoHTgBwopnBjvCtuIkdsEYQlpK4F3y7B/FVvzTY7t28CnZrvAygcRj X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB4010.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(316002)(2906002)(55236004)(44832011)(8676002)(52116002)(26005)(478600001)(6486002)(956004)(5660300002)(53546011)(83380400001)(31696002)(16576012)(2616005)(186003)(4326008)(54906003)(86362001)(8936002)(31686004)(36756003)(7416002)(66476007)(16526019)(66556008)(66946007)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 9Aa5Xaj2Ldzk24jhgqx3srw2cMQAJGYqlhLdbiXEJW8w8JXzIgLKsXwDGbh6tEuBA6kU0B0uXhiD/uCG9Sw1BhIv/65aRS6kEMjEc6VJYCdcagILdDJ8zt7UGVq231N3EbiKHh8pq6xhiuaGJhcRoSUAW0P2/McWFGckEo0+p/xNOKVZMCfpx9Eh/8QIgIDlCBLil4JbLvn6ym0LnobWKCyayLEr+y4Zp5FUFhssvp30LVEGjtaqZYB8kqdcm3zdnBf3fR7cA5E9Hws1L/+0hUiPRUXMtxrM+iD2LDYM+eQx/KFM5/TbBIOWlPVPfK+OXhmVVa2pIsa2khMbuqEKfVHv8X1Qo8Gl1oP0heATevbwumwJnPgN0ZhVBjMwT3BXNL2G61Rym89VpO9DWQ/ji9YL+o/p/tEGBbuCHC7Vr3/7acz1NhkVUAkyXbYyvF5kITKqkAj1QdVd50oclqkbr1hSx90yPQlVZjMMmWnrU9dJAC/lIvvL3ZvQJ6FnXoW3oakrM9m7ke4/KnOndZFiww9xK0LIwNimsilBe140Vz5tqOn91mDlwFdpqGbAgTTIDpWb6jWgXA2XToNpMjSbPaHy556eXoUOAoiVR2KmVPrdXHRF2mmOOKGFBrNWrSm49/HKpx4E89sxUSuhO8Oyqg== X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4986 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f4d31406-9afe-4ea4-cdfc-08d854d49c21 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /5VJ5rkLhs8xwK9dxB9fcS46rdUz1aPR9H07R0tP/op5ScEfvkWWFag/ASO0FCdSmAfla1IzAUsgp0GQvrvplqVgZq3ovCj950SrDiGKQrwTiMQaNsLGGZiMGqGWRSJKA3RoDjXpK01tFxb+jo0fZoYtcIBmCBL4T9pNid7jnCET184YxBFgqSeY1UEz01GIg4FpEO2lDxbVNv0pXsdLjRuR7vJMITzi2wLyGRimVPrlaNquhB+N7qG/A9ZfZrA+RWcKbsOITY4SfZzwarZecvVRIRxRE2CTNlxrlBjDVuUVfg67tjppddLYhn6SXBHcW6CdfVblpjZM/xncYz8nbZ5Y8xll2in84nwTAVGL4JIbOp1s+BK6vtOTsapjWFBdtXF55Bw0H+DP2iUMTtssFPi4Y980AfE3+kdKXkUYQjLR8YhCohSfwJ3ApZ8TIW0N X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(376002)(346002)(396003)(136003)(39860400002)(46966005)(26005)(4326008)(55236004)(6486002)(956004)(44832011)(2616005)(8936002)(47076004)(8676002)(2906002)(16576012)(36756003)(83380400001)(316002)(478600001)(16526019)(336012)(53546011)(82310400003)(82740400003)(186003)(54906003)(31686004)(70206006)(86362001)(31696002)(5660300002)(356005)(70586007)(81166007)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2020 15:25:59.1686 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd4799af-5365-43d1-06d7-08d854d4a76f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4750 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On 09/09/2020 16:16, Ard Biesheuvel wrote: > 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. Looks reasonable to me. Presumably all special cases (platform specific spin tables, etc) are covered as reserved in the UEFI memory map, correct? g. > > 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(-) > 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 85AA0C43461 for ; Wed, 9 Sep 2020 15:27:40 +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 158D922272 for ; Wed, 9 Sep 2020 15:27:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W4DPoWli"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="jByNQsxq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="jByNQsxq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 158D922272 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mkmsm71jSuPuUdewdFzEJBQVVPDoj/N0Rv9L+lW1d/w=; b=W4DPoWlil7lVWhlosVlQZJWxO B3NSm+BpN9El6WsjJ+JPdvWnwVlShB3dVhMcPKOT+1TCI8BfXhbp4mlCEjH7pvuUnUNr0h33JO3mZ 6+r9GKnAXJihU/UaJkbXqW0cNF71iynuob7pbuAq1lu+3Exbj49x9Foc+zL4LlP1ixvwzz5cbed4K aRHaL/5Kq2aalxVFaB34ePUbXTcLswAkXKl8DPv/90QkSoLfOYat+d7XNDKG3Br8cLTGcaAuR1JJR 9Y4Q1JTI92GZ3rG1JO448FXJeTtHfqD5TYVVcIG4Suj3OedEirt7SQOAodE2rrEdsCeU9AxZPlHqh PmGUWRCEA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG1z9-0004HS-0Z; Wed, 09 Sep 2020 15:26:11 +0000 Received: from mail-eopbgr90045.outbound.protection.outlook.com ([40.107.9.45] helo=FRA01-MR2-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG1z2-0004DJ-H5 for linux-arm-kernel@lists.infradead.org; Wed, 09 Sep 2020 15:26:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=jByNQsxq3O/bDjARyYwOde1TJcjRu2SHRFDoNins5fVLDymORWy7iYOVO7x6WlHg/eVyh58KqnmkdmNi8m93vFX2eua85rcxqceuBdC8r70KCJDqUS/QRhiCea8qUyQ6CAecfaKaPAeH7uK6rrZXSTe3mbZ6ToQp+YvQ/OfpU5U= Received: from AM5PR0202CA0021.eurprd02.prod.outlook.com (2603:10a6:203:69::31) by PR2PR08MB4683.eurprd08.prod.outlook.com (2603:10a6:101:27::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 9 Sep 2020 15:25:59 +0000 Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:69:cafe::97) by AM5PR0202CA0021.outlook.office365.com (2603:10a6:203:69::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 15:25:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.infradead.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.infradead.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 15:25:59 +0000 Received: ("Tessian outbound 34b830c8a0ef:v64"); Wed, 09 Sep 2020 15:25:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a6bcfa01693a2049 X-CR-MTA-TID: 64aa7808 Received: from d5360866c24d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9015DB74-66C0-4351-A159-55DAD22CC4A4.1; Wed, 09 Sep 2020 15:25:43 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d5360866c24d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Sep 2020 15:25:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fit//n6TztDj7vrJKSxPCCEdPu9e3LC+jbDGNhYb/CO5WOzteEq6ODCbPksVxZmHH01GqUOsY7rT8x8i37UAa16w50AlU6GOj7DLOZIoB+JtUwl5xfZwIi+Radszq2DxUTRamJCyPRFFtrRmgfp668/Fhb1WIPwEl8oCfnKIinO+ADFOjpLD1ggDbYUTgizIqskZ/pJWs/UuoF8o7iQKGFinIePgOpf3RK3z0T2txZClh5hvyFVHyHQH9wz59PKs2GwvcCnnmX3DhRcadA9zSdalX4YGvmSjnZWtt4/PS/5OeKYdJaIQuHkmRGRgKAMCxnKgV9kgZMs9c8HWNSVfJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=nrI394J902SR/avhW19MFz75uJwb1TsI+tB83ahgRDaGF/i1tBKZjy9x/dfVAqCFDkDZm4Gmg2/uweTCsj2KLDaQKldzB/BS+TdaqwF0GkFROoapJKR+iw/I6+p6jHMGCtOX9jlnbND/fjNOw1dlbdNb1/DYSx6aVBtSFy0/u4AjhE08PWZ5eWUg1GyFdH7ABqdSZlJluj+3ZqwR+OIIjv6ZyHufzszoVqTMzhI6AkTEKI1TqXWFaUFlGxdQ3zPNnmzuR77PAJs1kdRpG8p/4PC6qHFuTR6fIGVQLTJVO2IGw/8cP5LO013f7VWkcGUUU/ek3Csjaz+IiYjWx/b7rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CFrH/6NKWIqWEQPwpPwuNSWlJbA+aKsUvES/mkmMYcA=; b=jByNQsxq3O/bDjARyYwOde1TJcjRu2SHRFDoNins5fVLDymORWy7iYOVO7x6WlHg/eVyh58KqnmkdmNi8m93vFX2eua85rcxqceuBdC8r70KCJDqUS/QRhiCea8qUyQ6CAecfaKaPAeH7uK6rrZXSTe3mbZ6ToQp+YvQ/OfpU5U= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) by DB8PR08MB4986.eurprd08.prod.outlook.com (2603:10a6:10:e0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 9 Sep 2020 15:25:40 +0000 Received: from DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::2d77:cba8:3fc8:3d4f]) by DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::2d77:cba8:3fc8:3d4f%3]) with mapi id 15.20.3370.016; Wed, 9 Sep 2020 15:25:40 +0000 Subject: Re: [PATCH RFC/RFT 0/3] efi/libstub: arm32: Remove dependency on dram_base To: Ard Biesheuvel , linux-efi@vger.kernel.org References: <20200909151623.16153-1-ardb@kernel.org> From: Grant Likely Message-ID: <5b4c9d0f-d0c1-4627-d000-3bdf093b252a@arm.com> Date: Wed, 9 Sep 2020 16:25:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: <20200909151623.16153-1-ardb@kernel.org> Content-Language: en-US X-ClientProxiedBy: LO2P265CA0201.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::21) To DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.16.178] (188.30.219.21) by LO2P265CA0201.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 15:25:38 +0000 X-Originating-IP: [188.30.219.21] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ff0b9962-6359-4984-ff42-08d854d4a774 X-MS-TrafficTypeDiagnostic: DB8PR08MB4986:|PR2PR08MB4683: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1dxJQ0mc8mYhaPouiuLPMoeKsZpGXUyJBRnxdyH97E89PLdZhW9zK2uX15WLn7E5N5dhlvClaC1mfLiyREQfze7G50Qz+46zV1+XXOMAcv4VaskBvRCvT3RYTH2vw+q98cN3+Dkwm7FM2AUG14tCSDvuSVRo5FhdTJBiMbWw2FuhdlhKoBYAMHou8nQVa1KlQY7RsGIOYk7Mw1hHtq10VuLYXpVJunHYMRqx2kmJAE3PdyRwMj1Fix0wF6tcxSTDKJ+WLWSjTm2OFqg64dx8inDWAy2NHHxoJ89+Hogt2DQ/LN5gQ7jPKMgfipF7fTRCg1iCsret2uuoHTgBwopnBjvCtuIkdsEYQlpK4F3y7B/FVvzTY7t28CnZrvAygcRj X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR08MB4010.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(316002)(2906002)(55236004)(44832011)(8676002)(52116002)(26005)(478600001)(6486002)(956004)(5660300002)(53546011)(83380400001)(31696002)(16576012)(2616005)(186003)(4326008)(54906003)(86362001)(8936002)(31686004)(36756003)(7416002)(66476007)(16526019)(66556008)(66946007)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 9Aa5Xaj2Ldzk24jhgqx3srw2cMQAJGYqlhLdbiXEJW8w8JXzIgLKsXwDGbh6tEuBA6kU0B0uXhiD/uCG9Sw1BhIv/65aRS6kEMjEc6VJYCdcagILdDJ8zt7UGVq231N3EbiKHh8pq6xhiuaGJhcRoSUAW0P2/McWFGckEo0+p/xNOKVZMCfpx9Eh/8QIgIDlCBLil4JbLvn6ym0LnobWKCyayLEr+y4Zp5FUFhssvp30LVEGjtaqZYB8kqdcm3zdnBf3fR7cA5E9Hws1L/+0hUiPRUXMtxrM+iD2LDYM+eQx/KFM5/TbBIOWlPVPfK+OXhmVVa2pIsa2khMbuqEKfVHv8X1Qo8Gl1oP0heATevbwumwJnPgN0ZhVBjMwT3BXNL2G61Rym89VpO9DWQ/ji9YL+o/p/tEGBbuCHC7Vr3/7acz1NhkVUAkyXbYyvF5kITKqkAj1QdVd50oclqkbr1hSx90yPQlVZjMMmWnrU9dJAC/lIvvL3ZvQJ6FnXoW3oakrM9m7ke4/KnOndZFiww9xK0LIwNimsilBe140Vz5tqOn91mDlwFdpqGbAgTTIDpWb6jWgXA2XToNpMjSbPaHy556eXoUOAoiVR2KmVPrdXHRF2mmOOKGFBrNWrSm49/HKpx4E89sxUSuhO8Oyqg== X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4986 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f4d31406-9afe-4ea4-cdfc-08d854d49c21 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q55J6Cl12wI2MkQdk+ZxT1BPHrwvkbGl6UbptfjxM1lHvW0wPldcfL5ZU2WMRQneXNhHFkf35Tv6mi09zl+2wI6ZN4NGiCrIUaedj9ZqPwjwDbJFARV9s1sG6WlLuMYFYEyOn4JkiBcf8MK5WHqWkj/C0P8pwVghiBj0+UF/4zPhu+6iLMxX2K1rEdqj/M31/+UpNzhc9Jd5RQh4Qb7YAmn+qjwV8ZffEet46NCH3pa6GAh0WjVCXBeiHk1Wc7SZPfQeFmscMEKWBGAMKm1ztcEEfN689/w5ShbxkgrP0b8VTdMjgWdrlLdeRxdKYm/JmCAS2goj3XZXLeCWAIu5lHLxPFe421UokLPqdUPgIuM8AAqpPYwK/4siHYaCF+GpSt+9olEoBbgm8eZ31OTyqRT0sHcI0L0gXjSVitgzJPBKGA0506+LlkXfgaNYlFDw X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(136003)(376002)(39860400002)(396003)(346002)(46966005)(8676002)(478600001)(82740400003)(55236004)(47076004)(82310400003)(81166007)(4326008)(356005)(336012)(31686004)(2906002)(16526019)(83380400001)(186003)(36906005)(26005)(44832011)(54906003)(16576012)(5660300002)(8936002)(86362001)(2616005)(956004)(70206006)(70586007)(316002)(6486002)(36756003)(31696002)(53546011)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2020 15:25:59.1568 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff0b9962-6359-4984-ff42-08d854d4a774 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4683 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_112604_859338_438FCCCD X-CRM114-Status: GOOD ( 20.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: Etienne CARRIERE , Francois Ozog , Maxim Uvarov , Rouven Czerwinski , Takahiro Akashi , Heinrich Schuchardt , Ilias Apalodimas , Patrice CHOTARD , Patrick DELAUNAY , Atish Patra , Palmer Dabbelt , Christophe Priouzeau , nd , Jens Wiklander , linux-arm-kernel@lists.infradead.org, Sumit Garg Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/09/2020 16:16, Ard Biesheuvel wrote: > 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. Looks reasonable to me. Presumably all special cases (platform specific spin tables, etc) are covered as reserved in the UEFI memory map, correct? g. > > 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(-) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel