1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _CPU_DEVICE_ID 3 #define _CPU_DEVICE_ID 1 4 5 /* 6 * Declare drivers belonging to specific x86 CPUs 7 * Similar in spirit to pci_device_id and related PCI functions 8 */ 9 10 #include <linux/mod_devicetable.h> 11 12 extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match); 13 14 /* 15 * Match specific microcode revisions. 16 * 17 * vendor/family/model/stepping must be all set. 18 * 19 * Only checks against the boot CPU. When mixed-stepping configs are 20 * valid for a CPU model, add a quirk for every valid stepping and 21 * do the fine-tuning in the quirk handler. 22 */ 23 24 struct x86_cpu_desc { 25 __u8 x86_family; 26 __u8 x86_vendor; 27 __u8 x86_model; 28 __u8 x86_stepping; 29 __u32 x86_microcode_rev; 30 }; 31 32 #define INTEL_CPU_DESC(mod, step, rev) { \ 33 .x86_family = 6, \ 34 .x86_vendor = X86_VENDOR_INTEL, \ 35 .x86_model = mod, \ 36 .x86_stepping = step, \ 37 .x86_microcode_rev = rev, \ 38 } 39 40 extern bool x86_cpu_has_min_microcode_rev(const struct x86_cpu_desc *table); 41 42 #endif 43