Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1974355rdb; Tue, 20 Feb 2024 12:47:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVoW49dRacngl5886tqRwllbeavg8Dvw8+12FXQp3Fef05j7DbrKuxSgN+hGEK6HMNwHjutBaRWKgd2KCud4QNFl89XGRUIZGwJSDohZQ== X-Google-Smtp-Source: AGHT+IGJASF3yELKLQH9AuukwHbHGMIN30Swnn1eYB3yzJL/M9+PCbRrq/ciCeVL5kNrjlJenlpW X-Received: by 2002:a17:906:375b:b0:a3f:2ba4:27df with SMTP id e27-20020a170906375b00b00a3f2ba427dfmr278691ejc.52.1708462040936; Tue, 20 Feb 2024 12:47:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708462040; cv=pass; d=google.com; s=arc-20160816; b=TqqHZFEfcHKATT66pFqkExNzA28v0F1JhMbWuPX8GJufLAs+cA7ffJeCTM2uYPkYuv fPIgFzYoYEdp85HBb6QE/qLJqcUE/KWbDeNFtSgMZ0VBysad8pyGnidHv3H4hbXyNf2J ZrOh0YghKLIUVwOT2PkCiP1RlpJ+jJ90MK5LUk3c7OFU/aAUBnDMtFdqUfm3qlzccbyA iTtxl/EJ4kTBuaOoUlamzRU8AARUbCTVjUYw08LTWg2jBphksNqQ6niSVj26xZObW8Ez d+ZRUbZ8Sw6Zd1BlHkUAK09hKMss2UqyUwxKuEOXYKIENtiSgfdFPNAT0gxxVlsyjCFg cgfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=m//3TU05HDRkQef2MLNHMdyNbFQPQdtq9U0yuG1AyGA=; fh=554lsK95nDIbu1N+QfbaFbPlsoixpSWeFFx1deLLTIM=; b=gGlsmBzT43xl+R6oDSAY+lb27ssMx/JnueNTbHS7m1YwAckp+DC+gopryI5u8P+3Im I8NwYGwUwfJG/WRQ3DHd6ZORG6LB3lbN3zU4e1FSfUNDnzPRyJ2Jl91zsxAtxXxoxL9H 15KPphjSOws0SEBmSp2G73BnEYXZcb9+0+vt7Zi4nu2CmZDAyuaCWvksM7ELfQTTl+7j KBoozOXAYwoMwo0PWBcfSJZ0Diat3caI+tplLl165pdwJRQZ7S2OkH4EHqkcYhTlSRBa c6LGMs34HZyt6MP+P9yiwqRIb3EmLS4HqQJvjQpSxiVqNJ3pZXGOzuxN1vXgEnAFKnq1 CpTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-73692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73692-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dx14-20020a170906a84e00b00a3e7754bbaesi2662271ejb.687.2024.02.20.12.47.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 12:47:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-73692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73692-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ABB9C1F2365F for ; Tue, 20 Feb 2024 20:47:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F20E414F9D6; Tue, 20 Feb 2024 20:47:13 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F9A612D7; Tue, 20 Feb 2024 20:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708462033; cv=none; b=s0zToK+tK/er3EHUydFiqNpV9ebyGkNnmTgEI8DZMgx7BKETPKumOTGtVZU3cgC7AtsnvFKSds3sqFVv0JSxq3FpNIsWTdiCek7CZHksWOwsWkKd1+HejH/o5mzykmZiu7o4y4XBJeTFmPOCryAE4arLejHsLaJ6kUNbUemsGAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708462033; c=relaxed/simple; bh=UlmFQVKQFIKeaxAhu0UpvkO+T39cAw7EkBC3x/VsA9Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jqeEoNKp1vU4yLVtu7BsGjlSjHqyqTZqYLV9kXAEfHh2UKV95tcu8l3UUIoExlHnyBrBzRifm9Kbf/xUwfPvgiWj//Bon7XSmAJjh+crhTVnTIEzSnJIDBIDqhFt4h9U3aV/djiGx3a/zc+eEWhtKK0fQ2az60ctA43sRwHAFNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 6299620009; Tue, 20 Feb 2024 20:46:58 +0000 (UTC) Message-ID: Date: Tue, 20 Feb 2024 21:46:57 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/1] riscv: dts: Allow BUILTIN_DTB for all socs Content-Language: en-US To: Yangyu Chen , linux-riscv@lists.infradead.org Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , linux-kernel@vger.kernel.org, Masahiro Yamada , Rob Herring , devicetree@vger.kernel.org References: From: Alexandre Ghiti In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Yangyu, On 20/02/2024 20:01, Yangyu Chen wrote: > The BUILTIN_DTB kernel feature on RISC-V only works on K210 SoC only. This > patch moved this configuration to entire riscv. > > Although BUILTIN_DTB is not a good choice for most platforms, it is likely > to be a debug feature when some bootloader will always override something > like the memory node in the device tree to adjust the memory size from SPD > or configuration resistor, which makes it hard to do some debugging. As an > example, some platforms with numa like sg2042 only support sv39 will fail > to boot when there is no ZONE_HIGHMEM patch with 128G memory. If we want Orthogonal to this patch, but if needs be, we can fix this issue with 128G on sv39 by changing the sv39 address space layout, we still have room to gain the 4G you miss, at that time I was pretty sure that amount of memory would come with sv48 :) Thanks, Alex > a kernel without this patch to boot, we need to write the memory nodes > in the DT manually. > > Also, changing DT on some platforms is not easy. For Milk-V Pioneer, the > boot procedure is ZSBL -> OpenSBI -> LinuxBoot -> Linux. If DT gets > changed, OpenSBI or LinuxBoot may refuse to boot. And there is some bug on > LinuxBoot now which does not consume --dtb argument on kexec and always > uses DT from memory. So I would like to do debugging on DT using > BUILTIN_DTB, which makes it very simple, I can even install the kernel in > the distro's way and provide a kernel package for other users to test. > > Yangyu Chen (1): > riscv: dts: Allow BUILTIN_DTB for all socs > > arch/riscv/Kconfig | 16 ++++++++++++++- > arch/riscv/Kconfig.socs | 32 ----------------------------- > arch/riscv/boot/dts/Makefile | 2 +- > arch/riscv/boot/dts/canaan/Makefile | 2 -- > 4 files changed, 16 insertions(+), 36 deletions(-) >