diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index cbb23c3..acb14ea 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -243,7 +243,44 @@ static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst X86_MATCH_VENDOR_FAM(AMD, 22, NULL), X86_MATCH_VENDOR_FAM(AMD, 23, NULL), // Zen, Zen+, Zen 2 X86_MATCH_VENDOR_FAM(AMD, 24, NULL), // Zen - //X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + { } +}; + +static const struct x86_cpu_id force_tuxedo_dmi_string_check_match[] __initconst = { + // Zen 4 model numbers + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x60, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x61, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x62, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x63, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x64, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x65, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x66, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x67, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x68, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x69, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6a, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6c, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6d, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6e, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6f, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x70, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x71, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x72, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x73, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x74, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x75, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x76, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x77, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x78, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x79, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7a, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7c, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7d, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7e, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7f, NULL), { } }; @@ -265,8 +302,9 @@ static int __init tuxedo_keyboard_init(void) { TUXEDO_INFO("module init\n"); - if (!x86_match_cpu(skip_tuxedo_dmi_string_check_match) - && !dmi_check_system(tuxedo_dmi_string_match)) { + if (!(dmi_check_system(tuxedo_dmi_string_match) + || (x86_match_cpu(skip_tuxedo_dmi_string_check_match) + && !x86_match_cpu(force_tuxedo_dmi_string_check_match)) { return -EINVAL; }