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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 A34DFC433DF for ; Tue, 19 May 2020 12:11:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 749D92072C for ; Tue, 19 May 2020 12:11:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LaRr86U8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 749D92072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K/YDbJk8TAbANl+QTRyTndPybGmVlAHg2C4EFnR806s=; b=LaRr86U8Dc8RM+ T9baT7Zi1I8vp+LenoBeZkAnKBo8OcS0ALxzIQFy3BzaaGrREHzyh/b2IVtNMf/YzJIB8JCX7Augy zjIdX/algr9IuJqJH4MuS+EVkA/Pk3OKk2eX24csNFfguXXXFzMSbHncp1VSBNBoer7Gc4dmkYidO qV3b9YoRdr2ISVqJkMmhZtpXrmkIxDFFGIsgWws+Ep2oqi11p+kwR88YdCygzBBG2C5kfTdwfBaiW UqkhClBU8fZHuCsuMJVkamkwoIseoKFQCdzmUC15t0wcsRdVqXGhn5ZLKDeTEaWRd3TYJQflusdZj Nd4M2THBEKSS/1KiBgrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jb15r-0002vN-48; Tue, 19 May 2020 12:11:35 +0000 Received: from mail-oo1-f66.google.com ([209.85.161.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jb15o-0002uw-8S for linux-arm-kernel@lists.infradead.org; Tue, 19 May 2020 12:11:33 +0000 Received: by mail-oo1-f66.google.com with SMTP id p123so2753814oop.12 for ; Tue, 19 May 2020 05:11:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YzPr5ME/rx0mm8f1HXcVFMEaGYLRdecJyu3Hp8Rox/0=; b=kaYZmX4wqt/t5yGDvCZhOH1nzQqxHYwKDm3/0PLz0DJrj6r/twzO/cjxYY8tGpN33B xl9iPI3oianszc/P2GHOOFYBwok/OcRz9K+FKlYRBUgeQ/RonpVHZz0es5IkNrTzvAJf rYX2JRnoW3fccI+vvROCERqYACPBJKdaqHbnSQj0Sh9o7DKLzPu07ksPWbLGvmGekib/ ijoocIVX++Ppn2/T2pECxyzQGlrdGB0UkNz5y955SqiccfOAlGwqyQVM5Dgs0J3OwLnm T8y2ffMqjIAyyaV+Xqeyu98Wy0bJsBF+5dnVu0bmd2S3qpCT7RYpno7hKtLztB2kq+M5 e74Q== X-Gm-Message-State: AOAM533R01uxUtl6ee/IlfktKCZGmG+HEUaZxylTXJflvrpqMNIBhV/o U0g0buOWLetbIcWV2xCHnIXlC4gAACXSBL8MifI= X-Google-Smtp-Source: ABdhPJyRSziZNrfSrilLC08tU525imlrr6yhGihg5O4ZATTVfbhCA5/40gAFoQqsQv6KSsH1dU3TNKmkqJKDRrsQJwc= X-Received: by 2002:a4a:95d0:: with SMTP id p16mr16485117ooi.40.1589890287441; Tue, 19 May 2020 05:11:27 -0700 (PDT) MIME-Version: 1.0 References: <20200429082120.16259-1-geert+renesas@glider.be> <20200519094637.GZ1551@shell.armlinux.org.uk> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 19 May 2020 14:11:14 +0200 Message-ID: Subject: Re: [PATCH v6] ARM: boot: Obtain start of physical memory from DTB To: Arnd Bergmann X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200519_051132_301056_FFA7DE6E X-CRM114-Status: GOOD ( 22.07 ) 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: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Grant Likely , Nicolas Pitre , Masahiro Yamada , Bartlomiej Zolnierkiewicz , Lukasz Stelmach , Russell King - ARM Linux admin , Linux Kernel Mailing List , Linux-Renesas , Chris Brandt , Rob Herring , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Eric Miao , Dmitry Osipenko , Ard Biesheuvel , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Arnd, On Tue, May 19, 2020 at 1:28 PM Arnd Bergmann wrote: > On Tue, May 19, 2020 at 1:21 PM Geert Uytterhoeven wrote: > > On Tue, May 19, 2020 at 11:46 AM Russell King - ARM Linux admin > > wrote: > > > > > > > > However, something under /chosen should work. > > > > > > Yet another sticky plaster... > > > > IMHO the old masking technique is the hacky solution covered by > > plasters. > > > > DT describes the hardware. In general, where to put the kernel is a > > software policy, and thus doesn't belong in DT, except perhaps under > > /chosen. But that would open another can of worms, as people usually > > have no business in specifying where the kernel should be located. > > In the crashkernel case, there is a clear separation between memory to > > be used by the crashkernel, and memory to be solely inspected by the > > crashkernel. > > > > Devicetree Specification, Release v0.3, Section 3.4 "/memory node" says: > > > > "The client program may access memory not covered by any memory > > reservations (see section 5.3)" > > > > (Section 5.3 "Memory Reservation Block" only talks about structures in > > the FDT, not about DTS) > > > > Hence according to the above, the crashkernel is rightfully allowed to > > do whatever it wants with all memory under the /memory node. > > However, there is also > > Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt. > > This suggests the crashkernel should be passed a DTB that contains a > > /reserved-memory node, describing which memory cannot be used freely. > > Then the decompressor needs to take this into account when deciding > > where the put the kernel. > > > > Yes, the above requires changing code. But at least it provides a > > path forward, getting rid of the fragile old masking technique. > > There is an existing "linux,usable-memory-range" property documented > in Documentation/devicetree/bindings/chosen.txt, which as I understand > is exactly what you are looking for, except that it is currently only > documented for arm64. Thank you, that looks appropriate! It seems this is not really used by the early startup code. Is that because the early startup code always runs in-place, and the kernel image is not even copied? > Would extending this to arm work? Let's see.... Th arm early boot code seems to be more complex than the arm64 code ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel