]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
authorMark Pearson <mpearson-lenovo@squebb.ca>
Thu, 27 Nov 2025 20:29:48 +0000 (15:29 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 22 Dec 2025 14:12:41 +0000 (16:12 +0200)
The ThinkCenter team are adding WMI certificate thumbprint support.

Updating the driver to enable it. They are using the same GUID as
Thinkpad/ThinkStation.
Tested on M75q Gen 5.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://patch.msgid.link/20251127202959.399040-1-mpearson-lenovo@squebb.ca
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/lenovo/think-lmi.c

index 540b472b1bf359b32c53893a4e78cc261ca5b63b..c45f0206b4ab636908f1cdcc477e3d09895c96dd 100644 (file)
@@ -195,7 +195,7 @@ static const struct tlmi_cert_guids thinkpad_cert_guid = {
 };
 
 static const struct tlmi_cert_guids thinkcenter_cert_guid = {
-       .thumbprint = NULL,
+       .thumbprint = LENOVO_CERT_THUMBPRINT_GUID, /* Same GUID as TP */
        .set_bios_setting = LENOVO_TC_SET_BIOS_SETTING_CERT_GUID,
        .save_bios_setting = LENOVO_TC_SAVE_BIOS_SETTING_CERT_GUID,
        .cert_to_password = LENOVO_TC_CERT_TO_PASSWORD_GUID,
@@ -709,6 +709,10 @@ static ssize_t cert_thumbprint(char *buf, const char *arg, int count)
        if (!tlmi_priv.cert_guid->thumbprint)
                return -EOPNOTSUPP;
 
+       /* Older ThinkCenter BIOS may not have support */
+       if (!wmi_has_guid(tlmi_priv.cert_guid->thumbprint))
+               return -EOPNOTSUPP;
+
        status = wmi_evaluate_method(tlmi_priv.cert_guid->thumbprint, 0, 0, &input, &output);
        if (ACPI_FAILURE(status)) {
                kfree(output.pointer);