From patchwork Sun Jul 24 15:23:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianting Tian X-Patchwork-Id: 12927577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A651C43334 for ; Sun, 24 Jul 2022 15:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0sl6WCCFH7E7iMOmwCkW+cpisMfIoNiJEUQsjsjxvdQ=; b=MhanhBPAsfT8NN pUeYjhCWim7oo4fTXK+m+kHSyvtMsOiv1A5U6wPNn16Fmeh70AG06lZc1QETavxevsAoTvqQoITja syV9isP2MwI9GCrag4+yw+BbFfrgQMkTT1tkyz57kws3n3XD4htoKY9qmhGS0XLa6XdIgXegabDoL wZLQ86z/trfZLn2T+uL7L2wuk2qqeafZArSIWiRqwvweKltBlEFlUuCfotaO1RDraY/FqsHRCnM0X RK6eJJ0aYGVXPi7acQYVbyxwNriial20WOEbeeno9+0nYHvPqVOCuaqXlWBezXjH4H2jP1iMlL8jx MpQ+/ajhi4S81cBloPVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFdS4-006sa7-Pg; Sun, 24 Jul 2022 15:23:28 +0000 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFdRy-006sRt-5A for linux-riscv@lists.infradead.org; Sun, 24 Jul 2022 15:23:23 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_082322_490779_3A0877D4 X-CRM114-Status: UNSURE ( 6.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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.