Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1264579rda; Mon, 23 Oct 2023 07:32:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGT2AzLkwteGZnyCixmRFPIo63AFZoyC8ZdsSwHlW6o/n93qlxctzjhSJdUIFMJQPGxe3Zp X-Received: by 2002:a17:902:f7cd:b0:1ca:86a9:cace with SMTP id h13-20020a170902f7cd00b001ca86a9cacemr6932588plw.2.1698071540508; Mon, 23 Oct 2023 07:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698071540; cv=none; d=google.com; s=arc-20160816; b=Bae7Uwy2NNLQ1BIhfx5CqXWVc5i8q3fHRlzsf//ozMpsrph4lqX4EcqKEwdK9VuM+c a0pkUPtGHCXxNmPvX1ttTADaKs3FIgnxmd9BJXAV/meCt7OB9Y0P1gOWlZ8iw6SuyDLN RytvEBQ5ChTP2y0TXR6j6zDu17dVFPfUS7CCz00YaqDST17Vy53/VRg7QctlI3YEpAr5 N7P6z2MijMBQw0iyf4i7O6xL8Fd02rEX7kajf9e4CXO8KmqUsnGnq5LpgXk9xW2O7yB9 rWeMoYoCC5tbXBtaz10ILusqY/+iHWeLmP91t+rhg6n+j/U04XJrZ99RbeD4EXzaGbwQ H1AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/RjxD/ZzePqPKNEmDNpLekYR5zJD70yVgVvS6NTSkRk=; fh=YBgOIU932srd97krgl5mMkTNKMjZcIE+ODqCrOkYe+g=; b=0xAmWByDtmQyfargrcij7fSmfPwgYHtHp1P2JSH8YHdIJqQ+z+syFkY5PFYR4OaMuc ikRL81hbYrtHz1CalhDC+mV8nozBzwB1sZCoKWfyFcSpoDUgIQVT9N2Iewi+n3KGOEAi HJbkCYXYNIcwuxXVMkATFYlhJk2cxcvb0asHuyiVoSfWZLqnb7rykMjy8ViUWDp+jxC6 31slrtqZmhj+WZUo5S/zco9whspZ8I5On9EIjImYCCsbybbjatA/IGIpzIhu87XiM3gC 0Xxm/PEy12keIbeFoJE/qDtCCTq5Cj41LmpoM1Kj+6N0qdq+hVgYI7/E8ZW0SzU5/qhI 0qOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w9QwT6kc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t2-20020a170902bc4200b001c36705bce1si6149770plz.474.2023.10.23.07.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w9QwT6kc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1DF278065E05; Mon, 23 Oct 2023 07:32:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233343AbjJWOcD (ORCPT + 99 others); Mon, 23 Oct 2023 10:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233392AbjJWOb7 (ORCPT ); Mon, 23 Oct 2023 10:31:59 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7B6BD7B for ; Mon, 23 Oct 2023 07:31:56 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c523ac38fbso49267151fa.0 for ; Mon, 23 Oct 2023 07:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698071515; x=1698676315; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/RjxD/ZzePqPKNEmDNpLekYR5zJD70yVgVvS6NTSkRk=; b=w9QwT6kc+ODiJxmlFSQ3kUqh0W7WEeN+0P54AkZvQd6oJCDa6YkaX3zlvbuWI0pBDM 91sZ29n/QubjP2WSYXV3z2fM9ezvsbMmuWCqwbILRhrMwtL/AXlhdu2ZiXUFS5oZKZz5 2xC5hlxat6lXjdChL3M0P8u8/X8vn8PVCCHlzvEFUgdaz3j3yQq4cafzrNK9ox0ofduL 1lYrXJqpdsdX68Um5GF69l92ZoyJUs+1MdTLcgwlqw0FrwRmsGJolWEkzYNCMY0sQ1Vd ffPkMdCULZXzJ9JMzfkDGN5ylFcQvCH4ETP8ciF1gaGV+Jg411/NZ5PDDdU5WMKx3rtH zH2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698071515; x=1698676315; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/RjxD/ZzePqPKNEmDNpLekYR5zJD70yVgVvS6NTSkRk=; b=YEEi1H7rFWnGnxVvIE/6lDRxV2ZBtze7Ftvf8bETmhxFVYa289brLD8CtMiA2yuyw3 IRIRf5+HSfmV+BwAuV0H/PIsO4ZTwFN/e913dsBz/M1r7V8mkN+Bi1Eu3fwr/Fz40/r7 DOPFdDe2KwwQegbjslIUP0Qd7xKuyThcKMDWacoUboPJQC3agiTZfUQo1FfEu//vaiZQ ozYddZC1MNtGFlEnfOEMTKYzecsf3xeTHRSnIpody/iUWDU/UmjaN/Ze7USyGNe/tFI+ Q5XJ32lqnmlEuNicZcMiiBltGm/m9Bew4b/i5N4sDJHj/GoAbyOQ8Mog8iLsIDuTAIYU Zmdg== X-Gm-Message-State: AOJu0Yw+VF30miOuSWaPvayAexf4yrkwEvFoW6ZJ/sxvP278iyHTZFO5 j0EWIyEXVLvf/D4OnOtbiI+F4g== X-Received: by 2002:a2e:9210:0:b0:2bf:f7ea:884a with SMTP id k16-20020a2e9210000000b002bff7ea884amr6754875ljg.30.1698071514822; Mon, 23 Oct 2023 07:31:54 -0700 (PDT) Received: from [192.168.1.15] (host-2-99-112-229.as13285.net. [2.99.112.229]) by smtp.gmail.com with ESMTPSA id o30-20020a05600c511e00b004063cd8105csm14461859wms.22.2023.10.23.07.31.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Oct 2023 07:31:54 -0700 (PDT) Message-ID: <092c7a54-edb9-4ff5-8c35-a936461111df@linaro.org> Date: Mon, 23 Oct 2023 15:31:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 0/5] soc/arm64: qcom: add initial version of memory dump Content-Language: en-US To: Zhenhua Huang , agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@quicinc.com, quic_tingweiz@quicinc.com References: <1698052857-6918-1-git-send-email-quic_zhenhuah@quicinc.com> From: Caleb Connolly In-Reply-To: <1698052857-6918-1-git-send-email-quic_zhenhuah@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 07:32:17 -0700 (PDT) On 23/10/2023 10:20, Zhenhua Huang wrote: > Qualcomm memory dump driver is to cooperate with firmware, providing the > hints(id and size) of storing useful debugging information into pre-allocated > memory. Firmware then does the real data capture. The debugging information > includes cache contents, internal memory, registers. > > The driver dynamically reserves memory and provides the hints(dump id and size) > following specified protocols with firmware. After crash and warm reboot, > firmware scans these information and stores contents into reserved memory > accordingly. Firmware then enters into full dump mode which dumps whole DDR > to host through USB. > > User then get full dump using PCAT and can parse out these informations. PCAT is a proprietary tool that requires signing up to qualcomm.com and installing the Qualcomm Package Manager to access. It also relies on another tool (QUTS) to actually interact with the board. Shouldn't we have a FOSS (or at the very least OSS) tool that can be used to interact with these memory dumps? > > Dump id and size are provided by bootconfig. The expected format of a > bootconfig file is as follows:- > memory_dump_config { > { > id = > size = > } > } > > for example: > memory_dump_config { > c0_context_dump { > id = 0 > size = 0x800 > } > } > > Test based on 6.6-rc1. > > Zhenhua Huang (5): > dt-bindings: soc: qcom: Add memory_dump driver bindings > dt-bindings: sram: qcom,imem: document sm8250 > soc: qcom: memory_dump: Add memory dump driver > arm64: defconfig: enable Qcom Memory Dump driver > arm64: dts: qcom: sm8250: Add memory dump node > > .../bindings/soc/qcom/qcom,mem-dump.yaml | 42 ++ > .../devicetree/bindings/sram/qcom,imem.yaml | 45 ++ > MAINTAINERS | 7 + > arch/arm64/boot/dts/qcom/sm8250.dtsi | 31 ++ > arch/arm64/configs/defconfig | 1 + > drivers/soc/qcom/Kconfig | 11 + > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/memory_dump.c | 540 +++++++++++++++++++++ > 8 files changed, 678 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,mem-dump.yaml > create mode 100644 drivers/soc/qcom/memory_dump.c > -- // Caleb (they/them)