From patchwork Fri Jan 13 11:58:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 43212 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp231976wrt; Fri, 13 Jan 2023 04:09:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtok8BN2t8SSrCvP9iEuqBYFCI8wadJhzzwNSpwM8iYw27axhLNxKRm+E5Mwba4nVUyj8Tv X-Received: by 2002:a17:907:c498:b0:7ff:7876:9c60 with SMTP id tp24-20020a170907c49800b007ff78769c60mr70245295ejc.15.1673611773818; Fri, 13 Jan 2023 04:09:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673611773; cv=none; d=google.com; s=arc-20160816; b=ZBqDOaDCQsPzryzlnXEg/A5n+QkDtU16pGgcEmyog4XSBLDoU6+7YEKA93ACnEZOnF whpf2Ld/1DZHDVjHLgW0xCWqCwEUudaXaH1Hq9zRBTtYXGjtNJJSAHSsKEY8YcweyNVq tHU/680OPGieTVylkF5iYgrj531S/NRDsvpfYSZCUf3YIrnqSMe0qI7HDL77htLP8irZ Do/t9SKtY02xxIUnbE2zoTP70i+AGgtaZ0BtfkJa0d9wnKmXsV03xWdqOuOYnjW75uMi T9nzQr6HB7qNQQXxl1A6J2Yb5rF2BpoltRmni/6GGyn8uM5x2dyhCWz5KZmb+32F9i+J CyrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=B/FJ28V5OM9qQHwIsioJH73Z9oXDZRZjd2zV9nWXUuI=; b=QJNzJbMepH67OQZWCAgdsmI9R3pvtK9FqLvt9xF/WXf05WmO0bttDjqYq0qb4Vvyj7 hctkP9oC7Bih4cIJ7vXw4E1Prw85KWYzC+VTAdqInaAEC5P/QJAVMUIE5FnPwymSs5Qb ttss11PdPDL2y3+3v06QYYPK0REgHRTeAOjfETg7FN4O29nnGd8aIOxNSV/dM+OU3yNu xn5m0d0ectFcMkMFXdNClNE7ivqHB87up7MWIS5vkAaYwHVscJ2eStj7gCrCN9QT8a1V Wj199171/Y8Q9Yasy2kBQwVEaf6eKPiNI8MdgR/n+VOZVeZSJYv76EAou8GoUpoaTuS6 /Lsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ucKD6SB+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go12-20020a1709070d8c00b007c0abf0760fsi7735205ejc.54.2023.01.13.04.09.09; Fri, 13 Jan 2023 04:09:33 -0800 (PST) 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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ucKD6SB+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240712AbjAMMI0 (ORCPT + 99 others); Fri, 13 Jan 2023 07:08:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233993AbjAMMHb (ORCPT ); Fri, 13 Jan 2023 07:07:31 -0500 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98C0A3AB13; Fri, 13 Jan 2023 03:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1673611149; x=1705147149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=B/FJ28V5OM9qQHwIsioJH73Z9oXDZRZjd2zV9nWXUuI=; b=ucKD6SB+OpCcVChs6yWgzlnfkj2r47Gfs0GyrKdfYT2rzDyhxaBfqJVh /RKH8ZzRyOOPqM2lFttem9jueqjrTQczlygm6qbvp8Z2+WpZ4jMuLgPWW 9Q3J+gpvndTUBXBH87Mev6hp1UBMPEQFKAO0xDch/6MCIJWHlQvJbt6HV 4=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 13 Jan 2023 03:59:09 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.45.79.139]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 03:59:09 -0800 Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 13 Jan 2023 03:59:05 -0800 From: Mukesh Ojha To: , , , , , CC: , , , , Mukesh Ojha Subject: [PATCH v2 2/3] Documentation: admin-guide: ramoops.rst: Update the ramoops document Date: Fri, 13 Jan 2023 17:28:45 +0530 Message-ID: <1673611126-13803-2-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673611126-13803-1-git-send-email-quic_mojha@quicinc.com> References: <1673611126-13803-1-git-send-email-quic_mojha@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754909139191676825?= X-GMAIL-MSGID: =?utf-8?q?1754909139191676825?= The reserved memory region for ramoops is assumed to be at a fixed and known location when read from the devicetree. This is not desirable in environments where it is preferred the region to be dynamically allocated at runtime. So, update the document while adding the support in the driver. Signed-off-by: Mukesh Ojha --- Change in v2: - Added this patch as per changes going to be done in patch 3/3 Documentation/admin-guide/ramoops.rst | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/ramoops.rst b/Documentation/admin-guide/ramoops.rst index e9f8514..88884b2 100644 --- a/Documentation/admin-guide/ramoops.rst +++ b/Documentation/admin-guide/ramoops.rst @@ -16,8 +16,9 @@ survive after a restart. Ramoops concepts ---------------- -Ramoops uses a predefined memory area to store the dump. The start and size -and type of the memory area are set using three variables: +Ramoops uses both predefined and dynamically memory area to store the dump. +The start and size and type of the memory area are set using three +variables: * ``mem_address`` for the start * ``mem_size`` for the size. The memory size will be rounded down to a @@ -70,7 +71,8 @@ Setting the ramoops parameters can be done in several different manners: B. Use Device Tree bindings, as described in ``Documentation/devicetree/bindings/reserved-memory/ramoops.yaml``. - For example:: + + Example of statically reserved ramoops region:: reserved-memory { #address-cells = <2>; @@ -85,6 +87,23 @@ Setting the ramoops parameters can be done in several different manners: }; }; + Example of dynamically reserved ramoops region:: + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + ramoops@8f000000 { + compatible = "ramoops"; + alloc-ranges = <0x0 0x00000000 0xffffffff 0xffffffff>; + size = <0 0x100000>; + record-size = <0x4000>; + console-size = <0x4000>; + }; + }; + + C. Use a platform device and set the platform data. The parameters can then be set through that platform data. An example of doing that is: