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