Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1826233pxj; Sat, 12 Jun 2021 23:16:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmtH6bD8E2Ej2Zh9JDMdH968y85hyTbmJLeefXuQ4DBqmnBvTEn7j1dU8YCHw4AUNNkt7t X-Received: by 2002:a17:906:95c8:: with SMTP id n8mr10562771ejy.357.1623564974883; Sat, 12 Jun 2021 23:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623564974; cv=none; d=google.com; s=arc-20160816; b=euWppo+JfDv5buBJPc0pkHXaUkrioTWtmK3slPbGwdZIi7mPct2HFja7Az8sBqrpdM NYDk+fHop6H8pVLzxVwiWVg0BSE5ckT2jAZsCUAUE9TyWNKDXT7PoUkcBnzuk2pwu4Gx fbNrZGXNtJ75l5+L8Z+0WehtNBMQjArYUw2xAelHnKrydBchIsuNODBS5EfK2s3BENce lO5JTXwLi9s0k+SyOsp+JXEQ/sbU+mW7Fm0jox0JHVUGDMn4G6Xk78aOYzC9LXk0QtoX s/cfWHYhyBOHWkcrG+og4EKHL6f2PQc+VJ0DWAAjozLeYGI2FTUqIfKsWFPEIyDCed9r xnnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=7OYb0m99vH2madTbyZW6+C9UBn3LUSa4y6ZYVe8sXbg=; b=X9mWvtjWocHcVxRA/Mvg48fxbQHPrD3nlhsbAXXYVva8ZZ2Uz2FK5W36cIBCBeGaz5 Nix3ed9nSSvbX06r+faEwRP3CbpjB3EIlBFIOJUhR6tgiJb0QugbPoh4z777cmdazRY4 0kr6GRtpQFcW+URGJ5L07rXpZBoK1mE3GDtxUAOvoaV0lfJ5zDFrhAj6+FOz80QAAJLp 6DKiH83aFLLuSHdnTyYscoe+8Y+kWRdNTtkpnA2loBBEYRrBuXI3N/l18Eg61Xt3Lvqx 53dDZYohDreJ6qyiHTstDeRq/2YWlzD4YgR/ubQTg6n4rGWmB8emOzQ1prCz2lXY+0Of hU1Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si9436607ejl.45.2021.06.12.23.15.52; Sat, 12 Jun 2021 23:16:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbhFMGRD (ORCPT + 99 others); Sun, 13 Jun 2021 02:17:03 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:59065 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbhFMGRC (ORCPT ); Sun, 13 Jun 2021 02:17:02 -0400 Received: (Authenticated sender: alex@ghiti.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2C5B0E0006; Sun, 13 Jun 2021 06:14:54 +0000 (UTC) Subject: Re: [PATCH v4 1/4] riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED To: Jisheng Zhang , Palmer Dabbelt Cc: emil.renner.berthing@gmail.com, Paul Walmsley , aou@eecs.berkeley.edu, jszhang@kernel.org, Christoph Hellwig , zong.li@sifive.com, anup@brainfault.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210613084447.6db3cc02@xhacker> From: Alex Ghiti Message-ID: <98bfae5f-748e-f951-876a-254d98197e10@ghiti.fr> Date: Sun, 13 Jun 2021 08:14:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210613084447.6db3cc02@xhacker> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le 13/06/2021 ? 02:44, Jisheng Zhang a ?crit?: > On Sat, 12 Jun 2021 17:23:51 -0700 (PDT) > Palmer Dabbelt wrote: > >> On Sat, 12 Jun 2021 16:23:03 PDT (-0700), emil.renner.berthing@gmail.com wrote: >>> On Fri, 4 Jun 2021 at 13:51, Alexandre Ghiti wrote: >>>> >>>> Make the physical RAM base address available for all kernels, not only >>>> XIP kernels as it will allow to simplify address conversions macros. >>> >>> Am I just reading it wrong or won't this patch make it so that the same kernel >>> can't run on two chips with physical ram starting at different addresses? > > I mentioned this point in http://lists.infradead.org/pipermail/linux-riscv/2021-June/006840.html > >> >> IIUC we were in that position, at least without relocatable kernels. >> Maybe I'm misunderstanding this, though? > > Just my humble opinion, before this series patch, at least geneirc Image > for RV64 + MMU + !XIP is doable. > This patch declares that the physical ram address is at 0x8000_0000, whatever the chip, which may not be the case in practice. I did not expect Palmer would take this one and had planned to simply push a v5 without the first 2 patches, but things happened this week that prevented me to do that. IMO, we should just wait for a v5 that I'll push when possible (probably today or in the coming days). Thanks, Alex > Thanks > >> >>> >>> /Emil >>> >>>> --- >>>> arch/riscv/Kconfig | 6 ------ >>>> 1 file changed, 6 deletions(-) >>>> >>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >>>> index b58596b141fc..3d8e7e4bb45c 100644 >>>> --- a/arch/riscv/Kconfig >>>> +++ b/arch/riscv/Kconfig >>>> @@ -493,13 +493,8 @@ config STACKPROTECTOR_PER_TASK >>>> def_bool y >>>> depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS >>>> >>>> -config PHYS_RAM_BASE_FIXED >>>> - bool "Explicitly specified physical RAM address" >>>> - default n >>>> - >>>> config PHYS_RAM_BASE >>>> hex "Platform Physical RAM address" >>>> - depends on PHYS_RAM_BASE_FIXED >>>> default "0x80000000" >>>> help >>>> This is the physical address of RAM in the system. It has to be >>>> @@ -512,7 +507,6 @@ config XIP_KERNEL >>>> # This prevents XIP from being enabled by all{yes,mod}config, which >>>> # fail to build since XIP doesn't support large kernels. >>>> depends on !COMPILE_TEST >>>> - select PHYS_RAM_BASE_FIXED >>>> help >>>> Execute-In-Place allows the kernel to run from non-volatile storage >>>> directly addressable by the CPU, such as NOR flash. This saves RAM >>>> -- >>>> 2.30.2 >>>> >>>> >>>> _______________________________________________ >>>> linux-riscv mailing list >>>> linux-riscv@lists.infradead.org >>>> http://lists.infradead.org/mailman/listinfo/linux-riscv >> >> _______________________________________________ >> linux-riscv mailing list >> linux-riscv@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-riscv > > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >