From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 C5DD440FDA5 for ; Tue, 30 Jun 2026 12:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782824380; cv=none; b=ft74bF57MGL1MlmPLfDbSkfOI6+JmM9w20OVn8dMwW9vqRTAcMIDwT/Z8iTRF/rLJHvdcuwSTrx2WklSIQMbpF7D94fSVsPkuqL+sDpbRiFYU6rgNkSeZ40/Z03pwqVGJ2ChvMNMsgc2xa3dsLwCPSI5ttl0WsJ6QsvFCcIY60U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782824380; c=relaxed/simple; bh=dFKj7OXQ0zQrD5vQZr5mW8dOzbMKpyu6PQoCEKaFsO0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=d34989C7uMmLNF8VsmJNbHX/AHPY6JutDtYygAp0bT4c4wUvQ1R6f6IcUNYxoqTAzecmWQj1PPdwSf1hHrlDXwEFVDXfZOiMLLSlw+/jdmVpo3xtenCTMv5PJY/LYs+ibf9sOjRW0bLkfQ45yCshTZFAbiA8yc+At2/ClJbFk6E= 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=J+k4zO3D; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=QB5FMT+/; arc=none smtp.client-ip=205.220.180.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="J+k4zO3D"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="QB5FMT+/" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65U9n2hd1573524 for ; Tue, 30 Jun 2026 12:59:37 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= 0+jw6agAVMfXrVb944GCduKScckC8PemaDQU7rdZ3eY=; b=J+k4zO3DgOGWcfPo xsBUuofmwuGmcWBjG/991G4glIdHakl3CIgT/rLmzaUD3FWoAMiYtyw25FXXJltw 89PpnUBfuAOCZP+wxfNK5CdYFpSVaTka8pZP/Pv4j0bISREG8oIBox1H7AHY0KzP T8UmwPxyYdiUY7SrMjWO6AWS/PFgnqccDvkDOdEgWh+Bosg4Oc9ckWqCDxIMJ/Aq s++ils1j3KD+cngPT9kjOzzTUeB4eM67qU1IZNcsyCrGka+H7klLWSpgoYSTt6GG nHceUHwiywxHbtVYNPrChRm8dNOsYmUZteYYvg4TxHBk0lyWdENkLObSaWpPdKr2 gw27BQ== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f46862a05-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 30 Jun 2026 12:59:37 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c1857417aso227821cf.1 for ; Tue, 30 Jun 2026 05:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782824377; x=1783429177; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=0+jw6agAVMfXrVb944GCduKScckC8PemaDQU7rdZ3eY=; b=QB5FMT+/k5y1McDyTjmLgD8PUzuFTkAU2zrmxodlH7X8+06prfBMqpAj3RkJJ2AAr3 Hv341aR+d8MBlQlMvYqxsbRUFi9SvVqTsRp3D9fBvqY8keeSbxECD+Lbh8ch1pKEkYp5 ap4ARJ0e9UrCUCyw5uZzJ1+zDTmIdaIE88B1X2GXsOigOonRArT2yysxi8cIwZ01BWKl zFAKzKiBt/tayMDx3NURbd092slyNcyZQK5uV7RF2/39rGxu5BirG4lJsZ76SwBI6ijA PUK1JfNOXb9mlAV/QBqgR7R1fmtvgxJcXuSSYdncU0ra8J47nTrG/K4YNbm9wGX419Ai MFJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782824377; x=1783429177; h=content-transfer-encoding:content-type: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:content-type; bh=0+jw6agAVMfXrVb944GCduKScckC8PemaDQU7rdZ3eY=; b=nAAxQSXpX4KukqJjcPp4YDCt292qitOXH65X0XEaeR8QjLGYTwUQHm3/76AMuYHBMb 7PcEiGxCJdTg/NIRBr5CEVLNSQsCOF6jrPjCMnQinKRkjnKb231IsJeWzjjZL36wfuN+ b1HUudE6aI88A7CF92Gek2IAweZsBKmvtdGyXdwbMX6t7UTj1EIvSrp0qzBDA3eUMco7 KR5HOccfXHepIbZRRZ2EwiKua3bwkwVKuP4MV2sD8pQXNUgnwZMOCAiQXgwOaFVWlb6F SDU8bYM8EriVNjaWEsNadjR14fMp2xi2S901kEwqiTVmd0YNXC17J59VNwJ+4Dj/y098 n4zg== X-Forwarded-Encrypted: i=1; AFNElJ/dRj7CXwASgEKSCdFz4++7b3Q8X5R9BGAZ/j9OEHsU9PbY932zV6eBQx69fqbbx0CPYpRckNnla4Ty3qQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwUsLBg7ugRH8kVBZ884Sd7NN7guMt3OAFJIZN8X1lS9lpCg9B0 zTGkjAQXFj2xX2mqc6zoVPuXQrIoDyUhpN3dU2L+SIL7Z7dde1mtwweu0pLSKnTnl7msVZQva3H DpN5irKmwiPSIQ5MH8Sxjmg8byR+CcMMhvdCKWhJxLGhY/UKPgEoKh4sIdW89Yl+oCro= X-Gm-Gg: AfdE7cmh/3cRAM+GN/wXNZO7wF2SnxyScg9PP5LZwAXZVo56Lqrp+UaYyCSyrYXIAWV 99XmC5R7G3Gdpuff6Q4snF31VzH0Njsw54O0jGHqxaw0CJyniCEjv3Vws6l8TM1FfSFkPPdOu2R GfoN4RoAIzzECr+8rT1/gMqWUdiHqwfwGegcIWf7NQ35or8+TBcacnLj5cFNYwAJlUEQBAhtKi2 lmSN8jFA0izsCjVQb7erUbnl15hkcXMMjSRoHhkqtI/7wUju7gehLhnGueiTrncdKbUH9AZ4q/A 6zBFxam/swBEtcywDKBTxADEvhKS0PkD25DH+kOl4OOpVfDufq4JbKf982oyWhoZV46y1nQGTXn lrJkX2FbP/FG63PmsmVK5m5IIllWcykl5WX8= X-Received: by 2002:ac8:59d4:0:b0:51c:8fb:fa46 with SMTP id d75a77b69052e-51c108ea935mr31465621cf.9.1782824376962; Tue, 30 Jun 2026 05:59:36 -0700 (PDT) X-Received: by 2002:ac8:59d4:0:b0:51c:8fb:fa46 with SMTP id d75a77b69052e-51c108ea935mr31465301cf.9.1782824376338; Tue, 30 Jun 2026 05:59:36 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1288f0d68asm120373866b.31.2026.06.30.05.59.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2026 05:59:35 -0700 (PDT) Message-ID: Date: Tue, 30 Jun 2026 14:59:34 +0200 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 v1] soc: qcom: geni-se: Increase MAX_GENI_CFG_RAMn_CNT to 1020 To: Viken Dadhaniya , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260522-qup-se-increase-ram-cnt-v1-1-71854d0b2ef0@oss.qualcomm.com> <09fb9e91-2585-4cb5-8bfb-92df304e9d6c@oss.qualcomm.com> <5363525f-9440-49bd-83db-242a7ed4e15d@oss.qualcomm.com> <9e57f91b-8f80-41d4-b50f-31c900cb0fd0@oss.qualcomm.com> <79520895-f584-47e1-8206-3b7c06b759d4@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: 3jzJ_QdpS5tc06XHGB6d0KwrFbISHrzJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjMwMDEyMSBTYWx0ZWRfX5y7lxOb6IIzU isVRsUXvR7ERW9K/5HvLsnUhDjnmPTbtf0iyyfIxLnqOeZiwvaXgkdZNh9TSx+/bGzp2iZJS7FC dekRItZ84QUITZY2DjcAROdB3YTd+DclpkTOkJmy8zqiE9kgr/efhMDMF/25q5v6qKd/55ZaRAi 3ezWe1nNU+gBDQ4YdeVKxaP4tiw3J6Hf8V8muTn+bIqnT3U9PMO81b2uRgkpQAM5gkEbVuMXpDK AeWZNKU4i6Doi08omHY8ihhpyAxJceyCn1fPKWayOMHRuANzMCOWCGH8RgvXMpdJvctuJkfQije 08XbSoKVxNIHUPuBjYq4+Lg3udQyli9Qd5O09L58wkwEHsTCrgmtacFQSwp/DVga5RGpSZ10FBt DDfGTsLBhbA0nYwPvwv0tv0NiZU+ttkFw6B6fFKF9Zoy6pNdFBs3exc9gLusYHfPq/uyHqtOeEj BUcHvICyTFkgGsqLNVg== X-Proofpoint-GUID: 3jzJ_QdpS5tc06XHGB6d0KwrFbISHrzJ X-Authority-Analysis: v=2.4 cv=FbcHAp+6 c=1 sm=1 tr=0 ts=6a43bdb9 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=zJm8CUoxnjNxqJeWGtEA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjMwMDEyMSBTYWx0ZWRfX5mJSQLbIdjLS AyhUT6FxL3m2/4546aXiWwsr3a58X0I5FZJpfnM/F7R2NyPvoa85tsYUO/4aV5wTfMQSBo9zija K5JIR7XrSdXCX8nPoGtZ7zLz3PR6i7A= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-30_03,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606300121 On 6/30/26 2:22 PM, Viken Dadhaniya wrote: > > > On 6/23/2026 12:20 PM, Konrad Dybcio wrote: >> On 6/22/26 7:15 PM, Viken Dadhaniya wrote: >>> >>> >>> On 6/15/2026 5:30 PM, Konrad Dybcio wrote: >>>> On 6/15/26 2:00 PM, Konrad Dybcio wrote: >>>>> On 6/15/26 7:28 AM, Viken Dadhaniya wrote: >>>>>> >>>>>> >>>>>> On 6/9/2026 8:40 PM, Konrad Dybcio wrote: >>>>>>> On 5/22/26 9:21 AM, Viken Dadhaniya wrote: >>>>>>>> The current MAX_GENI_CFG_RAMn_CNT value of 455 is insufficient for >>>>>>>> certain Qualcomm SoCs whose GENI firmware requires up to 1020 RAM >>>>>>>> entries, causing incorrect bounds checking and preventing firmware >>>>>>>> loading on those targets. >>>>>>>> >>>>>>>> Increase MAX_GENI_CFG_RAMn_CNT to 1020 to match the hardware-supported >>>>>>>> limit and ensure correct handling of configuration RAM regions across >>>>>>>> GENI-based SE blocks. >>>>>>>> >>>>>>>> Signed-off-by: Viken Dadhaniya >>>>>>>> --- >>>>>>>> drivers/soc/qcom/qcom-geni-se.c | 2 +- >>>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>>>> >>>>>>>> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c >>>>>>>> index cd1779b6a91a..d0810960f3da 100644 >>>>>>>> --- a/drivers/soc/qcom/qcom-geni-se.c >>>>>>>> +++ b/drivers/soc/qcom/qcom-geni-se.c >>>>>>>> @@ -152,7 +152,7 @@ struct se_fw_hdr { >>>>>>>> /*Magic numbers*/ >>>>>>>> #define SE_MAGIC_NUM 0x57464553 >>>>>>>> >>>>>>>> -#define MAX_GENI_CFG_RAMn_CNT 455 >>>>>>>> +#define MAX_GENI_CFG_RAMn_CNT 1020 >>>>>>> >>>>>>> Is there any SoC where this could overflow the register space >>>>>>> (you say "certain Qualcomm SoCs")? >>>>>> >>>>>> Yes, on Talos (QCS615), the firmware image needs more than 455 CFG RAM >>>>>> entries, so the previous limit could overflow. >>>>> >>>>> What I'm asking is whether the size of the RAM on any of the SoCs >>>>> is less than 455 (the previous limit) >>>> >>>> *Less than 1020 (the new limit), of course.. >>>> >>>> Konrad >>> >>> Yes, some SoCs like kodiak, monaco and lemans have CFG RAM smaller than >>> 455. But MAX_GENI_CFG_RAMn_CNT is only a firmware ceiling; the actual >>> programmed size comes from the firmware header. Talos needs ~650 items, >>> so the old 455 limit rejects valid firmware. Raising it to 1020 fixes >>> that without changing programming behavior. >> >> OK >> >> I tried to find whether there's a "ram size" register to limit it further >> (i.e. have a different upper bound for different platforms), but there >> doesn't seem to be one.. unless we can deduce it from the version >> register? >> >> Konrad > > Actually, there is: SE_HW_PARAM_2 has a PROG_RAM_DEPTH field that gives the > exact CFG RAM depth for the instance. We can read it at runtime and use it > as the upper bound directly, which makes the check accurate for all SoCs > without hard-coding any constant. Amazing, nice find! Konrad