Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4430856pxb; Mon, 27 Sep 2021 17:29:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygXV4j8AOVGUfS/+ury3uuBpDkl7xXw2uyFhAz72iJnwQ1szVvj1yKL6QTuVh/i2yGWIp4 X-Received: by 2002:a63:af4b:: with SMTP id s11mr2015217pgo.185.1632788953177; Mon, 27 Sep 2021 17:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632788953; cv=none; d=google.com; s=arc-20160816; b=qJ94aonMtJ4MyATcYF1j9BM+dLgsThbv1KXrMgHsGiMh5yKYOaCGU6147WDPSISSkH WLQt9YI/odeanhpCbwmcSqqFSTDfkYqYGGE0T4NDkNUG8GGyLFWxgWuFkJYbl/8j2GOe ZM88Q+QjpjpmrlNk3I4Tt852/xHRQENyIIKsQgAG4xhOopkfBU0Bp5mOq9v2GJSc+80f ne6Bw9biynviknEgCIFpRYyRKlNQOp6JWmIQCN5PFwOIFTHjeq10b5sr4l5e9+wfZaXT 1h3Azqe2nFJR4+i48IKXQTBIanQ+cB7SNfHQwJdhRWd5mL6TRVaLNMh5h9Ce/1bhQ2yV LilA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=o+O2oP5PBbznVkw0kl68S5JiNk8ZSLPfew9HvyuC3qQ=; b=TzfOLw3CUdK1MVJjbh3hYC20wM90H8DQN+jf/cDH/t3X1wdUn1cvyoB3VvEAYKYbpo bJrAsKPyTTtkZeY2WwGVi4eA2A/7l87WYE7PFCJVHlA1QTZihzuii2e6gWiQypM6guhN yarPb+jSERnbL3NxMNuynfm3I+Y6fhqoHWPvJ6UXCJWO6jF5t8zpnub4NuY7pPCt0sV/ Mb/et8W3XHFXY7RhWP/t4U3GGk29Ladn7dK5M3dtx7J2ZTEntlPS1FPL3O3auRry6E6j jpzcHc80hUamFDjNtzE4O/mrpq9z0ClpWLMI9U9XoZkVvVw6GkSPfBTkkvbKzNVxJa7Y /hhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V2LwPj5O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 188si23797119pga.6.2021.09.27.17.29.00; Mon, 27 Sep 2021 17:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V2LwPj5O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238314AbhI1A3x (ORCPT + 99 others); Mon, 27 Sep 2021 20:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238277AbhI1A3w (ORCPT ); Mon, 27 Sep 2021 20:29:52 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8605C061575 for ; Mon, 27 Sep 2021 17:28:13 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id q23so17387632pfs.9 for ; Mon, 27 Sep 2021 17:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o+O2oP5PBbznVkw0kl68S5JiNk8ZSLPfew9HvyuC3qQ=; b=V2LwPj5OjmEykE/J8mpGwB3g6M8zqXcDWBz8WFdrLoO8byKAaHYH3fMOwLkhxiXRJG RO3dF8L90Gf6EBILqHOO+rCFlKMfa0cgUI0yzZ3QU/JaCZ9Atlf3b74N/mugYxy1x5nc u8X368N0dlzYThZhclBdU9RVZ2XHzNC+yjVS6GnjJngBcFhKuzkItoCt7CaTqi2+RPvX T0UmPsdQzo6Lk6D2aOslQjBcNEtfKlGf1e6y7W6CxlBM2ioyJStlkCnWCqH/ObOAkI3E DkocQVeJ95OAdSrnOqEKaKTuoxHy1FVBiXb1KYndV6mScg8YyhiSi0KZ6uk9OHBtucr+ t9Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o+O2oP5PBbznVkw0kl68S5JiNk8ZSLPfew9HvyuC3qQ=; b=m37FanbLGqSWg4q47kll3U4QZOCD9ihVVfrLnwqdYpyq8Vn1FfujkwtpbXiBiD9oq8 5B4ZTHadTPmlOgG3jO5LhvYPemy5YmxA68+9SuipJEJ9mQk5Ac1tK1R7U7hapbPqu8Zj LhMoilmU6D07WYSTWmVYbvrx/YKXGMZxQZ9XV9Jov4XDdDGL7laOHGqM7mXsJ2rmIwDq wnOuCA4X684rAH7lvaGR/5rv/2XtgVT1Q3/foRGCNtwUotEZ8gpsw8QVVEBPdMwE11bX aMQ+aL+NOw+CLfcbKSLc+PiWL7cLeiApbAjIJR+Gua41lG6CU5sTJU4AqrURGak6zaP+ /6Ww== X-Gm-Message-State: AOAM532Qywbn3bM8M+VOl+W7Mbw6i0VR54yGLPhvKEDKAK2xo4HiHThY RZbtKWtWk/EeIQaYnpEm0JsR+O9cIIRU/EodQnA= X-Received: by 2002:a05:6a00:78d:b0:447:3496:a301 with SMTP id g13-20020a056a00078d00b004473496a301mr2795810pfu.68.1632788893309; Mon, 27 Sep 2021 17:28:13 -0700 (PDT) MIME-Version: 1.0 References: <87mtnx1rhr.fsf@mpe.ellerman.id.au> In-Reply-To: <87mtnx1rhr.fsf@mpe.ellerman.id.au> From: cp Date: Tue, 28 Sep 2021 02:28:02 +0200 Message-ID: Subject: Re: [PATCH] powerpc/40x: Map 32Mbytes of memory at startup To: Michael Ellerman Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I guess we're not expecting systems with less than 32MB, so making it > unconditional is OK? hi it's not 32MB of total physical ram, but rather using 32MB of the total physical ram to correctly boot a kernel bigger than 8MB. The problem is complex: - u-boot loads things at 0x0200.0000 (in my case) - then cuboot copies the kernel to 0x0090.0000, and appends the flat device tree to the end of kernel - then cuboot copies again the kernel to 0x0000.0000, and invokes head.S at this point head.S needs to initialize the virtual memory, and needs to have 32MB mapped in order to correctly gets the flat device tree if the kernel is smaller than 8MB, then cuboot copies it to 0x0080.0000, and head.S only need to have 16MB mapped in order to gets the flat device tree Cheers