Re: [PATCH v2] soc: qcom: geni-se: Use HW PROG_RAM_DEPTH to validate firmware size
From: Konrad Dybcio
Date: Wed Jul 01 2026 - 07:12:22 EST
On 7/1/26 6:21 AM, Viken Dadhaniya wrote:
> The hardcoded MAX_GENI_CFG_RAMn_CNT limit is not accurate for all SoCs:
> some targets have less CFG RAM than the constant implies, while others
> like QCS615 need more entries than the old limit of 455 allowed, causing
> valid firmware to be rejected at load time.
>
> Rather than hardcoding a constant, read PROG_RAM_DEPTH from SE_HW_PARAM_2
> at runtime to get the actual CFG RAM depth of the hardware instance and
> use that as the upper bound for firmware size validation.
>
> Fixes: d4bf06592ad6 ("soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
> ---
[...]
> dev_err(dev,
> - "Firmware size (%u) exceeds max allowed RAMn count (%u)\n",
> - fw_size, MAX_GENI_CFG_RAMn_CNT);
> + "Firmware size (%u) exceeds HW PROG_RAM_DEPTH (%u)\n",
I would just say 'exceeds RAM size (%u)'
otherwise
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad