From patchwork Thu Nov 23 15:26:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 746640 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TueHfQu0" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C1E710DD; Thu, 23 Nov 2023 07:27:02 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7A11740006; Thu, 23 Nov 2023 15:27:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700753220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GhAHp/WqUVYuPSI+XZI84BEZNCI93fSEr9ostuA7S3A=; b=TueHfQu03SEyVHx3lV5K7yzAtdC7P3Mdc6pE3OhcGReI+OOaHzPv81zZDxcAHpR35bRob9 ulF1v9Xl8kC0HHEKppienSZQhoHu0ydwQYwGMHMWWNxxbUJ7Y0xJtrTmlYwfRZdG5sbH5B EgsGN6rX1MlfaaysEzj4v0o93vrik0gOkvGsE0jS9+KKOBB1Qpn35n0uDokZBUGeRPE+bR xMot03qv4MGksrHFJj58zT+D1MfbAEVGkeklyZY1b/sNdkuA103VmVv5gNukC+8V9uavX0 4OGXu0Wbv3nCg8avV3hqcbOwneraRnfvSaHWlo8v1Og51PFPiFEsOfs7FBGe0Q== From: Gregory CLEMENT To: Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?utf-8?q?Th=C3=A9o_Lebr?= =?utf-8?q?un?= , Thomas Petazzoni Subject: [PATCH v2 08/21] MIPS: Allow kernel base to be set from Kconfig for all platforms Date: Thu, 23 Nov 2023 16:26:25 +0100 Message-ID: <20231123152639.561231-9-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231123152639.561231-1-gregory.clement@bootlin.com> References: <20231123152639.561231-1-gregory.clement@bootlin.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: gregory.clement@bootlin.com From: Jiaxun Yang There are some platforms in wild that generic loading address won't work with them due to memory layout. Allow PHYSICAL_START to be override from Kconfig, introduce PHYSICAL_START_BOOL symbol as powerpc did. Signed-off-by: Jiaxun Yang --- arch/mips/Kconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 76db82542519c..f7fa4f231c6c6 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2862,12 +2862,22 @@ config ARCH_SUPPORTS_KEXEC config ARCH_SUPPORTS_CRASH_DUMP def_bool y +config PHYSICAL_START_BOOL + bool "Set physical address where the kernel is loaded" + default y if CRASH_DUMP + help + This gives the CKSEG0, KSEG0 or XKPHYS address where the kernel + is loaded. + + Say N here unless you know what you are doing. + config PHYSICAL_START - hex "Physical address where the kernel is loaded" - default "0xffffffff84000000" - depends on CRASH_DUMP + hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL + default "0xffffffff84000000" if CRASH_DUMP + default "0xffffffff80100000" help - This gives the CKSEG0 or KSEG0 address where the kernel is loaded. + This gives the CKSEG0, KSEG0 or XKPHYS address where the kernel + is loaded. If you plan to use kernel for capturing the crash dump change this value to start of the reserved region (the "X" value as specified in the "crashkernel=YM@XM" command line boot parameter