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.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E22E8C4338F for ; Sun, 8 Aug 2021 13:35:46 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7031760EE7 for ; Sun, 8 Aug 2021 13:35:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7031760EE7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0AFFA8297D; Sun, 8 Aug 2021 15:35:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628429743; bh=NoZH9+KuweBeyGtqJHCQfPFapCCZtTjZ1Tz/q8C6inY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P0GcCu6Db7nYfRwbZgiUAee0OI9f6NDCJwQyhms73CL0inT9wVwZ9jna5NHi9mvVm 0Z6iGDEJgOzhV9Maf/zgf3bx9sHlC/InN3uQvjMw85pWFoXXxngXyTcV7mLPTesYZh 7zx6bDL5ql+H/ihjgsx6GaBpsSqqyhMRNjh6eQiRoSmP+4HrDcjbp43XS3YXKxqRkM S5ovVPPIhvd70ie+7lqNfO5/1YRakAI6FyXo/DL4ySuqd5Fre9F6gW4CXW/O9k8wIZ tHb1rNcSUwuzj4XQ/OP/UfLMpbkYXrmnYUDsm16BhxQTh03yD3nfRcEfZJuvNywmpm BEU2acHU8h76A== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D53A282051; Sun, 8 Aug 2021 15:35:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628429741; bh=NoZH9+KuweBeyGtqJHCQfPFapCCZtTjZ1Tz/q8C6inY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HrHOvxmDnolMXFU5AMEMGZ1DZCInumo4lg6Ncs5AeKQVoqELSz9FNc75/6j4fxGDK wwnsRPrjH+VmAeVihAgpjlbUyghoM9/g3wspdR8KucH407GzkUymAT2T/DHHNHRNZ/ N29+iOdecaG1xrAQrYNJCDMJM3xrJWfuRj0O5md7k6psHtL4s0KVfpHzZH/HxSaIZ+ OI9Ak1bRX3w/a0fAEpidjr687OHYOIZifj1/AJVKQJXg1ZjvGEzuRg61tRDX6H49Zb iXSvOXHqr6yY1tt62PI0ZR+zb2s8Pw55AR940ytMl+c3k0FAUdMERieGbZwAIC71VU 8X+YH9kiEyYiA== Subject: Re: [PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64" To: Tom Rini Cc: Jan Kiszka , U-Boot Mailing List , Hai Pham , Simon Goldschmidt , Stephen Warren , Lokesh Vutla References: <1971775f-28de-83d0-9459-a4e68c744a18@siemens.com> <20210729152307.GP9379@bill-the-cat> <20210729165802.GA9379@bill-the-cat> <446b4861-6987-092a-43ce-5d3aa322f8f3@denx.de> <20210802130008.GR9379@bill-the-cat> <4046119c-c61c-ed49-92e6-dee5f8c67b3c@denx.de> <20210805233103.GS858@bill-the-cat> From: Marek Vasut Message-ID: <00d6ae19-5990-e9db-30b9-a10cc2fa5b84@denx.de> Date: Sun, 8 Aug 2021 15:35:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210805233103.GS858@bill-the-cat> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 8/6/21 1:31 AM, Tom Rini wrote: > On Thu, Aug 05, 2021 at 11:53:24PM +0200, Marek Vasut wrote: >> On 8/2/21 3:00 PM, Tom Rini wrote: >>> On Mon, Aug 02, 2021 at 02:54:22AM +0200, Marek Vasut wrote: >>>> On 7/29/21 6:58 PM, Tom Rini wrote: >>>> >>>> [...] >>>> >>>>>>> so when did rcar3 introduce something there that shouldn't be >>>>>>> reserved? And you had phrased this to me on IRC as about reserving spot >>>>>>> for ATAGS, and that not being needed of course on arm64. But that's not >>>>>>> what's going on. Perhaps the answer is that rcar3 needs to introduce a >>>>>>> board_lmb_reserve to free the normal arch one and provide whatever more >>>>>>> narrow scope it needs. >>>>>> >>>>>> Based on the commit message 2359fa7a878 ("arm: bootm: Disable LMB >>>>>> reservation for command line and board info on arm64") , this is about ATAGS >>>>>> and we really don't need to reserve those on arm64. >>>>> >>>>> Commit 2359fa7a878 disables the entire arch_lmb_reserve function on >>>>> aarch64, yes. I assumed when we had talked that it was a small area >>>>> being set aside and perhaps mis-recalled that ATAGS tended to live at >>>>> DDR_BASE + 0x800 or so. >>>> >>>> That arch_lmb_reserve() is responsible for reserving architecture specific >>>> memory. On arm32 it is ATAGS, on arm64 it is nothing as far as I can tell >>>> (and see below regarding the TLB). >>> >>> I don't think that LMB ever covered ATAGS. ATAGS, I could have sworn, >>> were at start of memory + 0x800 or so. This LMB is for the top of >>> memory where U-Boot is. >> >> What is there to protect which Linux does not set up again ? > > What does Linux have to do this with? I don't see, but maybe have > missed, where "U-Boot adds memory region to internal LMB list" is > translated to "Update the device tree Linux will have with these > regions". I do see code to read the reserved-memory regions from a DTB > and add them to our LMB, but not the other direction. The whole LMB reservation is done only after calling bootm (and other boot commands), and the comment in arch/arm/lib/bootm.c arch_lmb_reserve() does indicate the same.