Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2514724imn; Tue, 2 Aug 2022 05:59:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR6V6iBVSvH5lcGkXp/38il5pxJPQsh8gnoI7HBbzJluDImvOqQmDQx+k/L16TT/TWIwrOjA X-Received: by 2002:a05:6a00:2288:b0:52d:dbdf:318e with SMTP id f8-20020a056a00228800b0052ddbdf318emr3017834pfe.62.1659445189011; Tue, 02 Aug 2022 05:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659445189; cv=none; d=google.com; s=arc-20160816; b=A4po5fjSsyf8iQ2GmwLcFCyMgIhYCnC5/EHxL2diAiANY1jGprDZz8xBuS40YN9wEH qsohVszbJTsDdApoT+gSng9NRHNtvXz3Chz+cqAJZX1tFVPUrkiLYOfSsg6RLybcb7j5 R5+k/hA7WRDQCzyVpcmtkcnjZyjlvcFEaUJy/b+qK1T0SMc2DkZ8MQ1K4VFv5pukqyF2 yKQ68Bhnisu5jLP95Slitw7E5xFqPGmudlUoBZd44NQZMQEbwtjKHvVj+lNMjqDw+Zu0 xRaGGxHyt3Q2+Vjqd4LSPgmpffwyZsem78n/noHa5beL9QB8L7ZU9alRu6RbOTLzWpZf +Ovw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=HHaKh+0XMbMzixxBE+hsbA9Jz60ZdRz0Ze739wU7pts=; b=DeFDZh4PThndwKxpdpYJmACMQOF19FCYrL7bpfp9HTl3LVSRjWtKoxB9HAUFUQkGzt 9Wbq5b0Z9k9ir6jgjZdYCzGt/UtMAxpZKmQMr2znK6FVmUfhFeceLBKeRo7yV57vUK6W WZsNCM0Ifrb5HIoiQoCNqfzRnPnoRlI8tcf/el25m+oJCDNKOlrM6TdipuutLMxTo+YO cihA05gtIdYTK/zWHSqWheKaQ4vx1ZRWA7UQckvAK186N/gBnzzZ9joc3jcdZRWyTEBu ap8pjEedF+o5k6gvou3jquVYgtPK7a38ZuNyKcSYEV9DLPR6tWFq82S9f8c1YMe90e6J bGBw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12-20020a170902e74c00b0016f01d552bbsi3628584plf.483.2022.08.02.05.59.34; Tue, 02 Aug 2022 05:59:48 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237007AbiHBMSy (ORCPT + 99 others); Tue, 2 Aug 2022 08:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236837AbiHBMSg (ORCPT ); Tue, 2 Aug 2022 08:18:36 -0400 Received: from out199-17.us.a.mail.aliyun.com (out199-17.us.a.mail.aliyun.com [47.90.199.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B7104F641; Tue, 2 Aug 2022 05:18:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R791e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=24;SR=0;TI=SMTPD_---0VLBrreT_1659442708; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VLBrreT_1659442708) by smtp.aliyun-inc.com; Tue, 02 Aug 2022 20:18:29 +0800 From: Xianting Tian To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, anup@brainfault.org, heiko@sntech.de, guoren@kernel.org, mick@ics.forth.gr, alexandre.ghiti@canonical.com, bhe@redhat.com, vgoyal@redhat.com, dyoung@redhat.com, corbet@lwn.net, Conor.Dooley@microchip.com Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, crash-utility@redhat.com, huanyi.xj@alibaba-inc.com, heinrich.schuchardt@canonical.com, k-hagio-ab@nec.com, hschauhan@nulltrace.org, yixun.lan@gmail.com, Xianting Tian Subject: [PATCH V5 5/6] riscv: crash_core: Export kernel vm layout, phys_ram_base Date: Tue, 2 Aug 2022 20:18:17 +0800 Message-Id: <20220802121818.2201268-6-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220802121818.2201268-1-xianting.tian@linux.alibaba.com> References: <20220802121818.2201268-1-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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 These infos are needed by the kdump crash tool. Since these values change from time to time, it is preferable to export them via vmcoreinfo than to change the crash's code frequently. Signed-off-by: Xianting Tian --- .../admin-guide/kdump/vmcoreinfo.rst | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst index 8419019b6a88..6b76284a503c 100644 --- a/Documentation/admin-guide/kdump/vmcoreinfo.rst +++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst @@ -595,3 +595,34 @@ X2TLB ----- Indicates whether the crashed kernel enabled SH extended mode. + +RISCV64 +======= + +VA_BITS +------- + +The maximum number of bits for virtual addresses. Used to compute the +virtual memory ranges. + +PAGE_OFFSET +----------- + +Indicates the virtual kernel start address of direct-mapped RAM region. + +phys_ram_base +------------- + +Indicates the start physical RAM address. + +MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END +----------------------------------------------------------------------------- +KASAN_SHADOW_START|KASAN_SHADOW_END|KERNEL_LINK_ADDR|ADDRESS_SPACE_END +---------------------------------------------------------------------- + +Used to get the correct ranges: + MODULES_VADDR ~ MODULES_END : Kernel module space. + VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space. + VMEMMAP_START ~ VMEMMAP_END : vmemmap region, used for struct page array. + KASAN_SHADOW_START ~ KASAN_SHADOW_END : kasan shadow space. + KERNEL_LINK_ADDR ~ ADDRESS_SPACE_END : Kernel link and BPF space. -- 2.17.1