Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp534422imn; Tue, 26 Jul 2022 02:43:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVY0WJUHR2E6rhHqGC/mgZctqSCHr26tSN5Ge9MrjoY6gA7LOgj7yWIFrVyxnNhmjXc02g X-Received: by 2002:a17:906:9bd2:b0:72b:3c47:6ff5 with SMTP id de18-20020a1709069bd200b0072b3c476ff5mr13310937ejc.757.1658828595622; Tue, 26 Jul 2022 02:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658828595; cv=none; d=google.com; s=arc-20160816; b=020uMhWkVqLYYuI5+7+vLZY27oT0oTGJMfmxT+cyHZI+h6TfP12mf8kIf/pe/zGddf uRloIxA08t3/Yu3J2Jd94FzLLP61WslEQE/LSNmFuNw0rqQerFbWLj8oQjZJw/fd2ls4 axmdvM1Yp/qINWxNN7W4K/kY1oyoP179BqoQ9zyTsxcVtsxw7HeIYWn6SeDo77Pu55J1 WsWELNzNIpEsmULcWbrxr8poXs/j593dlzHWkBiC8y1Dp1asU1Cl2G14s6wRq804tSnL 2yZHeGi1lv4AJd6r8ISxbqENeEIBcyRVV9OyyG7sXg8THps8/4cOEH7wCmR8XdD6aSJW xa+w== 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=WfgkAHVlRsrsI1KQHf4EJD6VN93kW11m3Bbdi3Ah/P2ScVjXirOMmS9gaM3eSFMzy5 cTXgmo7RYJ1NuhfejS5+zDINrRN5PuUGMxRMHFAvFUgVPI51xTxmcdHS6xYByelN+OY/ BGLotl3MnjmL3HK02nMau981lZMBsekIlbSE6/G9xGmEP5OzL+0VyYCOH0jqM0pAA0ot k8utdj2ofXXSeipFLjmL6DQWbWpS9kqzF0AQEUxwCwFdqu1U+FBbt5ZlNgdn4Nke3upE 0EopNLC7tUpCVVP1WQ/0QcnAnrNQ0Y8QAl/VMZqLpA9fnTK1wD+ALHscEnj1SSL9xtoi mHlA== 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 hr22-20020a1709073f9600b0072ae569d6a0si17868763ejc.632.2022.07.26.02.42.50; Tue, 26 Jul 2022 02:43:15 -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 S238311AbiGZJh4 (ORCPT + 99 others); Tue, 26 Jul 2022 05:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238195AbiGZJhr (ORCPT ); Tue, 26 Jul 2022 05:37:47 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BF142F3A9; Tue, 26 Jul 2022 02:37:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=22;SR=0;TI=SMTPD_---0VKUwha8_1658828258; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VKUwha8_1658828258) by smtp.aliyun-inc.com; Tue, 26 Jul 2022 17:37:39 +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 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, Xianting Tian Subject: [PATCH V4 5/5] riscv: crash_core: Export kernel vm layout, phys_ram_base Date: Tue, 26 Jul 2022 17:37:29 +0800 Message-Id: <20220726093729.1231867-6-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220726093729.1231867-1-xianting.tian@linux.alibaba.com> References: <20220726093729.1231867-1-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,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