1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_CPU_DEVICE_ID
3 #define _ASM_X86_CPU_DEVICE_ID
6 * Declare drivers belonging to specific x86 CPUs
7 * Similar in spirit to pci_device_id and related PCI functions
10 #include <linux/mod_devicetable.h>
12 #define X86_CENTAUR_FAM6_C7_D 0xd
13 #define X86_CENTAUR_FAM6_NANO 0xf
15 #define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins)
18 * X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
19 * @_vendor: The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
20 * The name is expanded to X86_VENDOR_@_vendor
21 * @_family: The family number or X86_FAMILY_ANY
22 * @_model: The model number, model constant or X86_MODEL_ANY
23 * @_steppings: Bitmask for steppings, stepping constant or X86_STEPPING_ANY
24 * @_feature: A X86_FEATURE bit or X86_FEATURE_ANY
25 * @_data: Driver specific data or NULL. The internal storage
26 * format is unsigned long. The supplied value, pointer
27 * etc. is casted to unsigned long internally.
29 * Backport version to keep the SRBDS pile consistant. No shorter variants
32 #define X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(_vendor, _family, _model, \
33 _steppings, _feature, _data) { \
34 .vendor = X86_VENDOR_##_vendor, \
37 .steppings = _steppings, \
38 .feature = _feature, \
39 .driver_data = (unsigned long) _data \
43 * Match specific microcode revisions.
45 * vendor/family/model/stepping must be all set.
47 * Only checks against the boot CPU. When mixed-stepping configs are
48 * valid for a CPU model, add a quirk for every valid stepping and
49 * do the fine-tuning in the quirk handler.
57 u32 x86_microcode_rev;
60 #define INTEL_CPU_DESC(model, stepping, revision) { \
62 .x86_vendor = X86_VENDOR_INTEL, \
63 .x86_model = (model), \
64 .x86_stepping = (stepping), \
65 .x86_microcode_rev = (revision), \
68 extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match);
69 extern bool x86_cpu_has_min_microcode_rev(const struct x86_cpu_desc *table);
71 #endif /* _ASM_X86_CPU_DEVICE_ID */