Skip to content

Commit 0512606

Browse files
mrhpearsonij-intel
authored andcommitted
platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
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>
1 parent a5b9fdd commit 0512606

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/platform/x86/lenovo/think-lmi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static const struct tlmi_cert_guids thinkpad_cert_guid = {
195195
};
196196

197197
static const struct tlmi_cert_guids thinkcenter_cert_guid = {
198-
.thumbprint = NULL,
198+
.thumbprint = LENOVO_CERT_THUMBPRINT_GUID, /* Same GUID as TP */
199199
.set_bios_setting = LENOVO_TC_SET_BIOS_SETTING_CERT_GUID,
200200
.save_bios_setting = LENOVO_TC_SAVE_BIOS_SETTING_CERT_GUID,
201201
.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)
709709
if (!tlmi_priv.cert_guid->thumbprint)
710710
return -EOPNOTSUPP;
711711

712+
/* Older ThinkCenter BIOS may not have support */
713+
if (!wmi_has_guid(tlmi_priv.cert_guid->thumbprint))
714+
return -EOPNOTSUPP;
715+
712716
status = wmi_evaluate_method(tlmi_priv.cert_guid->thumbprint, 0, 0, &input, &output);
713717
if (ACPI_FAILURE(status)) {
714718
kfree(output.pointer);

0 commit comments

Comments
 (0)