Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1782047rda; Tue, 24 Oct 2023 03:11:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnNkHcZHN7BTv/ybo+3+DlKJUyhWsIoF4fOlv3pL5LGC5040qh+FOt4AHKFH5yAIKsPBZz X-Received: by 2002:a05:6358:c8a:b0:168:dd67:2fe5 with SMTP id o10-20020a0563580c8a00b00168dd672fe5mr5117854rwj.8.1698142295262; Tue, 24 Oct 2023 03:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698142294; cv=none; d=google.com; s=arc-20160816; b=kPRWwFgsgudLcACUxh8kLx7CP3758I+Pyc+4ikZhVOgAl9K+faNC1Eq+9A3rtFvrpR YtVf8yH8+XHoJ5bQmC/GFKn8m7vxSpId4wsbOSPRd5Pu89qqVWuL6zoWjLVDH6TB/Hfe DCvyJlu9YwyYsPzpgV43sAets/PrImbLf9GATWGD4+6dtHIutYAE9KWCeUw5ZNm/alsg JpGiDyjAq/WBYtp8rYCLYKLEFw1G1V496Cv1RMzlD74OK8nqwcMb+2iogBO0Ul9rJo0C akgKmtsMpIUrSF2B8Vhc7jxPoEJ+vFwtueK4hzVGKYhpU8RMVwMi++gaVQU4lDwBLrww z8CA== 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=YffooxULNv7b8kk2n2L8oG5mv+aN01WiO5p6mu3vx9w=; fh=ubgXfkkrPnkLEAOwYxH+yyakXkP6P2jFMGj3zRlXu/A=; b=DaARfowLRcn4N8/9cD2ar0W2iwJ3AKY26hndSGZmyyT2gYp7REQhP0hKCh7wXq065J RGZkei9SqfPWZt+GGtoHy29ZJFVPKaUBhWKizMRMrJECDVNC+uo8H42wXtTgP7QjPLXV slLJjKHSFUdWJS43TN50JZ36RPeCCwkyFGFZWWmgL0+f+ZvlODXpYwCY5Mk5DQhxzC/K Q4CxQB7MBv6qSgfPu3lNa/JK2QwtnhADZtTVJkv3/24SrneGncK/F3xk3xXypOdyFGps 3vKkVHORu9siXWZge3DIGvHtU7ApXuxr0ZfbMrylLGEfswEue0ycSR5FsHgyUW7aWVek bGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jUogb4BX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cm22-20020a056a020a1600b00578ca217740si8132079pgb.711.2023.10.24.03.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 03:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jUogb4BX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 01A3980A4408; Tue, 24 Oct 2023 03:11:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234208AbjJXKLM (ORCPT + 99 others); Tue, 24 Oct 2023 06:11:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234227AbjJXKLJ (ORCPT ); Tue, 24 Oct 2023 06:11:09 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6969F9; Tue, 24 Oct 2023 03:11:06 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39O8KD2u030309; Tue, 24 Oct 2023 10:11: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=YffooxULNv7b8kk2n2L8oG5mv+aN01WiO5p6mu3vx9w=; b=jUogb4BX3c4RGEd3Yjfsj3z2b1YuZnJPlwJZTk7u08L5jjrIuwVcMDVJzrn9BhmfrbJh 4XKxkuqAcxg7UcwBdlVAqoJpMN7jNVScHJK/ZYaSo3PJTWzzvABecxJrhMfnhnifMbpf F7lkbbN7gudhFwiHJIXgXvvK0QZaOzrdU+5IW0epmw1GpNZfnzsQn99IaEv+oulpSqZK 63siRJ2f+psYyD8A6CoFU5liPVIDGF/HLVHi/jNQiRQwMAj7uPnC1nJZoMaUWo5XbSqt Lt7Xm97HzMVdAoS2ohBRcXPkeDexoPr/phaKm4NC+3qgbQ6oJCjgtEeFM0PjzseUr7+4 rg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tx7r80h63-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 10:11: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 39OAB2NW012545 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 10:11: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 03:10:57 -0700 Message-ID: Date: Tue, 24 Oct 2023 18:10: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: Konrad Dybcio , , , , , CC: , , , , References: <1698052857-6918-1-git-send-email-quic_zhenhuah@quicinc.com> <757382c1-142b-454c-b2b5-7ec97bd7328d@linaro.org> From: Zhenhua Huang In-Reply-To: <757382c1-142b-454c-b2b5-7ec97bd7328d@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: Ci7jOvFrbEtjXvCsYpMVLQ1TMk__-oj8 X-Proofpoint-GUID: Ci7jOvFrbEtjXvCsYpMVLQ1TMk__-oj8 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 mlxscore=0 adultscore=0 mlxlogscore=747 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240084 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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 03:11:23 -0700 (PDT) On 2023/10/23 21:50, Konrad Dybcio wrote: > On 23.10.2023 11:20, Zhenhua Huang wrote: >> Qualcomm memory dump driver is to cooperate with firmware, providing the > Firmware == The hypervisor? The TZ? Some uncore chip? It's part of bootloader which also needs to cooperate with TZ. After system crash and warm reset, system enters debug mode which needs the dump table. > >> 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. > Exposing all of the user's data.. Is this enabled by default? In theory it can be controlled by static bool download_mode = IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT); in driver qcom_scm.c. But from my local test on RB5, it can always enter into download mode seems. > >> >> 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. > Is that only something that works on engineering / prototype devices? > >> User then get full dump using PCAT and can parse out these informations. > Is PCAT open-source, or at least freely available? I see it is introduced in doc of development-kit for RB5, but in another mail Caleb mentioned it's still needing to sign up... which I need to further investigate. > >> >> Dump id and size are provided by bootconfig. The expected format of a >> bootconfig file is as follows:- > Is it the same bootconfig that Google invented? Wasn't that just key=val? Seems not same, the author is not from google :) it's kernel XBC(extra boot config): lib/bootconfig.c > >> memory_dump_config { >> { >> id = >> size = >> } >> } >> >> for example: >> memory_dump_config { >> c0_context_dump { >> id = 0 >> size = 0x800 >> } >> } >> >> Test based on 6.6-rc1. > That's sorta ancient, especially since you're likely looking to get > this merged in 6.8.. -next would probably be a better target. Sure, Thanks. Will verify in -next. > > Konrad Thanks, Zhenhua