Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1497630rwl; Fri, 31 Mar 2023 12:03:45 -0700 (PDT) X-Google-Smtp-Source: AKy350aZJPL06lTjP8FSNNZYwWOqvVi3LBPXxT1y5XRg0uvmP11FZLKmTVRh6U678ubhs7RCu0UT X-Received: by 2002:a05:6402:1e93:b0:501:ea97:5192 with SMTP id f19-20020a0564021e9300b00501ea975192mr30234684edf.4.1680289424998; Fri, 31 Mar 2023 12:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680289424; cv=none; d=google.com; s=arc-20160816; b=hQzj8vGWFE0Kom+WC/8L+CXET6SlY1XD9yeRTveyO3oG/ZfhSOuEFsOQxshof9j4l8 1C6hcJeVoIUkyNhYX6NP9Vt56h/ZE22GbAo5Y+wEya3wDU5A3glipCO6WZc0i6HzLgzv pwT1hqTd7QLdEGhcsiVOVd4NBTOgWUMzpdZPcWlXQyaPrk31rmoj2vpLsoO3XEDcd0Mq ll5Uj01nBYCYOUt2JDooOtDkfn5LFPbi5ktolHsi/oe3k/uhyyVSMFhIQUAN++p7FClT oEwW3YxFz4r8wlshUJ0hY0S9VfAF7IZq8OK6mNdCD6rqMb3fP7q4UJLYXii43asEy+8j KlgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+Op2hvo1QpmD4q1fBgDvpflzYt4ille90lJOYkm9McQ=; b=u/qHtjgHVpeHlWKqS8qjxsOPIX8RIjmHCharA4cmSuktf4cw9aWLYGJ2rHpvHtnX5W kJsJwlt1A9onnERhxT6Cu98yiy6czFzl0CD1vL61YCOC31yiRBIkBKLyJvvDt5580knE TkI1o10Cc9MR0oo16my070Re8CVEwlERQ2cGKZccMbi7r80mVOIk2t2SZ5jI/T2fih30 gXrDgA3fWyUGD7rmS6tPSPz3dyUtqNmfq6WSr/QJ8oXJt6aL5TL3geQBMdCweZ03vcYR E3L2KfvxR/GZuN+1y/hTlEK9Kx9sQRH3r/PozFimoYUNFVmwYcFyxDLsk3iL0DsSIxwC Dhgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=I9MBLXsc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id le26-20020a170907171a00b00928798bfefcsi1992205ejc.465.2023.03.31.12.03.19; Fri, 31 Mar 2023 12:03:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=I9MBLXsc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbjCaTDI (ORCPT + 99 others); Fri, 31 Mar 2023 15:03:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjCaTDH (ORCPT ); Fri, 31 Mar 2023 15:03:07 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054D622903 for ; Fri, 31 Mar 2023 12:03:06 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id g17so30204780lfv.4 for ; Fri, 31 Mar 2023 12:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1680289384; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+Op2hvo1QpmD4q1fBgDvpflzYt4ille90lJOYkm9McQ=; b=I9MBLXscoVftIVV9CjCEAHOLc8es0K+E7ZAIKRZSAuC79s8JCWAbcfd1/wUUY2D1HQ qqYcbYBp9j38efRMctWg4KhDrinDHH5RMfqVpMBTCL4Pk5KAEY8YYLgbdBmp5lNBd4WX WBc1Yn7iuEmqLxYw2OFLb+mQtYK5mlHl0JUwNLCzNVz+0GIhP2VGQ8Kctjbx/6443Naz LZCatuF8uyuce31qb7oKNBD0H88jyGp68xeFcevSTSVJbS9mpFdEBMKyuWIBKJiEr2z3 maWg/ujFK92UZ5pkT8/UrO2C4mPvcUCyo0eGZRpGS2QfuAbUsDWyZRFIM1W4el2h38OR Ai8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680289384; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Op2hvo1QpmD4q1fBgDvpflzYt4ille90lJOYkm9McQ=; b=dRvaUukWDx+O0TYOhn0/Ggvb+XOr3KxZd6TRJNncYAF4Nb5LtgzUXSRlnxZeZqZe2d kIW7Lu7Pc7pMpekIz+vMrHudfPVr4wuzlSC/vj9ko5BYwff348uj5oJClS8YlOY+Wul5 QAL1pjWdJqjNSQgiwqt9q3wO3c+cluk9Kz0kOFn7V+AwhElkGcnH5FthrTbEvmSJfzqA 81CSNyrbJNXW9siRZZfYy6gOKYGY4TH/WV3XsN6ZyArmyve4dgS01XSH63mjc9crhKIE 82Yw0ciRTKog4qIw3jtlZkigF6ffCS6SztuYuFTGufWHZqVGR3+AuCq1cQtDRzxujHrO QnWw== X-Gm-Message-State: AAQBX9elICrZSQflOUMDoN7OMFxvLMBeHYV5kVpwjTuWj8KUl1/vE3ph kmWU0xJcJzO4NRXa5XlUXTyWjca8sv+AR9sBhWRAjg== X-Received: by 2002:ac2:4470:0:b0:4eb:304f:66ea with SMTP id y16-20020ac24470000000b004eb304f66eamr823973lfl.13.1680289384305; Fri, 31 Mar 2023 12:03:04 -0700 (PDT) MIME-Version: 1.0 References: <20230331182727.4062790-1-evan@rivosinc.com> <25837ca5-b709-4d20-912b-ab13e6353069@spud> In-Reply-To: <25837ca5-b709-4d20-912b-ab13e6353069@spud> From: Evan Green Date: Fri, 31 Mar 2023 12:02:28 -0700 Message-ID: Subject: Re: [RFC PATCH] riscv: dts: nezha-d1: Add memory To: Conor Dooley Cc: linux-sunxi@lists.linux.dev, conor.dooley@microchip.com, Albert Ou , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Rob Herring , Samuel Holland , Trevor Woerner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 31, 2023 at 11:39=E2=80=AFAM Conor Dooley wr= ote: > > On Fri, Mar 31, 2023 at 11:27:27AM -0700, Evan Green wrote: > > Add memory info for the D1 Nezha, which seems to be required for it to > > boot with the stock firmware. Note that this hardcodes 1GB, which is > > not technically correct as they also make models with different amounts > > of RAM. > > > Is the firmware supposed to populate this? > > Yup. Samuel intentionally did it this way: > https://lore.kernel.org/linux-riscv/8a2194bf-93bd-de4d-8d39-0cd72aabb0a9@= sholland.org/ > > Since I don't like using the firmware provided stuff to more easily > test I do this in my u-boot boot script: > > tftp 0x54000000 d1-fitImage.fit > bootm start 0x54000000 > bootm loados 0x54000000 > bootm ramdisk; > bootm prep; > fdt memory 0x40000000 0x20000000 > bootm go; > > Hope either of the above are helpful, > Conor. Ah, I see, thanks for the pointers. I've got whatever firmware came with the "dd and go" Fedora image I found on the internet somewhere, which doesn't seem to do the memory node population for me. I've been hesitant to rebuild the firmware as I don't want to break the Fedora "safe OS", and if there's a way to get mired in some build environment, I seem to have a nose for finding it. I'll probably just keep the patch locally in my tree, and if I'm forced to update the firmware for some other reason I'll try removing it. -Evan