Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2132335imi; Sun, 24 Jul 2022 08:26:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ulsyp3qIGVbMhen1ifZCd/YWLTKxmRDyTYlla+kwJXQWvZy4x7yQqD3CDMnPrQ9fh/B113 X-Received: by 2002:a05:6402:3785:b0:435:5d0e:2a2e with SMTP id et5-20020a056402378500b004355d0e2a2emr9489149edb.307.1658676375298; Sun, 24 Jul 2022 08:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658676375; cv=none; d=google.com; s=arc-20160816; b=M4HkI+nahjyAxRMTPZZ1JUl//yidX9jMnYONbIwPsQsYJQKMTJ5S+j0hvMZrj0cYHJ lgow+hnq24h3mMDezI88TcFJ/lXMSHF0R85HdIUEG1EGJzmYONgZsYvXP3mECN36ZUus fa5/aJa4Ks/FFObIc6hlbzd86jT7H0NHy9Zs/cPNEIHna18os7rb8lso9mEe7brq1s5b klcwoKd7VdHI1eO6Ss2kX2xwgfaHazGTRkQw0z/Fl186Q3LdcaqYuDGfhGWICodMQEu8 C/+eimk3oa9UJ565gyxzpV4aKI+FA6LooXH0FklGmBy2n8bjFOZscXfxw6SxcqiWAY8q l21w== 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=x/+wXYnZDtp8iPDlvLvH2F3+qjOBf9oPFQ4A2jpm69U=; b=zn1K7TxpxC0TOZaVT9+ghdM0LXiyBlLCLjFye9L5LIQj2dwyhxgSGTnXKQZeEnsDQg CONv0sgq9/ZgknRiYFof1VuwDClbOrD8igDM4T8eC8parZ+g5+dnd+x/tzYlOxxeyzj/ 5fva1SnUNlBW/4+k6SqypA+D0uUC4IMlWVJN7a38MYcNhNcxLJrg4oxpi+SYiZHUhdD/ 0IGWWrrv05/mpqYjFyT1jF9tCYN10SnACy2b8Lv2Z/MEGtZZYJvK0jJDGDENiYNp4nuO QYPYgmODEiPJvGRsYt6f5zkzIpHXk1jI5pxGkUdkR+F/xfyzY1Bx4kt/SZOQi1fYbNre xRrA== 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 kt2-20020a170906aac200b0072b9b9c2a74si10227231ejb.251.2022.07.24.08.25.50; Sun, 24 Jul 2022 08:26: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 S234111AbiGXPXc (ORCPT + 99 others); Sun, 24 Jul 2022 11:23:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233971AbiGXPX0 (ORCPT ); Sun, 24 Jul 2022 11:23:26 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE6111C23 for ; Sun, 24 Jul 2022 08:23:24 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VKDjFUF_1658676193; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VKDjFUF_1658676193) by smtp.aliyun-inc.com; Sun, 24 Jul 2022 23:23:14 +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 Cc: 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 V2 5/5] riscv64: crash_core: Export kernel vm layout, phys_ram_base Date: Sun, 24 Jul 2022 23:23:05 +0800 Message-Id: <20220724152305.1037212-6-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220724152305.1037212-1-xianting.tian@linux.alibaba.com> References: <20220724152305.1037212-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..7d89a9d041c4 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