Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1772928rda; Tue, 24 Oct 2023 02:54:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgthDj+m70zRhKkBwmTn5ZkxX4ATfplD0Oc134nkTUeGFvpzr/9TH+QeVgPdUsrBcYLPom X-Received: by 2002:a17:90b:4c0d:b0:27d:3c7c:be84 with SMTP id na13-20020a17090b4c0d00b0027d3c7cbe84mr8294023pjb.30.1698141260539; Tue, 24 Oct 2023 02:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698141260; cv=none; d=google.com; s=arc-20160816; b=yGZVkO2uy80q1ItJKNA11OTaBuIbjOiLF3UdADax7YlJZOPokariv2DRSGW97ZH7ot q/zO6XmaXdHU5vSCU5tA2BXQo0lwxfu0ntp/4oL6AccyCxvg3Mnslrq7Rw0memwySckX NmbsQdqL1s/rCEyq0KiXcb6z4Unp55P8oyAXQ+G+zuNS3xABA2dUM+Y5fytJVepGWW3X d/9o9TM8XD/4YN5tBDCzcM4CgPN8OSDKufeOZjuYkgPfefDNigtbSfUkM8RrZjbY7NW5 oPJv8DWZWoFkBJFjs7kp33ZK6Vuhqeu/rl2ghYixVqQM6v2uJvVG0NYusXRWMmfz9iPz vQAA== 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=R5T/Jdrr21/BhDX3iJZH8nMfjInIu+4kITpjaH/Ovvw=; fh=xmAiyY7+ZlywxcxWEsaZjR0s+2wJwbpc3gJwTWY6M30=; b=MscVkWpncmAnaMqIyMNtxrjryLrdIzZ76SwnlYNx06+JOUCKrsSSBwxj4pHk6xVaiK rLGCC1F8HFSUaWKRnbvbM27tjuK41DythZ2Wxbji77dD4VxKx3KJn8WbSYPqKKmfNgzM JbblZunaeZ2DPaGhqxWCX5wf5Pmhq+5oOks5xw2wvRJbgrVPw7Ng3xZQguxO7aJhQ+/M 8Fb4uIYhABZHLAbRqx7tD6wtqNOjCUSn3QQmwlKe3lE96BXlzktGOOhglOdSyw2TE6pg Ipu7yDz+bElpWsWJP87AIzXzBYWFg+1Lw2KKGeAiUzv9B5wsTqERa/m6Wf9V+qeICJeX lnTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QUIG+DmL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id v19-20020a17090ac91300b0027e022bd420si9199046pjt.77.2023.10.24.02.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:54:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QUIG+DmL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E967C809C388; Tue, 24 Oct 2023 02:54:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234132AbjJXJyK (ORCPT + 99 others); Tue, 24 Oct 2023 05:54:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232119AbjJXJyJ (ORCPT ); Tue, 24 Oct 2023 05:54:09 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EDB83; Tue, 24 Oct 2023 02:54:07 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39O7xbcL002048; Tue, 24 Oct 2023 09:54:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=R5T/Jdrr21/BhDX3iJZH8nMfjInIu+4kITpjaH/Ovvw=; b=QUIG+DmLgwg2Wq+QWU+WhekQEHSk6ZTFsLMLeJ4b21T5cdP8ftHiUiL6+4gJDO3xmznt wn9NufimGNmo6q4QUzLuXbXebjFHZSY0GZQMId7Du8I48+I8F5J6RunXjRhaNkx1OhLI vvZiRiU0ZLF5E7lyXH1MHGRYmBz1Dmm3yMOKQCk6dQabKVI7P9VwH3xD/nI2pGT3PeIA I+6xIIZpJHh2nfQaGWSdOYEqHgNgK6R1jXWhwiNOUGEbnBwOE2otfFRi1j9gazF/1Qnc pWIcgfQuU1vd4temjJTBCLvBIpBew8kWOf6qHNiAwlyPkQ2TTVjPSzw9N3hE7c0eTwn0 Sg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3twxn41daq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 09:54:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39O9s2gP024070 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 09:54:02 GMT Received: from [10.239.132.245] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 24 Oct 2023 02:53:57 -0700 Message-ID: <0578d070-e41b-bd22-72ca-e366ea9a5ed2@quicinc.com> Date: Tue, 24 Oct 2023 17:53:54 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v1 0/5] soc/arm64: qcom: add initial version of memory dump Content-Language: en-US To: Caleb Connolly , , , , , , CC: , , , , References: <1698052857-6918-1-git-send-email-quic_zhenhuah@quicinc.com> <092c7a54-edb9-4ff5-8c35-a936461111df@linaro.org> From: Zhenhua Huang In-Reply-To: <092c7a54-edb9-4ff5-8c35-a936461111df@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Kyb_eYZVwD-UAeDKlEI9qKMn5vq9IoCs X-Proofpoint-ORIG-GUID: Kyb_eYZVwD-UAeDKlEI9qKMn5vq9IoCs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_09,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 clxscore=1011 spamscore=0 mlxlogscore=536 lowpriorityscore=0 phishscore=0 mlxscore=0 impostorscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240083 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 02:54:17 -0700 (PDT) On 2023/10/23 22:31, Caleb Connolly wrote: > > > 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. > Oh.. I saw PCAT is introduced in doc of RB5 development kit so tried with it as well. I will investigate more on this. Thanks. > 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 >> >