Message ID | 20241103-rework-qseecom-v1-0-1d75d4eedc1e@linaro.org |
---|---|
Headers | show |
Series | firmware: scm: rework allowlist to be more scalable | expand |
On 3.11.2024 4:37 PM, Dmitry Baryshkov wrote: > In preparation to enabling QSEECOM for the platforms rather than > individual machines provide a mechanism for the user to override default > selection. Allow users to use qcom_scm.qseecom modparam. Setting it to > 'force' will enable QSEECOM even if it disabled or not handled by the > allowlist. Setting it to 'off' will forcebly disable the QSEECOM > interface, allowing incompatible machines to function. All other values > mean 'auto', trusting the allowlist in the module. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- [...] > > -static bool qcom_scm_qseecom_machine_is_allowed(void) > +static bool qcom_scm_qseecom_machine_is_allowed(struct device *scm_dev) > { > struct device_node *np; > bool match; > > + if (!strcmp(qseecom, "off")) { > + dev_info(scm_dev, "qseecom: disabled by modparam\n"); > + return false; > + } else if (!strcmp(qseecom, "force")) { > + dev_info(scm_dev, "qseecom: forcebly enabled\n"); forcibly may also be useful to say "by modparam" here as well Konrad
Listing individual devices in the qcom_scm_qseecom_allowlist table doesn't really scale. For each new device we have to add both DT and an entry in the table. This way handling new devices by distributions becomes more complicated: it's not enough to add new DT, the qcom_scm also has to be patched. Replace a machine-based allowlist with the platform-based table. If a particular device has buggy or incompatible firmware, it still can be disabled in the table. And while the patch to disable it is pending, make it possible to use qcom_scm.qseecom kernel argument to forcebly enable or disable usage of QSEECOM. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- Dmitry Baryshkov (2): firmware: qcom: scm: add modparam to control QSEECOM enablement firmware: qcom: scm: rework QSEECOM allowlist drivers/firmware/qcom/qcom_scm.c | 54 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 18 deletions(-) --- base-commit: c88416ba074a8913cf6d61b789dd834bbca6681c change-id: 20241103-rework-qseecom-a6c8ceffc424 Best regards,