Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1097649rda; Mon, 23 Oct 2023 02:21:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAdnQ+v/z1iSrQ75czmmi8tJivOMscg4pXI4SNvjBREXUNRvTp/BvGGWqdWe52yVNfdYEe X-Received: by 2002:a17:90a:199e:b0:27e:3342:5c1f with SMTP id 30-20020a17090a199e00b0027e33425c1fmr2358496pji.43.1698052901538; Mon, 23 Oct 2023 02:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698052901; cv=none; d=google.com; s=arc-20160816; b=SJPBthdh96Ki7cdQCg1fenBQ+9MOo9rPR3rp38rkFQVBBJwYsle/WxWtQMwYQaPV8I ncKKp4ESjEDT7iMLKTxRrFznFX9hdUiwKaqndycYUp4uBdB35wCAP7kHH2xeBYAyYLKn af6S69kDae1ueH4JLoEvoMz/zNG5P9mjE0MD1QWgF6H/UbQyqyekKAnNkrLguRwjPQFY 91qlk3ZP/kuLs9nt4c7z9SaWyJRAKtxjAX99jfFgqF/PuquIXnQGLRbSTLua0dQD7K3Z MqRT6fQyshHb3fBpSmZGtZ/n+9am2nwGicIW3ib+Njg0YfYG5XEe77bwSED0+DFe0rub pMSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=FAsGC2GCdTt739888DFQKe/Ps6P7so29IhyE17GBLnY=; fh=oG/nA4ZGdePqJPIlDBHYYjR6Qg9MrYF2KMX31XFx4X4=; b=LyT5h9LuiEYipcW2/yZQuEmoFhP2iZxI3Qj9OHhMoMwOO2oAAZpo8hhGWETArCCPsW hQZ30IYt6akHLR/i5kpkDuokNmsv7hEwiZPMDva7NQlRN9CROy/lJA336Dq+LKjzqfH6 /acPRlb20V8c1JAaP8ql6pDcSKDNX4Bw/PpoCH8hlT52U2LNgEAlHkLNsMT2L6fXmfbl jRwD9299+ry7li/gvMRZNNdv5JSOSWiGR7NPhrr9AO28p5va7iBgI/kYIZFwJteWQyZj rRj8nE5LAbNaqLbGwrgHcku7/PWxwssE5mCKxrGRvRyBLsmlG4kpf70/yXiQXgfjPpdM ZwYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SamacrxQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z22-20020a1709028f9600b001c62cfff799si6046602plo.176.2023.10.23.02.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SamacrxQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 52D0280681C6; Mon, 23 Oct 2023 02:21:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbjJWJVc (ORCPT + 99 others); Mon, 23 Oct 2023 05:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232913AbjJWJV1 (ORCPT ); Mon, 23 Oct 2023 05:21:27 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A16D7B; Mon, 23 Oct 2023 02:21:21 -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 39N7Ru3f027059; Mon, 23 Oct 2023 09:21:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=FAsGC2GCdTt739888DFQKe/Ps6P7so29IhyE17GBLnY=; b=SamacrxQLu3KOVYp0pR+8hzQsB/HU+53rz74EmcdSMU3LETJcm0krXh7h5d4sKrooFws D3nCJvBzu3cw9p76ThJq+P7mEIzCZyw7RNIfo1moP88GGlCw6I68XCLTspFtuhSSFD1o gQ4hsaqep1J/YHkFusWEv9HoggyIPEqZceOasA0VijiOCLy3jC/8I/1sdjKv34IZholu T+P1K36x20maI9QhonMM5Zs03xWq4S44yT1pZWYyw7GtGJyc3lvEqgAzW6hI27tDpv98 4Jxp3hH27S0nW/7vfBDJBt4oRCQYJ3SiRWaLIV1bZ3ER1avso27BB/bDavVeHUGkI54s DQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tv71d3k53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 09:21:18 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39N9LGjT015469 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 09:21:16 GMT Received: from zhenhuah-gv.qualcomm.com (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; Mon, 23 Oct 2023 02:21:11 -0700 From: Zhenhua Huang To: , , , , , CC: , , , , , Zhenhua Huang Subject: [PATCH v1 0/5] soc/arm64: qcom: add initial version of memory dump Date: Mon, 23 Oct 2023 17:20:52 +0800 Message-ID: <1698052857-6918-1-git-send-email-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain 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-ORIG-GUID: SUg97CiL91Q73T6CwbAsLCIowSgXIcl0 X-Proofpoint-GUID: SUg97CiL91Q73T6CwbAsLCIowSgXIcl0 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-23_07,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=421 clxscore=1011 suspectscore=0 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310230080 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 02:21:39 -0700 (PDT) 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. 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 -- 2.7.4