Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp793705rwb; Fri, 13 Jan 2023 04:21:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXsw6S8eKS/KKzUKeKeEyLeziW3FTs7bmFTnUp6YZzl7s91//NkI8LG/TMMCxG0l2kJJtPr2 X-Received: by 2002:a17:90a:3e0c:b0:228:fa3d:360d with SMTP id j12-20020a17090a3e0c00b00228fa3d360dmr7448051pjc.49.1673612461071; Fri, 13 Jan 2023 04:21:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673612461; cv=none; d=google.com; s=arc-20160816; b=EsTiAH0JAF7zdJA6sYO59KN/JRa6XvYxiBoxI4TqZmpOboECXZ/Jb1Ot2nSfAL9xXf 0ePhWhzYbmyyAhsRgARri1nmhLcQtMtfucpTlySkG96RkK+XirWGAElOqtrKFDTnBKfQ 6nQzNfFevYQBilblbvUVYUB3T8sgNc6jbwjSOrrRaicEkObSFhD0ydbFl9GndHcGqpaT M/KUeEeaPkq5jXALGAV2zkYP8+L6/f1aXL/OGKHma3uH6TZmSMLDBfq4Zq6owZVqYzrO 6xbFKI8Jxwa2rV0ETxjV+LXncZ2BOe7/Z5p6MAasNtBuLxwctuolPojBFHtjMPiUlIcH rHFA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj14-20020a17090b3e8e00b0022692bdf6c0si3842613pjb.49.2023.01.13.04.20.54; Fri, 13 Jan 2023 04:21:01 -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 + 53 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 Content-Type: text/plain 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 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: -- 2.7.4