Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4761148rdb; Tue, 12 Dec 2023 08:36:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlfrcKQosSF/jZ+Sg42POBEuFSpsVjgYNQ012FWrT0KvUhpmwyDiq3DTshMij4RX+rqua7 X-Received: by 2002:a05:6a20:1381:b0:18f:97c:8a52 with SMTP id hn1-20020a056a20138100b0018f097c8a52mr5575511pzc.125.1702398972917; Tue, 12 Dec 2023 08:36:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702398972; cv=none; d=google.com; s=arc-20160816; b=MIz0Zctk5+YKyBhC7Pyw9MvHg2jW+AOyMBQ/cul0jGQxgzi164TUO0bTLjQU4crYlq iLPU9VLSNW4VyOPpR+swFfiUHFYKBkisbWwZcn6tbo1LvbSLgFauVHL1ReYbjcucg03o W+7td7HkJpjBjdmiBwuMCIt5F7UWgahmQhYOXT05/JkT+oVd3p6LPXP+9bWDayYhr+C8 z4G4R7g/15APUkkh5S06UMMKU6mH9uA+EYZKzUJwALA8mprXJWTc/xWFi3nehP8s5vCp SaMrOPtnIa68a7BSQ4Iy4gQPLLBYnNStshXfxJ6kxywphcGq/+QDIgVPdAisUQsj0Tj5 G4Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Hs8erXZl4NlWl7+f8VZWG3NaOSPZoMSP8HqcLsJyRM=; fh=t1bsw/gEI8w3DN7ouBpAewoQyybWh2yxEgAHixB9Iis=; b=bxlx9vh+8Ulc9+nKvJRGZemNLIrUPnGvtw6cV2gv6stNpR5eTf2MAu7rlvOt1AF7tJ JT6aibkTSB78xZLjXWGE1Gzg48huQsLU3MuqcTebMq+Y1faBpmWyNjPx0FyKJmWMEwin pSBMIY4+fGKEjkR7Wyi+fcpYcFp8jnmwax4ZMemiu0y/lIz4HME5OVOo4AE0zgx/lclP H1ElN69XXfQ/vJDWdDb91ViA1Va6WCU0AP+t/qDH1BrwADwnaujmjIYr2qZ8cbSSLdi1 RvJ8hzEkfHUtgeVv1FKdsdzKqcKF64rwiNUC/KNPpwDvcFqtSI+25WM8wRy6nzRk9ChU FG7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="obJtsQ/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l5-20020a656805000000b005c60319034csi7988241pgt.644.2023.12.12.08.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 08:36:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="obJtsQ/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9D9D180A30FB; Tue, 12 Dec 2023 08:36:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376308AbjLLQgA (ORCPT + 99 others); Tue, 12 Dec 2023 11:36:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232954AbjLLQf0 (ORCPT ); Tue, 12 Dec 2023 11:35:26 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BAB0115; Tue, 12 Dec 2023 08:35:32 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id A86D2FF81C; Tue, 12 Dec 2023 16:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702398931; 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=7Hs8erXZl4NlWl7+f8VZWG3NaOSPZoMSP8HqcLsJyRM=; b=obJtsQ/LHcmycBwrOwk4+lNBMUbkfe7xBCh1X6nSMCVKfdqaokSlUAR6jnhZTxNTDT63Tp fRw1gWxHEtB0HO4Mbg52NgKSt+KIMV5iXhOc0uUrO5KTADI8e8qkftwCxVD7erTkaNUCOC q7BVeaV0BgK7SRoT9CaYql+kDxgmODUYXiXfQS+Pz+3Z5aib0vw5GYYhVnwfYH/z2cMPlR q0gNU4GLFWZLejxjLwwP3uuZ4K/bkLPS/RS43MQAgkYdOvhGOf7Drf+/5UjqYEUuEZ9AuT LZ0hbzIKHozNBgXXbQ3Q4yq70uQTU4irE0Oebaz+PsM3jONMNWm5sNBEf4vGMQ== 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=20Lebrun?= , Thomas Petazzoni Subject: [PATCH v5 08/22] MIPS: Allow kernel base to be set from Kconfig for all platforms Date: Tue, 12 Dec 2023 17:34:40 +0100 Message-ID: <20231212163459.1923041-9-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231212163459.1923041-1-gregory.clement@bootlin.com> References: <20231212163459.1923041-1-gregory.clement@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 08:36:11 -0800 (PST) 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 2480a2cdddf1e..518376d578b70 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2868,12 +2868,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 -- 2.42.0