Re: [PATCH v2 1/4] firmware: qcom: scm: allow specifying quirks for QSEECOM implementations

From: Konrad Dybcio
Date: Mon Jun 23 2025 - 06:41:54 EST


On 6/21/25 9:56 PM, Dmitry Baryshkov wrote:
> Some of QSEECOM implementations might need additional quirks (e.g. some
> of the platforms don't (yet) support read-write UEFI variables access).
> Pass the quirks to the QSEECOM driver and down to individual app
> drivers.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---

[...]

> -static bool qcom_scm_qseecom_machine_is_allowed(void)
> +static bool qcom_scm_qseecom_machine_is_allowed(unsigned long *quirks)
> {
> + const struct of_device_id *match;
> struct device_node *np;
> - bool match;
>
> np = of_find_node_by_path("/");
> if (!np)
> @@ -2020,6 +2020,11 @@ static bool qcom_scm_qseecom_machine_is_allowed(void)
> match = of_match_node(qcom_scm_qseecom_allowlist, np);
> of_node_put(np);
>
> + if (match && match->data)
> + memcpy(quirks, match->data, sizeof(*quirks));

bit weird to use memcpy since it's just an UL

Konrad