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 0B2FE305665 for ; Tue, 30 Jun 2026 12:22:20 +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=1782822142; cv=none; b=qCtEfkIXZ9+6ur8VQrLe6T8JwOVEEaJbS01QPeXKmv/qvKhFNWr0VZSojqBEDw4WPcpGRNsHKOR61ECr7qTa7tGCBr5NVU+x6YY2SRnad3wTBzmMainrHtLoI/yavr1u8OQ8go9EDh6NhcyycVwPVUmxC4MF0T2g1vd9aVhbXLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782822142; c=relaxed/simple; bh=DvkHhs+kSoGR3lSdy4OUVLfzUrK2cmqUf6/O/VNnXvY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=inzEWBhGf0Mn0kUkq8vkVci/hhuaSznHnry5Osqmt4lcFnqk2MyRn9tZJ2x6tvuV1uOB+UkZ+Qx8LA8ilh6iWEwm0hJOFLP3ESwzW1Jkeyp2Xer6iJMZh0Kqxo5r5zQZZpnuF52fuDSAP5U3xt9IGAZxCqU5cmz9UBThdwx1IAM= 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=n/sIy784; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GOQOMsk5; 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="n/sIy784"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GOQOMsk5" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65U9n4mF1508580 for ; Tue, 30 Jun 2026 12:22:20 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= pgvqm2rFfWBgXUpd5Zjx1gkPEQkXSfAbfJSw5KWo2JM=; b=n/sIy784etah8Th5 lga4/w9nHvYJltOFEJ0BFRS3w0lGXR3Yxu6p46KD/c3wfjOQJE0778fD3Qb93SQ4 PtvQvsg7ifA1Z6Ml922tbkfH5qi5MLUv3JYvHZpsEgqL9yb8APMTpy8NHDGj7C/K Uz0Ml8zq3KImPsOSUArZQYOyKLMDo2X+nlkws3NJrPv13e7iOfdT6ivw1Xc05Sr4 FuyYprCUyJB3Chll17m5PI6qtRGQx61TngpheAtL2pdxLyJzXIHxmTh9CXww7laW xaug/94N7HPYbmh70A9i+Cx0cj00sF5NKDXbDSxybnlFa74gjvm/ttO75eFS/hqk opKmKw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f3y9j3fh3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 30 Jun 2026 12:22:20 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-37ffaca522dso1299706a91.2 for ; Tue, 30 Jun 2026 05:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782822140; x=1783426940; 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=pgvqm2rFfWBgXUpd5Zjx1gkPEQkXSfAbfJSw5KWo2JM=; b=GOQOMsk5Q3XyZ5OyS7rOOBNIWzADtxZ8tIdq6t3Mb1PHF3z+74Hw5M7/LK41i8n++n KLM0ph9rCct437oHmbkSYrl542dfKcmv536PnpJ/Cv0WHm8vLXuxfB0QvV11ikLT+Vr2 bAEhy8qfiWplr/grFP9g6lucP7ZE51YI4YSJPlaW4jV528uKsSqlgmHgjksjgHgQ7Uem XRpRUQY1OULeKF0cbmIAG8ymeiMrPYwaJsHExAykkOOSXJtttZKiPtvRoGeRjK7jE2i5 42nhdaf8TIE2I8iMXYYhFUBcn5gntbG2Kx58xgSTaPAcYZ1aOxTIP00jNDFSfgGdTLJP L12g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782822140; x=1783426940; 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=pgvqm2rFfWBgXUpd5Zjx1gkPEQkXSfAbfJSw5KWo2JM=; b=NEo+mtKJ47Tq6Okv+rH/Hsm8iCqavFYUabbeNFVqb3X5wRv9k68Zj/in78j7KFGBZe D3pMBYT5cCHp/qzz9qZXEpm1wNE8yUOpOWAtRpR/Xkm55nF6IR5rC2RoUpMV8zOT0Uv0 cX6/vHhhepIkKONb5uPAN8tLjz0E9OUeT/AcP8pXUuKDeBi8ZmIN32LX0FdFRjWq6WiE SLGeXGD+uqo6IK/FjDZN7Cn7gisZK9pOlg0hi4wgCYzEz7US/CMb0DxtMlTTylekmokl 3rwZAbOWMLlMC1XbCIonbMkFMOVzPUlrZcWuQM1GNh88DNLpvNlWqmMVsd78RFTxQu1H SdvQ== X-Forwarded-Encrypted: i=1; AHgh+Rp/4RC7xMD1KPpbIaL4oSvuUSKzfmTvNXhH2Ocf4luAvkwq2LVPsRwlOH72gL/Ex6koV7VPd549V06/mvU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7hOZZFBqNECcNE/P4hHOUFYKe0PCtKJlCv+RkLl0IhrJdFY5N o8qUkMki/jJm7eLJ3Ac96igapG4KYIoo29PTnQ84acEOOIxVh2ZK8DqKTxU88ZTue+XASRgSadV Wp4DoF+9EgZGHBQRYzG43fr+2UJPH2uX/istpmc58PZvOzpkvpoz754rObMdDYLcqgVk= X-Gm-Gg: AfdE7clSrD6O/mTYtuCjQgys3xtVz419NPPrX5exLty201fXnjxKMmc+VruxC9bz3Dw SLhpkGMRYSWk6n+BAOTyk/VvlXRJVsURdTDUDdTRW3+dPcWq4SCCg8ciTPeJ60HBN9GtuvYyYrS 0uepbJRg7SpsbQmgF89GWwidJwUcTG5fwZRXPIqVkKK3uLPE0XsEM3pHY1mR5vUowP/OS9wbCHb mSHq7ygT2/nQf+2IrKz4373wubUxBAbmKM54yVwuGKdecLEJa3XBv50nkE2kiBK3emdOXE7pPUE owlSzGk5+Maqz2yemcCPqehAEHflIC/gkV2VhhFxZTnURNegbQKhOsLhRMqo8rdg+wu622ymjOY OniK1AP1p3uzK8c4btL8ccdKDe2126cTPbrT3WwJDofGX X-Received: by 2002:a17:90a:d444:b0:37f:fd1f:d31f with SMTP id 98e67ed59e1d1-38052727020mr2275743a91.22.1782822139572; Tue, 30 Jun 2026 05:22:19 -0700 (PDT) X-Received: by 2002:a17:90a:d444:b0:37f:fd1f:d31f with SMTP id 98e67ed59e1d1-38052727020mr2275726a91.22.1782822139118; Tue, 30 Jun 2026 05:22:19 -0700 (PDT) Received: from [10.217.219.96] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38052737fbesm1689764a91.0.2026.06.30.05.22.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2026 05:22:18 -0700 (PDT) Message-ID: Date: Tue, 30 Jun 2026 17:52:15 +0530 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: Konrad Dybcio , 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: Viken Dadhaniya In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: m8C25fkhnJn87h7i5YPzmhKN1EJ5I7zu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjMwMDExNCBTYWx0ZWRfX0o6zn9DpYTbF fjgkw4cHCXJvs5e5tOOZPPLtd1YB8p6nKwFxHOKm8hlqKG+VOW2GCllvR7zgowQdg3eUUEegjo9 8j7no19eSbFMaoxcL+lH5EGib47Un5hJj5bpiTuXhCkCNt6OnqjGN8OklFfqNaa24Ukn45cdIsh YsBLswlvSAkr2Dk0LTbZ7h7xElz7DsmLSFi5GZFo3NVmrQDnfLUyCV3zbBmIRmAU59s1OiVtoZo 6l7QyZRbE3jB8zVTq7Emfy46TQDGsUYEEJCDUaccPrWws+EJCGLBmhTpkg0VhNThp0i7DOY3Nl5 mVkdF+wAevaPc0kq6GlbFNaDPK+qWiRE+RXdk7eC2xr/37VWdzUUh4410k0duz27QU/QtCJJfRw BkDKJcs6G9fDYJosB134orp5zLHBrpCWEA6fkQ9CIjuieSg17amwrlSHSF1TfcYhfQBNJuzth5C F8fp6tqemShLcY/SYkA== X-Proofpoint-GUID: m8C25fkhnJn87h7i5YPzmhKN1EJ5I7zu X-Proofpoint-Spam-Info: AW1haW4tMjYwNjMwMDExNCBTYWx0ZWRfXwYknzaVcOefD WyXc1vy6GReRR0f21tpKSyH/B7mlrKDrtoFSANMiyVlGNP/yhhBxnc2A0df/sHhNlcJanbvd0XD CoL+7ogH04Fn37FFbYdfGskiRs1wdqg= X-Authority-Analysis: v=2.4 cv=SINykuvH c=1 sm=1 tr=0 ts=6a43b4fc cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=EZYV8KM7Itfb_C3Mc5EA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 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 suspectscore=0 malwarescore=0 priorityscore=1501 spamscore=0 phishscore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606300114 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. Will address this in v2.