From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7F3311948 for ; Fri, 5 Dec 2025 13:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764940510; cv=none; b=oU5XNr/AgGc+hBsUrXFtAKN+6ZZx/xrIKvj/yV92gRc82kERX7YG8dOuw2tltqIaqHeEGT3PUSO7kyvsdfe9p+vcKPwJoKBHaS6qLMoRHbxRgk7Ly9F6vwkDqq81yG9hpnTrDMUUxHY3hYvGSREgvMJ3uqLOI21Eux+R9OeSChI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764940510; c=relaxed/simple; bh=P6Iaz2aOtsMqfxcuXLgTn3iU7uCLpjdRc+QxEx17bSI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VMC5d/81cjMtHNiP/d128qFNyNXbsv8qtGxVzn7mZbA2tl03vI51d2Kfpj0JdhJESYW6CV0etvAJ7OH733p070TnwfzLcqd4KruE720TYFRfeGHci2YLs15DLANZCk57pnvOjvK6H6F7BiRX7NI9qw9zl2ewwuilpOUCivna5y0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=k7eMSDE8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VynPNdAc; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="k7eMSDE8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VynPNdAc" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B5Cbk3x1915953 for ; Fri, 5 Dec 2025 13:15:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= m+ywHSJnRc2OkdOLEW3U9rDhFUvuD0Iwme0Y53Q+L8E=; b=k7eMSDE8MZgapD6Z VdgNvR5eU7siZfXYfjk5wsrVWBkhlvNIk+yisPPfWuNwGTT03/qdcKhVuz+BZa5U Z9YHWS9oJYvSyT7L3ypD161KPrYPc51WjE1tVXlz4CRmpLQIVkTRmFIm33xk3Xbj 4JYjybAnPiK1VTLsBuvkxtrb5o4gnG2tiH2p7FJFno+cM11BAHisEV/6DT+77sVv 0WaOUtT9uzNG/likjcy6YDs6AXGhMIg3Kz0MA43FGwAHjm64Anl5E8THc+iCsUeS aCB0vxzK8qMWE6c+rji+kuhsW1ckG5G6gbJAhBec182U9cxxrAKYC71b3mYediAA LdPRpg== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4auec1tyrs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 05 Dec 2025 13:15:06 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8b25c5dc2c3so43031185a.3 for ; Fri, 05 Dec 2025 05:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764940505; x=1765545305; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=m+ywHSJnRc2OkdOLEW3U9rDhFUvuD0Iwme0Y53Q+L8E=; b=VynPNdAcCBADCCJmSHBWNxxPEq48VMhGQM7iovNmO0QyC/ymZU9O1eDlI6X5rJe7t0 ttqTPCz3Zs37/iKJUP3DM9Pk0Ax2jMTRiGsE4yrbgvpMW1x1YbD1/RAUkEVmxrE1jZuD rTISpVkCo61Ba3EjbX96kTuxC3fmGbSRAem5wZMfjgksVps5Yghi7az43trsXOBOeewr x0uyZtO7XmlJVOp/S+nH6y3ojPlWpUjPXhsD5F3OcOO7z8Z0hFeQ6nli365bnO6Eb9qe /VF+qG7uSi91BFyx0d+PA86e1ZFwKnB6JN+siJ3VGAe3Q3c42mdzFQ9nCZZNRagLAMm2 GVjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764940505; x=1765545305; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m+ywHSJnRc2OkdOLEW3U9rDhFUvuD0Iwme0Y53Q+L8E=; b=aJtlwA9exTfsIkf5gVBqZw5Ufh478Ohaph3PBSRZs2UIA1veah2IfPodEfHDX5LNEB kbrFc4mAyG5IPkqEdheZLs6S8WtVG+daYADgOwGg88HeEimWxC0b/bwFavwtRH/W7B1l XzRXfsAcyKnx9ZDnV+pBvA4U/tqdOhaSvsrVvvaKk/ezIRjwotj76zdkqNnBmnk+MgMR rRuvhOHRxLvphA5knE8E7SUjWWK8cV9l4V/gbIBQc+yAHtvGe9w0a64jv3pk9Flq+r2Q vcFD57ofDS9gGDp1Q0+SnqfmcHVSVtiKNqkp4XdMKLyrf1r8vXVUe/mZM+VEECsfFSJL EPdQ== X-Forwarded-Encrypted: i=1; AJvYcCV2brJxk4YYgcI/DNA6VXO097wYSL6rW+1su0Gah5AB1L+BSLJVI+pagjesW9GPR8uTeX7EkdnQbLSKDXA=@vger.kernel.org X-Gm-Message-State: AOJu0YymVzLE23iEv0xRzUkjkP9JldAzRGzgqL2CctpaK5WTDg1soj64 Ocz1+2t/+I+/KP1N5sWEmFxB9/97spP/AR1CxxKoL5fO96up8d7C3oG0dsqldD92rmtqWCso1iN Ute6Ba60Vsq7yTnRB/FRL80Wi+4/p3vzFbDpBGJUR6o3e7G0gBnGo/8U9nH7mAIkjrh4= X-Gm-Gg: ASbGncsFDwGLrblLAfJeqcnBQB/C1FigQ3dMmXabYbjFJnq+lE9MT5Nxx8a59wfdAQ6 FfK9M2MrNpy6BON6XR1F6goo28chsJAzxgR56ST15nnL1mV5W6MziTOrOtkRrTu03neIph5u7t9 abvn+fzI4BXFTIcgSFeuIpYUq5KH5+jfo+nFnu+uh+J+8hy527yIw/O0BjNrxqizkON2F2iFofE 7P2GyJAsERsw9f9tbl+blH8VAcVpa89QH94bR0m++nkZgzQKzM2vluOzYaxFCcPeSQ9Zi9Y5WpE BjgMJzxfgayaXiJnUdhZhAFcY4gYFTMrqotMXhX499XrB7g1zrR5Ac7TL7vxAokzxjzCZsMcp33 4R2SZ2Bv7XfGCd7IoX8YzpQVF1hA8mtjEKF0J8yHQA/iLHjucESUJSTiVRDBwDIEvhA== X-Received: by 2002:a05:620a:370f:b0:8b2:ef78:9c1a with SMTP id af79cd13be357-8b5e74503e4mr1049116285a.11.1764940505017; Fri, 05 Dec 2025 05:15:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2TOA/4tlgmqI9XOixGEr3Bq9/K70FoiPYeFtX6Dtk8hwTUbfPmshanH19pRHfCVGeP5SSpw== X-Received: by 2002:a05:620a:370f:b0:8b2:ef78:9c1a with SMTP id af79cd13be357-8b5e74503e4mr1049110385a.11.1764940504363; Fri, 05 Dec 2025 05:15:04 -0800 (PST) Received: from [192.168.119.72] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b79f44d3d9esm355075666b.30.2025.12.05.05.15.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Dec 2025 05:15:03 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2025 14:15:00 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 11/14] firmware: qcom_scm: Add qcom_scm_pas_get_rsc_table() to get resource table To: Mukesh Ojha Cc: Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251121-kvm_rproc_v8-v8-0-8e8e9fb0eca0@oss.qualcomm.com> <20251121-kvm_rproc_v8-v8-11-8e8e9fb0eca0@oss.qualcomm.com> <86f3cb9f-e42d-40f9-9103-1a4953c66c71@oss.qualcomm.com> <20251124152538.wt3kzztqmpr76hsx@hu-mojha-hyd.qualcomm.com> <4376b7cf-7088-412b-8596-bdec5bdc273d@oss.qualcomm.com> <20251204122806.s7lnqffgcrd7usem@hu-mojha-hyd.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20251204122806.s7lnqffgcrd7usem@hu-mojha-hyd.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=HeAZjyE8 c=1 sm=1 tr=0 ts=6932dada cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=-GPZpz3KrsHxiqAZZ8kA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjA1MDA5NCBTYWx0ZWRfX11L+FdEKEXWe awf25DlTlwZask6tVwv9I8CzKpGQ7TiX8YuNBJo64bRe/xFgIBpbI0N+QeXe+qB00FcJK0i4PsO 7XyZhq1Zxc5mwiz7+X0XF6aXN12y1GTy9Fn/9zodTl5Ui7yQcZSctks5X+YoRJ0PGcFX82CvYv7 0hHDyuljih6Yf7eCRcJhEGpc81I42LaM69KLQvoSPRCt2idAmTMD54zRM/6cTmx/Hrv8GDb7kxy ZUwapg66G3KgFq3dYsvKh85EmvpbVz4ew5ZrJYMX+Mit7Yd6zw41x0VoTbfcHKAsmmHT3z73VDK aUtsjiLMgETmkDkAE62mX6njGPaByKfF0y/jUrnqErH1iJGFUNsw/arBfqiUWdh1WKQNX73H4fN AmmIbUqAVwEXL8/rSjs08ofMnkE+5A== X-Proofpoint-ORIG-GUID: fpxLc9zAtedTroDXtoe_eBQyshiAuSgw X-Proofpoint-GUID: fpxLc9zAtedTroDXtoe_eBQyshiAuSgw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-05_04,2025-12-04_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 impostorscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512050094 On 12/4/25 1:28 PM, Mukesh Ojha wrote: > On Wed, Dec 03, 2025 at 01:36:32PM +0100, Konrad Dybcio wrote: >> On 11/24/25 4:25 PM, Mukesh Ojha wrote: >>> On Mon, Nov 24, 2025 at 12:48:31PM +0100, Konrad Dybcio wrote: >>>> On 11/21/25 12:01 PM, Mukesh Ojha wrote: >>>>> Qualcomm remote processor may rely on Static and Dynamic resources for >>>>> it to be functional. Static resources are fixed like for example, >>>>> memory-mapped addresses required by the subsystem and dynamic >>>>> resources, such as shared memory in DDR etc., are determined at >>>>> runtime during the boot process. >>>>> >>>>> For most of the Qualcomm SoCs, when run with Gunyah or older QHEE >>>>> hypervisor, all the resources whether it is static or dynamic, is >>>>> managed by the hypervisor. Dynamic resources if it is present for a >>>>> remote processor will always be coming from secure world via SMC call >>>>> while static resources may be present in remote processor firmware >>>>> binary or it may be coming qcom_scm_pas_get_rsc_table() SMC call along >>>>> with dynamic resources. [...] > Just to avoid iteration, are you suggesting that we can keep this > guesswork as part of __qcom_scm_pas_get_rsc_table() and start with > something smaller than SZ_16K? > > I kind of agree with the first part, but SZ_16K was the recommended size > from the firmware for Lemans to start with, in order to pass the SMC > successfully on the first try. However, the same size was failing for > Glymur, and it required a second attempt with the correct size. It depends on the payload, which you're probably much more familiar with. If 95% of them will be closer to e.g. 1K in size, it perhaps makes sense to use up the additional few dozen cycles on our amazingly fast CPUs and retry as necessary, instead of blindly reserving a whole bunch of memory. Konrad