soc/intel/cmn/cse: Deprecate CONFIG_SOC_INTEL_CSE_RW_VERSION
[coreboot2.git] / util / inteltool / inteltool.c
blob6491a94741c99dc398df9cc22dafe1ea195ed7ce
1 /* inteltool - dump all registers on an Intel CPU + chipset based system */
2 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <inttypes.h>
8 #include <getopt.h>
9 #include <fcntl.h>
10 #include <sys/mman.h>
11 #include <unistd.h>
12 #include <errno.h>
13 #include <limits.h>
14 #include "inteltool.h"
15 #include "pcr.h"
17 #ifdef __NetBSD__
18 #include <machine/sysarch.h>
19 #endif
21 #define MAX_PCR_PORTS 8 /* how often may `--pcr` be specified */
23 enum long_only_opts {
24 LONG_OPT_PCR = 0x100,
25 LONG_OPT_RANGE = 0x101,
29 * http://pci-ids.ucw.cz/read/PC/8086
30 * http://en.wikipedia.org/wiki/Intel_Tick-Tock
31 * http://en.wikipedia.org/wiki/List_of_Intel_chipsets
32 * http://en.wikipedia.org/wiki/Intel_Xeon_chipsets
34 static const struct {
35 uint16_t vendor_id, device_id;
36 char *name;
37 } supported_chips_list[] = {
38 /* Host bridges/DRAM controllers (Northbridges) */
39 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443LX, "443LX" },
40 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX, "443BX" },
41 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_NO_AGP, "443BX without AGP" },
42 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810, "810" },
43 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_DC, "810-DC100" },
44 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810E_DC, "810E DC-133" },
45 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82830M, "830M" },
46 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845, "845" },
47 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82865, "865" },
48 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915, "915G/P/GV/GL/PL/910GL" },
49 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945P, "945P" },
50 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945GM, "945GM" },
51 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945GSE, "945GSE" },
52 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82946, "946GZ/PL" },
53 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82965PM, "965PM" },
54 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82Q965, "Q963/82Q965" },
55 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82975X, "975X" },
56 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82G33, "P35/G33/G31/P31" },
57 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82Q33, "Q33" },
58 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82Q35, "Q35" },
59 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82X38, "X38/X48" },
60 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_32X0, "3200/3210" },
61 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82XX4X,
62 "GL40/GS40/GM45/GS45/PM45" },
63 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82Q45, "Q45/Q43" },
64 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82G45, "G45/G43/P45/P43" },
65 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82G41, "G41" },
66 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82B43, "B43 (Base)" },
67 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82B43_2, "B43 (Soft)" },
68 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82X58, "X58" },
69 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000P,
70 "Intel i5000P Memory Controller Hub" },
71 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000X,
72 "Intel i5000X Memory Controller Hub" },
73 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000Z,
74 "Intel i5000Z Memory Controller Hub" },
75 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000V,
76 "Intel i5000V Memory Controller Hub" },
77 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_POULSBO, "SCH Poulsbo" },
78 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ATOM_DXXX,
79 "Atom D400/500 Series" },
80 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ATOM_NXXX, "Atom N400 Series" },
81 /* Host bridges /DRAM controllers integrated in CPUs */
82 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_0TH_GEN,
83 "0th generation (Nehalem family) Core Processor" },
84 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_1ST_GEN,
85 "1st generation (Westmere family) Core Processor" },
86 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_2ND_GEN_D,
87 "2nd generation (Sandy Bridge family) Core Processor (Desktop)" },
88 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_2ND_GEN_M,
89 "2nd generation (Sandy Bridge family) Core Processor (Mobile)" },
90 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_2ND_GEN_E3,
91 "2nd generation (Sandy Bridge family) Core Processor (Xeon E3)" },
92 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_3RD_GEN_D,
93 "3rd generation (Ivy Bridge family) Core Processor (Desktop)" },
94 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_3RD_GEN_M,
95 "3rd generation (Ivy Bridge family) Core Processor (Mobile)" },
96 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_3RD_GEN_E3,
97 "3rd generation (Ivy Bridge family) Core Processor (Xeon E3 v2)" },
98 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_3RD_GEN_015c,
99 "3rd generation (Ivy Bridge family) Core Processor" },
100 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_4TH_GEN_D,
101 "4th generation (Haswell family) Core Processor (Desktop)" },
102 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_4TH_GEN_M,
103 "4th generation (Haswell family) Core Processor (Mobile)" },
104 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_4TH_GEN_E3,
105 "4th generation (Haswell family) Core Processor (Xeon E3 v3)" },
106 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_4TH_GEN_U,
107 "4th generation (Haswell family) Core Processor ULT" },
108 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_5TH_GEN_U,
109 "5th generation (Broadwell family) Core Processor ULT" },
110 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_5TH_GEN_D,
111 "5th generation (Broadwell family) Core Processor (Desktop)" },
112 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_5TH_GEN_M,
113 "5th generation (Broadwell family) Core Processor (Mobile)" },
114 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_M,
115 "6th generation (Skylake-H family) Core Processor (Mobile)" },
116 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_WST,
117 "6th generation (Skylake-S/H family) Core Processor (Workstation)" },
118 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_D,
119 "6th generation (Skylake-S family) Core Processor (Desktop)" },
120 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_D2,
121 "6th generation (Skylake-S family) Core Processor (Desktop)" },
122 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_E,
123 "6th generation (Skylake family) Core Processor Xeon E (Server)" },
124 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_U,
125 "6th generation (Skylake family) Core Processor (Mobile)" },
126 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_Y,
127 "6th generation (Skylake family) Core Processor (Mobile)" },
128 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL, "Bay Trail" },
129 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_U,
130 "7th generation (Kaby Lake family) Core Processor (Mobile)" },
131 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_Y,
132 "7th generation (Kaby Lake family) Core Processor (Mobile)" },
133 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_U_Q,
134 "7th generation (Kaby Lake family) Core Processor (Mobile)" },
135 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_E3,
136 "7th generation (Kaby Lake family) Core Processor Xeon E3-1200" },
137 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_8TH_GEN_U_1,
138 "8th generation (Coffee Lake family) Core Processor (Mobile)" },
139 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_8TH_GEN_U_2,
140 "8th generation (Whiskey Lake family) Core Processor (Mobile)" },
141 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_10TH_GEN_U,
142 "10th generation (Icelake family) Core Processor (Mobile)" },
143 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U1,
144 "10th generation (Comet Lake family) Core Processor (Mobile)" },
145 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U2,
146 "10th generation (Comet Lake family) Core Processor (Mobile)" },
147 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U3,
148 "10th generation (Comet Lake family) Core Processor (Mobile)" },
149 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HEWITTLAKE,
150 "Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D (Hewitt Lake)" },
151 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SAPPHIRERAPIDS_SP,
152 "Xeon Scalable Processor 4th generation (Sapphire Rapids SP)" },
153 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_U_2,
154 "11th generation (Tiger Lake UP3 family) Core Processor (Mobile)" },
155 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_U_4,
156 "11th generation (Tiger Lake UP3 family) Core Processor (Mobile)" },
157 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_Y_2,
158 "11th generation (Tiger Lake UP4 family) Core Processor (Mobile)" },
159 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_Y_4,
160 "11th generation (Tiger Lake UP4 family) Core Processor (Mobile)" },
161 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_4,
162 "11th generation (Tiger Lake H family) Core Processor (Mobile)" },
163 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_6,
164 "11th generation (Tiger Lake H family) Core Processor (Mobile)" },
165 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_8,
166 "11th generation (Tiger Lake H family) Core Processor (Mobile)" },
167 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_8,
168 "12th generation (Alder Lake S family) Core Processor (Desktop)" },
169 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_4,
170 "12th generation (Alder Lake S family) Core Processor (Desktop)" },
171 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_6_4,
172 "12th generation (Alder Lake S family) Core Processor (Desktop)" },
173 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_0,
174 "12th generation (Alder Lake S family) Core Processor (Desktop)" },
175 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_6_0,
176 "12th generation (Alder Lake S family) Core Processor (Desktop)" },
177 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_P_6_8,
178 "12th generation (Alder Lake P family) Core Processor"},
179 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_P_4_8,
180 "12th generation (Alder Lake P family) Core Processor"},
181 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_P_2_8,
182 "12th generation (Alder Lake P family) Core Processor"},
183 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_RPL_ID_H_8_6,
184 "13th generation (Raptor Lake H family) Core Processor"},
186 /* Southbridges (LPC controllers) */
187 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371XX, "371AB/EB/MB" },
188 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10, "ICH10" },
189 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10D, "ICH10D" },
190 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10DO, "ICH10DO" },
191 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10R, "ICH10R" },
192 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9DH, "ICH9DH" },
193 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9DO, "ICH9DO" },
194 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9R, "ICH9R" },
195 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9, "ICH9" },
196 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9M, "ICH9M" },
197 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9ME, "ICH9M-E" },
198 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8M, "ICH8-M" },
199 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8ME, "ICH8M-E" },
200 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8, "ICH8" },
201 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_NM10, "NM10" },
202 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7MDH, "ICH7-M DH" },
203 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7M, "ICH7-M" },
204 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7, "ICH7" },
205 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7DH, "ICH7DH" },
206 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6, "ICH6" },
207 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH5, "ICH5" },
208 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH4M, "ICH4-M" },
209 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH4, "ICH4" },
210 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH2, "ICH2" },
211 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH0, "ICH0" },
212 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH, "ICH" },
213 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I63XX, "631xESB/632xESB/3100" },
214 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_POULSBO_LPC, "SCH Poulsbo" },
215 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_DESKTOP, "3400 Desktop" },
216 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_MOBILE, "3400 Mobile" },
217 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_P55, "P55" },
218 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PM55, "PM55" },
219 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H55, "H55" },
220 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM57, "QM57" },
221 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H57, "H57" },
222 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM55, "HM55" },
223 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q57, "Q57" },
224 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM57, "HM57" },
225 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_MOBILE_SFF,
226 "3400 Mobile SFF" },
227 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B55_A, "B55" },
228 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS57, "QS57" },
229 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400, "3400" },
230 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3420, "3420" },
231 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3450, "3450" },
232 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B55_B, "B55" },
233 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z68, "Z68" },
234 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_P67, "P67" },
235 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UM67, "UM67" },
236 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM65, "HM65" },
237 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H67, "H67" },
238 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM67, "HM67" },
239 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q65, "Q65" },
240 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS67, "QS67" },
241 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q67, "Q67" },
242 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM67, "QM67" },
243 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B65, "B65" },
244 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C202, "C202" },
245 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C204, "C204" },
246 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C206, "C206" },
247 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H61, "H61" },
248 { PCI_VENDOR_ID_INTEL, 0x1d40, "X79" },
249 { PCI_VENDOR_ID_INTEL, 0x1d41, "X79" },
250 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z77, "Z77" },
251 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z75, "Z75" },
252 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q77, "Q77" },
253 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q75, "Q75" },
254 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B75, "B75" },
255 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H77, "H77" },
256 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C216, "C216" },
257 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM77, "QM77" },
258 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS77, "QS77" },
259 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM77, "HM77" },
260 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UM77, "UM77" },
261 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM76, "HM76" },
262 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM75, "HM75" },
263 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM70, "HM70" },
264 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_NM70, "NM70" },
265 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICELAKE_LP_U,
266 "Icelake U LPC" },
267 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_FULL,
268 "Lynx Point Low Power Full Featured Engineering Sample" },
269 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_PREM,
270 "Lynx Point Low Power Premium SKU" },
271 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_BASE,
272 "Lynx Point Low Power Base SKU" },
273 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_PREM,
274 "Wildcat Point Low Power Premium SKU" },
275 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP,
276 "Wildcat Point Low Power Base SKU" },
277 { PCI_VENDOR_ID_INTEL, 0x2310, "DH89xxCC" },
278 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC, "Bay Trail" },
279 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_PRE,
280 "Sunrise Point Desktop Engineering Sample" },
281 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_PRE,
282 "Sunrise Point-LP Engineering Sample" },
283 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_SKL,
284 "Sunrise Point-LP U Base/Skylake" },
285 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_SKL,
286 "Sunrise Point-LP Y Premium/Skylake" },
287 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_SKL,
288 "Sunrise Point-LP U Premium/Skylake" },
289 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_KBL,
290 "Sunrise Point-LP U Base/Kabylake" },
291 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_KBL,
292 "Sunrise Point-LP Y Premium/Kabylake" },
293 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_KBL,
294 "Sunrise Point-LP U Premium/Kabylake" },
295 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_BASE,
296 "Sunrise Point-LP U iHDCP 2.2 Base/Kabylake" },
297 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_PREM,
298 "Sunrise Point-LP U iHDCP 2.2 Premium/Kabylake" },
299 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_IHDCP_PREM,
300 "Sunrise Point-LP Y iHDCP 2.2 Premium/Kabylake" },
301 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CANNONPOINT_LP_U_PREM,
302 "Cannon Point-LP U Premium/CoffeeLake/Whiskeylake" },
303 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COMETPOINT_LP_U_PREM,
304 "Comet Point-LP U Premium/Cometlake" },
305 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COMETPOINT_LP_U_BASE,
306 "Comet Point-LP U Base/Cometlake" },
307 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_SUPER,
308 "Tiger Point U Engineering Sample" },
309 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_PREM,
310 "Tiger Point U Premium/Tigerlake" },
311 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_BASE,
312 "Tiger Point U Base/Tigerlake" },
313 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_Y_SUPER,
314 "Tiger Point Y Engineering Sample" },
315 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_Y_PREM,
316 "Tiger Point Y Premium/Tigerlake" },
317 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H110, "H110" },
318 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H170, "H170" },
319 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z170, "Z170" },
320 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q170, "Q170" },
321 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q150, "Q150" },
322 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B150, "B150" },
323 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C236, "C236" },
324 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C232, "C232" },
325 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM170, "QM170" },
326 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM170, "HM170" },
327 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM236, "CM236" },
328 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM175, "HM175" },
329 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM175, "QM175" },
330 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM238, "CM238" },
331 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621, "C621" },
332 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621A, "C621A" },
333 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C622, "C622" },
334 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C624, "C624" },
335 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C625, "C625" },
336 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C626, "C626" },
337 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627, "C627" },
338 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C628, "C628" },
339 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C629, "C629" },
340 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C624_SUPER, "C624 Super SKU" },
341 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627_SUPER_1, "C627 Super SKU" },
342 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621_SUPER, "C621 Super SKU" },
343 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627_SUPER_2, "C627 Super SKU" },
344 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C628_SUPER, "C628 Super SKU" },
345 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EBG, "Emmits Burg" },
346 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H270, "H270" },
347 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z270, "Z270" },
348 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q270, "Q270" },
349 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q250, "Q250" },
350 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B250, "B250" },
351 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z370, "Z370" },
352 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H310C, "H310C" },
353 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X299, "X299" },
354 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H310, "H310" },
355 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H370, "H370" },
356 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z390, "Z390" },
357 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q370, "Q370" },
358 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B360, "B360" },
359 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C246, "C246" },
360 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C242, "C242" },
361 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM370, "QM370" },
362 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM370, "HM370" },
363 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM246, "CM246" },
364 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C8_MOBILE, "C8 Mobile"},
365 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C8_DESKTOP, "C8 Desktop"},
366 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z87, "Z87"},
367 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z85, "Z85"},
368 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM86, "HM86"},
369 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H87, "H87"},
370 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM87, "HM87"},
371 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q85, "Q85"},
372 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q87, "Q87"},
373 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM87, "QM87"},
374 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B85, "B85"},
375 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C222, "C222"},
376 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C224, "C224"},
377 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C226, "C226"},
378 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H81, "H81"},
379 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C9_MOBILE, "C9 Mobile"},
380 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C9_DESKTOP, "C9 Desktop"},
381 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM97, "HM97"},
382 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z97, "Z97"},
383 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H97, "H97"},
384 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_APL_LPC, "Apollo Lake" },
385 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_LPC, "Denverton" },
386 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GLK_LPC, "Gemini Lake" },
387 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H510, "H510" },
388 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H570, "H570" },
389 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z590, "Z590" },
390 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q570, "Q570" },
391 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B560, "B560" },
392 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W580, "W580" },
393 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C256, "C256" },
394 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C252, "C252" },
395 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM570, "HM570" },
396 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM580, "QM580" },
397 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM590, "WM590" },
398 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H610E, "H610E" },
399 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q670E, "Q670E" },
400 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_R680E, "R680E" },
401 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H610, "H610" },
402 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B660, "B660" },
403 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H670, "H670" },
404 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q670, "Q670" },
405 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z690, "Z690" },
406 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W680, "W680" },
407 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM690, "WM690" },
408 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM670, "HM670" },
409 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W790, "W790" },
410 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z790, "Z790" },
411 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H770, "H770" },
412 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B760, "B760" },
413 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM770, "HM770" },
414 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM790, "WM790" },
415 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C262, "C262" },
416 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C266, "C266" },
417 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EHL, "Elkhart Lake" },
418 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_JSL, "Jasper Lake" },
419 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_RPL_P, "Raptor Lake" },
421 /* Intel GPUs */
422 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G35_EXPRESS,
423 "Intel(R) G35 Express Chipset Family" },
424 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G35_EXPRESS_1,
425 "Intel(R) G35 Express Chipset Family" },
426 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS,
427 "Mobile Intel(R) 965 Express Chipset Family" },
428 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_1,
429 "Mobile Intel(R) 965 Express Chipset Family" },
430 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_2,
431 "Mobile Intel(R) 965 Express Chipset Family" },
432 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_3,
433 "Mobile Intel(R) 965 Express Chipset Family" },
434 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_4_SERIES,
435 "Mobile Intel(R) 4 Series Express Chipset Family" },
436 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_4_SERIES_1,
437 "Mobile Intel(R) 4 Series Express Chipset Family" },
438 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G45,
439 "Intel(R) G45/G43 Express Chipset Family" },
440 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G45_1,
441 "Intel(R) G45/G43 Express Chipset Family" },
442 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q45,
443 "Intel(R) Q45/Q43 Express Chipset Family" },
444 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q45_1,
445 "Intel(R) Q45/Q43 Express Chipset Family" },
446 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G41,
447 "Intel(R) G41 Express Chipset Family" },
448 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G41_1,
449 "Intel(R) G41 Express Chipset Family" },
450 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43,
451 "Intel(R) B43 Express Chipset Family" },
452 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_1,
453 "Intel(R) B43 Express Chipset Family" },
454 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_2,
455 "Intel(R) B43 Express Chipset Family" },
456 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_3,
457 "Intel(R) B43 Express Chipset Family" },
458 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS,
459 "Intel(R) HD Graphics" },
460 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS_1,
461 "Intel(R) HD Graphics" },
462 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS_2,
463 "Intel(R) HD Graphics" },
464 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2000,
465 "Intel(R) HD 2000 Graphics" },
466 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2000_1,
467 "Intel(R) HD 2000 Graphics" },
468 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000,
469 "Intel(R) HD 3000 Graphics" },
470 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_1,
471 "Intel(R) HD 3000 Graphics" },
472 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_2,
473 "Intel(R) HD 3000 Graphics" },
474 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_3,
475 "Intel(R) HD 3000 Graphics" },
476 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_4,
477 "Intel(R) HD 3000 Graphics" },
478 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_5,
479 "Intel(R) HD 3000 Graphics" },
480 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500,
481 "Intel(R) HD 2500 Graphics" },
482 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500_1,
483 "Intel(R) HD 2500 Graphics" },
484 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500_2,
485 "Intel(R) HD 2500 Graphics" },
486 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000,
487 "Intel(R) HD 4000 Graphics" },
488 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000_1,
489 "Intel(R) HD 4000 Graphics" },
490 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000_2,
491 "Intel(R) HD 4000 Graphics" },
492 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4400,
493 "Intel(R) HD 4400 Graphics" },
494 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4400_1,
495 "Intel(R) HD 4400 Graphics" },
496 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4600,
497 "Intel(R) HD 4600 Graphics" },
498 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4600_1,
499 "Intel(R) HD 4600 Graphics" },
500 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000,
501 "Intel(R) HD 5000 Graphics" },
502 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000_1,
503 "Intel(R) HD 5000 Graphics" },
504 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000_2,
505 "Intel(R) HD 5000 Graphics" },
506 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_510,
507 "Intel(R) HD Graphics 510" },
508 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_515,
509 "Intel(R) HD Graphics 515" },
510 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_520,
511 "Intel(R) HD Graphics 520" },
512 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_530_1,
513 "Intel(R) HD Graphics 530" },
514 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_530_2,
515 "Intel(R) HD Graphics 530" },
516 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_615_1,
517 "Intel(R) UHD Graphics 615" },
518 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_615_2,
519 "Intel(R) UHD Graphics 615" },
520 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_617,
521 "Intel(R) UHD Graphics 617" },
522 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_1,
523 "Intel(R) UHD Graphics 620" },
524 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_2,
525 "Intel(R) UHD Graphics 620" },
526 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_3,
527 "Intel(R) UHD Graphics 620" },
528 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_1,
529 "Intel(R) UHD Graphics 630" },
530 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_2,
531 "Intel(R) UHD Graphics 630" },
532 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_3,
533 "Intel(R) UHD Graphics 630" },
534 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_4,
535 "Intel(R) UHD Graphics 630" },
536 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_5,
537 "Intel(R) UHD Graphics 630" },
538 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_6,
539 "Intel(R) UHD Graphics 630" },
540 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_7,
541 "Intel(R) UHD Graphics 630" },
542 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_640,
543 "Intel(R) UHD Graphics 640" },
544 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_540,
545 "Intel(R) Iris Graphics 540" },
546 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_550,
547 "Intel(R) Iris Graphics 550" },
548 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PRO_580,
549 "Intel(R) Iris Pro Graphics 580" },
550 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_650,
551 "Intel(R) Iris Plus Graphics 650" },
552 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_655,
553 "Intel(R) Iris Plus Graphics 655" },
554 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_G7,
555 "Intel(R) Iris Plus Graphics G7" },
556 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_UY,
557 "Intel(R) Iris Xe Graphics" },
558 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_Y,
559 "Intel(R) Iris Xe Graphics" },
560 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT1,
561 "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" },
562 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT1_2,
563 "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" },
564 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_ULT_1,
565 "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" },
566 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_ULT_2,
567 "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" },
568 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1,
569 "Intel(R) AlderLake-S GT1" },
570 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_2,
571 "Intel(R) AlderLake-S GT1" },
572 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_3,
573 "Intel(R) AlderLake-S GT1" },
574 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_4,
575 "Intel(R) AlderLake-S GT1" },
576 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_GRAPHICS,
577 "Intel(R) UHD Graphics" },
578 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_RPL_H_IRIS_XE,
579 "Intel(R) Iris Xe Graphics [RPL-P]" },
582 #ifndef __DARWIN__
583 static int fd_mem;
585 void *map_physical(uint64_t phys_addr, size_t len)
587 void *virt_addr;
589 virt_addr = mmap(0, len, PROT_WRITE | PROT_READ, MAP_SHARED,
590 fd_mem, (off_t) phys_addr);
592 if (virt_addr == MAP_FAILED) {
593 printf("Error mapping physical memory 0x%08" PRIx64 "[0x%zx]\n",
594 phys_addr, len);
595 return NULL;
598 return virt_addr;
601 void unmap_physical(void *virt_addr, size_t len)
603 munmap(virt_addr, len);
605 #endif
607 static void print_version(void)
609 printf("inteltool v%s -- ", INTELTOOL_VERSION);
610 printf("Copyright (C) 2008 coresystems GmbH\n\n");
611 printf(
612 "This program is free software: you can redistribute it and/or modify\n"
613 "it under the terms of the GNU General Public License as published by\n"
614 "the Free Software Foundation, version 2 of the License.\n\n"
615 "This program is distributed in the hope that it will be useful,\n"
616 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
617 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
618 "GNU General Public License for more details.\n\n");
621 static void print_usage(const char *name)
623 printf("usage: %s [-vh?gGrplmedPMaAsfSRx]\n", name);
624 printf("\n"
625 " -v | --version: print the version\n"
626 " -h | --help: print this help\n\n"
627 " -s | --spi: dump southbridge spi and bios_cntrl registers\n"
628 " -f | --gfx: dump graphics registers (UNSAFE: may hang system!)\n"
629 " -R | --ahci: dump AHCI registers\n"
630 " -g | --gpio: dump southbridge GPIO registers\n"
631 " -G | --gpio-diffs: show GPIO differences from defaults\n"
632 " -r | --rcba: dump southbridge RCBA registers\n"
633 " -p | --pmbase: dump southbridge Power Management registers\n\n"
634 " -l | --lpc: dump southbridge LPC/eSPI Interface registers\n\n"
635 " -m | --mchbar: dump northbridge Memory Controller registers\n"
636 " -S FILE | --spd=FILE: create a file storing current timings (implies -m)\n"
637 " -e | --epbar: dump northbridge EPBAR registers\n"
638 " -d | --dmibar: dump northbridge DMIBAR registers\n"
639 " -P | --pciexpress: dump northbridge PCIEXBAR registers\n\n"
640 " -M | --msrs: dump CPU MSRs\n"
641 " --cpu-range <start>[-<end>]: (optional) set CPU cores range for -M (--msrs) option\n"
642 " -A | --ambs: dump AMB registers\n"
643 " -x | --sgx: dump SGX status\n"
644 " -t | --tme: dump TME status\n"
645 " -k | --keylocker: dump Key Locker status\n"
646 " -a | --all: dump all known (safe) registers\n"
647 " --pcr=PORT_ID: dump all registers of a PCR port\n"
648 " (may be specified max %d times)\n"
649 "\n", MAX_PCR_PORTS);
650 exit(1);
653 static void print_system_info(struct pci_dev *nb, struct pci_dev *sb, struct pci_dev *gfx)
655 unsigned int id, i;
656 char *sbname = "unknown", *nbname = "unknown", *gfxname = "unknown";
658 id = cpuid(1);
660 /* Determine names */
661 for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++) {
662 if (nb->device_id == supported_chips_list[i].device_id)
663 nbname = supported_chips_list[i].name;
665 for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++) {
666 if (sb->device_id == supported_chips_list[i].device_id)
667 sbname = supported_chips_list[i].name;
669 if (gfx) {
670 for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++)
671 if (gfx->device_id == supported_chips_list[i].device_id)
672 gfxname = supported_chips_list[i].name;
675 /* Intel has suggested applications to display the family of a CPU as
676 * the sum of the "Family" and the "Extended Family" fields shown
677 * above, and the model as the sum of the "Model" and the 4-bit
678 * left-shifted "Extended Model" fields.
679 * http://download.intel.com/design/processor/applnots/24161832.pdf
681 printf("CPU: ID 0x%x, Processor Type 0x%x, Family 0x%x, Model 0x%x, Stepping 0x%x\n",
682 id, (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff),
683 ((id >> 12) & 0xf0) + ((id >> 4) & 0xf), (id & 0xf));
685 printf("Northbridge: %04x:%04x (%s)\n",
686 nb->vendor_id, nb->device_id, nbname);
688 printf("Southbridge: %04x:%04x (%s)\n",
689 sb->vendor_id, sb->device_id, sbname);
691 if (gfx)
692 printf("IGD: %04x:%04x (%s)\n",
693 gfx->vendor_id, gfx->device_id, gfxname);
696 int main(int argc, char *argv[])
698 struct pci_access *pacc;
699 struct pci_dev *sb = NULL, *nb, *gfx = NULL, *ahci = NULL, *dev;
700 const char *dump_spd_file = NULL;
701 int opt, option_index = 0;
703 int dump_gpios = 0, dump_mchbar = 0, dump_rcba = 0;
704 int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0;
705 int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0;
706 int dump_spi = 0, dump_gfx = 0, dump_ahci = 0, dump_sgx = 0, dump_tme = 0;
707 int dump_lpc = 0, dump_keylocker = 0;
708 int show_gpio_diffs = 0;
709 size_t pcr_count = 0;
710 uint8_t dump_pcr[MAX_PCR_PORTS];
712 unsigned int cores_range_start = 0, cores_range_end = UINT_MAX;
714 static struct option long_options[] = {
715 {"version", 0, 0, 'v'},
716 {"help", 0, 0, 'h'},
717 {"gpios", 0, 0, 'g'},
718 {"gpio-diffs", 0, 0, 'G'},
719 {"mchbar", 0, 0, 'm'},
720 {"rcba", 0, 0, 'r'},
721 {"pmbase", 0, 0, 'p'},
722 {"lpc", 0, 0, 'l'},
723 {"epbar", 0, 0, 'e'},
724 {"dmibar", 0, 0, 'd'},
725 {"pciexpress", 0, 0, 'P'},
726 {"msrs", 0, 0, 'M'},
727 {"cpu-range", required_argument, 0, LONG_OPT_RANGE},
728 {"ambs", 0, 0, 'A'},
729 {"spi", 0, 0, 's'},
730 {"spd", 0, 0, 'S'},
731 {"all", 0, 0, 'a'},
732 {"gfx", 0, 0, 'f'},
733 {"ahci", 0, 0, 'R'},
734 {"sgx", 0, 0, 'x'},
735 {"pcr", required_argument, 0, LONG_OPT_PCR},
736 {"tme", 0, 0, 't'},
737 {"keylocker", 0, 0, 'k'},
738 {0, 0, 0, 0}
741 while ((opt = getopt_long(argc, argv, "vh?gGrplmedPMaAsfRS:xtk",
742 long_options, &option_index)) != EOF) {
743 switch (opt) {
744 case 'v':
745 print_version();
746 exit(0);
747 break;
748 case 'S':
749 dump_spd_file = optarg;
750 dump_mchbar = 1;
751 break;
752 case 'g':
753 dump_gpios = 1;
754 break;
755 case 'f':
756 dump_gfx = 1;
757 break;
758 case 'R':
759 dump_ahci = 1;
760 break;
761 case 'G':
762 show_gpio_diffs = 1;
763 break;
764 case 'm':
765 dump_mchbar = 1;
766 break;
767 case 'r':
768 dump_rcba = 1;
769 break;
770 case 'p':
771 dump_pmbase = 1;
772 break;
773 case 'l':
774 dump_lpc = 1;
775 break;
776 case 'e':
777 dump_epbar = 1;
778 break;
779 case 'd':
780 dump_dmibar = 1;
781 break;
782 case 'P':
783 dump_pciexbar = 1;
784 break;
785 case 'M':
786 dump_coremsrs = 1;
787 break;
788 case LONG_OPT_RANGE:
789 if (strlen(optarg) == 0) {
790 print_usage(argv[0]);
791 exit(1);
793 const int sscanf_ret = sscanf(optarg, "%u-%u", &cores_range_start, &cores_range_end);
794 if (sscanf_ret == 1) {
795 /* the end of the range is not specified - only for one core */
796 cores_range_end = cores_range_start;
797 } else if (sscanf_ret != 2) {
798 print_usage(argv[0]);
799 exit(1);
800 } else if (cores_range_end < cores_range_start) {
801 printf("Error: invalid cores range <%u-%u>!\n",
802 cores_range_start, cores_range_end);
803 exit(1);
805 break;
806 case 'a':
807 dump_gpios = 1;
808 show_gpio_diffs = 1;
809 dump_mchbar = 1;
810 dump_rcba = 1;
811 dump_pmbase = 1;
812 dump_lpc = 1;
813 dump_epbar = 1;
814 dump_dmibar = 1;
815 dump_pciexbar = 1;
816 dump_coremsrs = 1;
817 dump_ambs = 1;
818 dump_spi = 1;
819 dump_ahci = 1;
820 dump_sgx = 1;
821 dump_tme = 1;
822 dump_keylocker = 1;
823 break;
824 case 'A':
825 dump_ambs = 1;
826 break;
827 case 's':
828 dump_spi = 1;
829 break;
830 case 'x':
831 dump_sgx = 1;
832 break;
833 case 't':
834 dump_tme = 1;
835 break;
836 case 'k':
837 dump_keylocker = 1;
838 break;
839 case LONG_OPT_PCR:
840 if (pcr_count < MAX_PCR_PORTS) {
841 errno = 0;
842 const unsigned long int pcr =
843 strtoul(optarg, NULL, 0);
844 if (strlen(optarg) == 0 || errno) {
845 print_usage(argv[0]);
846 exit(1);
848 dump_pcr[pcr_count++] = (uint8_t)pcr;
849 } else {
850 print_usage(argv[0]);
851 exit(1);
853 break;
854 case 'h':
855 case '?':
856 default:
857 print_usage(argv[0]);
858 exit(0);
859 break;
863 #if defined(__FreeBSD__)
864 if (open("/dev/io", O_RDWR) < 0) {
865 perror("/dev/io");
866 #elif defined(__NetBSD__)
867 # ifdef __i386__
868 if (i386_iopl(3)) {
869 perror("iopl");
870 # else
871 if (x86_64_iopl(3)) {
872 perror("iopl");
873 # endif
874 #else
875 if (iopl(3)) {
876 perror("iopl");
877 #endif
878 printf("You need to be root.\n");
879 exit(1);
882 #ifndef __DARWIN__
883 if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) {
884 perror("Can not open /dev/mem");
885 exit(1);
887 #endif
889 pacc = pci_alloc();
890 pacc->method = PCI_ACCESS_I386_TYPE1;
891 pci_init(pacc);
892 pci_scan_bus(pacc);
894 /* Find the required devices */
895 for (dev = pacc->devices; dev; dev = dev->next) {
896 pci_fill_info(dev, PCI_FILL_CLASS);
897 /* The ISA/LPC bridge can be 0x1f, 0x07, or 0x04 so we probe. */
898 if (dev->device_class == 0x0601) { /* ISA/LPC bridge */
899 if (sb == NULL) {
900 sb = dev;
901 } else {
902 fprintf(stderr, "Multiple devices with class ID"
903 " 0x0601, using %02x%02x:%02x.%02x\n",
904 sb->domain, sb->bus, sb->dev, sb->func);
905 break;
910 if (!sb) {
911 printf("No southbridge found.\n");
912 exit(1);
915 pci_fill_info(sb, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS);
917 if (sb->vendor_id != PCI_VENDOR_ID_INTEL) {
918 printf("Not an Intel(R) southbridge.\n");
919 exit(1);
922 nb = pci_get_dev(pacc, 0, 0, 0x00, 0);
923 if (!nb) {
924 printf("No northbridge found.\n");
925 exit(1);
928 pci_fill_info(nb, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS);
930 if (nb->vendor_id != PCI_VENDOR_ID_INTEL) {
931 printf("Not an Intel(R) northbridge.\n");
932 exit(1);
935 gfx = pci_get_dev(pacc, 0, 0, 0x02, 0);
936 if (gfx) {
937 pci_fill_info(gfx, PCI_FILL_IDENT | PCI_FILL_BASES |
938 PCI_FILL_CLASS);
939 if ((gfx->device_class & 0xff00) != 0x0300)
940 gfx = NULL;
941 else if (gfx->vendor_id != PCI_VENDOR_ID_INTEL)
942 gfx = NULL;
945 if (sb->device_id == PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC) {
946 ahci = pci_get_dev(pacc, 0, 0, 0x13, 0);
947 } else {
948 ahci = pci_get_dev(pacc, 0, 0, 0x1f, 2);
949 if (ahci) {
950 pci_fill_info(ahci, PCI_FILL_CLASS);
951 if (ahci->device_class != PCI_CLASS_STORAGE_SATA)
952 ahci = pci_get_dev(pacc, 0, 0, 0x17, 0);
956 if (ahci) {
957 pci_fill_info(ahci, PCI_FILL_IDENT | PCI_FILL_BASES |
958 PCI_FILL_CLASS);
960 if (ahci->vendor_id != PCI_VENDOR_ID_INTEL ||
961 ahci->device_class != PCI_CLASS_STORAGE_SATA)
962 ahci = NULL;
965 print_system_info(nb, sb, gfx);
967 /* Now do the deed */
968 if (dump_gpios) {
969 print_gpios(sb, 1, show_gpio_diffs);
970 printf("\n\n");
971 } else if (show_gpio_diffs) {
972 print_gpios(sb, 0, show_gpio_diffs);
973 printf("\n\n");
976 if (dump_rcba) {
977 print_rcba(sb);
978 printf("\n\n");
981 if (dump_pmbase) {
982 print_pmbase(sb, pacc);
983 printf("\n\n");
986 if (dump_lpc) {
987 print_lpc(sb, pacc);
988 printf("\n\n");
991 if (dump_mchbar) {
992 print_mchbar(nb, pacc, dump_spd_file);
993 printf("\n\n");
996 if (dump_epbar) {
997 print_epbar(nb);
998 printf("\n\n");
1001 if (dump_dmibar) {
1002 print_dmibar(nb);
1003 printf("\n\n");
1006 if (dump_pciexbar) {
1007 print_pciexbar(nb);
1008 printf("\n\n");
1011 if (dump_coremsrs) {
1012 print_intel_msrs(cores_range_start, cores_range_end);
1013 printf("\n\n");
1016 if (dump_ambs)
1017 print_ambs(nb, pacc);
1019 if (dump_spi)
1020 print_spi(sb);
1022 if (dump_gfx)
1023 print_gfx(gfx);
1025 if (dump_ahci)
1026 print_ahci(ahci);
1028 if (dump_sgx)
1029 print_sgx();
1031 if (dump_tme)
1032 print_tme();
1034 if (dump_keylocker)
1035 print_keylocker();
1037 if (pcr_count)
1038 print_pcr_ports(sb, dump_pcr, pcr_count);
1040 /* Clean up */
1041 pcr_cleanup();
1042 if (ahci)
1043 pci_free_dev(ahci);
1044 if (gfx)
1045 pci_free_dev(gfx);
1046 pci_free_dev(nb);
1047 /* `sb` wasn't allocated by pci_get_dev() */
1048 pci_cleanup(pacc);
1050 return 0;