Patrick Georgi | ea063cb | 2020-05-08 19:28:13 +0200 | [diff] [blame] | 1 | /* inteltool - dump all registers on an Intel CPU + chipset based system */ |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 2 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 3 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 4 | #include <stdio.h> |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 5 | #include <stdlib.h> |
Nico Huber | d91c932 | 2017-10-03 15:45:45 +0200 | [diff] [blame] | 6 | #include <string.h> |
Stefan Reinauer | a7b296d | 2011-11-14 12:40:34 -0800 | [diff] [blame] | 7 | #include <inttypes.h> |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 8 | #include <getopt.h> |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 9 | #include <fcntl.h> |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 10 | #include <sys/mman.h> |
Idwer Vollering | 3f91d81 | 2010-10-24 13:50:13 +0000 | [diff] [blame] | 11 | #include <unistd.h> |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 12 | #include <errno.h> |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 13 | #include <limits.h> |
Stefan Tauner | 0c8b7d1 | 2013-04-05 20:38:08 +0200 | [diff] [blame] | 14 | #include "inteltool.h" |
Nico Huber | 99b02a1 | 2017-04-05 17:39:57 +0200 | [diff] [blame] | 15 | #include "pcr.h" |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 16 | |
Andrey Korolyov | 046d217 | 2016-01-05 19:59:06 +0300 | [diff] [blame] | 17 | #ifdef __NetBSD__ |
| 18 | #include <machine/sysarch.h> |
| 19 | #endif |
| 20 | |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 21 | #define MAX_PCR_PORTS 8 /* how often may `--pcr` be specified */ |
| 22 | |
| 23 | enum long_only_opts { |
| 24 | LONG_OPT_PCR = 0x100, |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 25 | LONG_OPT_RANGE = 0x101, |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 26 | }; |
| 27 | |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 28 | /* |
| 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 |
| 33 | */ |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 34 | static const struct { |
| 35 | uint16_t vendor_id, device_id; |
Uwe Hermann | 9a6b6b5 | 2008-05-14 21:20:55 +0000 | [diff] [blame] | 36 | char *name; |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 37 | } supported_chips_list[] = { |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 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" }, |
Stefan Tauner | 1a00cf0 | 2012-10-13 06:23:52 +0200 | [diff] [blame] | 52 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82946, "946GZ/PL" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 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" }, |
Loïc Grenié | 8429de7 | 2009-11-02 15:01:49 +0000 | [diff] [blame] | 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" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 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" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 61 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82XX4X, |
| 62 | "GL40/GS40/GM45/GS45/PM45" }, |
Damien Zammit | 9c98664 | 2015-08-17 21:04:41 +1000 | [diff] [blame] | 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)" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 68 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82X58, "X58" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 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" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 77 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_POULSBO, "SCH Poulsbo" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 78 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ATOM_DXXX, |
| 79 | "Atom D400/500 Series" }, |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 80 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ATOM_NXXX, "Atom N400 Series" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 81 | /* Host bridges /DRAM controllers integrated in CPUs */ |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 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" }, |
Maximilian Schander | cb2d21d | 2017-10-28 14:45:48 +0200 | [diff] [blame] | 110 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_M, |
| 111 | "6th generation (Skylake-H family) Core Processor (Mobile)" }, |
| 112 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_WST, |
| 113 | "6th generation (Skylake-S/H family) Core Processor (Workstation)" }, |
Christoph Pomaska | 48ac29e | 2018-01-01 01:48:21 +0100 | [diff] [blame] | 114 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_D, |
| 115 | "6th generation (Skylake-S family) Core Processor (Desktop)" }, |
Nico Huber | 54fe32f | 2017-10-03 16:03:07 +0200 | [diff] [blame] | 116 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_D2, |
| 117 | "6th generation (Skylake-S family) Core Processor (Desktop)" }, |
Maxim Polyakov | 1317689 | 2019-08-27 18:20:08 +0300 | [diff] [blame] | 118 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_E, |
| 119 | "6th generation (Skylake family) Core Processor Xeon E (Server)" }, |
Michael Niewöhner | 0d1366d | 2020-03-14 22:39:30 +0100 | [diff] [blame] | 120 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_U, |
| 121 | "6th generation (Skylake family) Core Processor (Mobile)" }, |
| 122 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_Y, |
| 123 | "6th generation (Skylake family) Core Processor (Mobile)" }, |
Martin Roth | 51dde6f | 2014-12-07 22:11:54 -0700 | [diff] [blame] | 124 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL, "Bay Trail" }, |
Matthew Garrett | 2bf28e5 | 2018-07-23 21:09:47 -0700 | [diff] [blame] | 125 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_U, |
| 126 | "7th generation (Kaby Lake family) Core Processor (Mobile)" }, |
| 127 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_Y, |
| 128 | "7th generation (Kaby Lake family) Core Processor (Mobile)" }, |
| 129 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_U_Q, |
| 130 | "7th generation (Kaby Lake family) Core Processor (Mobile)" }, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 131 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_7TH_GEN_E3, |
| 132 | "7th generation (Kaby Lake family) Core Processor Xeon E3-1200" }, |
Matt DeVillier | 3c78445 | 2019-06-11 23:23:46 -0500 | [diff] [blame] | 133 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_8TH_GEN_U_1, |
| 134 | "8th generation (Coffee Lake family) Core Processor (Mobile)" }, |
| 135 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_8TH_GEN_U_2, |
| 136 | "8th generation (Whiskey Lake family) Core Processor (Mobile)" }, |
Johanna Schander | d756c27 | 2019-12-29 14:31:01 +0100 | [diff] [blame] | 137 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_10TH_GEN_U, |
| 138 | "10th generation (Icelake family) Core Processor (Mobile)" }, |
Matt DeVillier | 62e883d | 2020-08-08 11:17:31 -0500 | [diff] [blame] | 139 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U1, |
| 140 | "10th generation (Comet Lake family) Core Processor (Mobile)" }, |
| 141 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U2, |
| 142 | "10th generation (Comet Lake family) Core Processor (Mobile)" }, |
| 143 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_CML_U3, |
| 144 | "10th generation (Comet Lake family) Core Processor (Mobile)" }, |
Stefan Reinauer | 91893ee | 2020-10-23 01:40:41 +0000 | [diff] [blame] | 145 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HEWITTLAKE, |
| 146 | "Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D (Hewitt Lake)" }, |
Jonathan Zhang | b18e194 | 2021-05-03 13:12:23 -0700 | [diff] [blame] | 147 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SAPPHIRERAPIDS_SP, |
| 148 | "Xeon Scalable Processor 4th generation (Sapphire Rapids SP)" }, |
Michał Żygowski | 8ac40f3 | 2021-07-09 16:00:16 +0200 | [diff] [blame] | 149 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_U_2, |
| 150 | "11th generation (Tiger Lake UP3 family) Core Processor (Mobile)" }, |
| 151 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_U_4, |
| 152 | "11th generation (Tiger Lake UP3 family) Core Processor (Mobile)" }, |
| 153 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_Y_2, |
| 154 | "11th generation (Tiger Lake UP4 family) Core Processor (Mobile)" }, |
| 155 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_Y_4, |
| 156 | "11th generation (Tiger Lake UP4 family) Core Processor (Mobile)" }, |
| 157 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_4, |
| 158 | "11th generation (Tiger Lake H family) Core Processor (Mobile)" }, |
| 159 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_6, |
| 160 | "11th generation (Tiger Lake H family) Core Processor (Mobile)" }, |
| 161 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_TGL_ID_H_8, |
| 162 | "11th generation (Tiger Lake H family) Core Processor (Mobile)" }, |
Michał Kopeć | 2d8edeb | 2022-04-05 10:40:03 +0200 | [diff] [blame] | 163 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_8, |
| 164 | "12th generation (Alder Lake S family) Core Processor (Desktop)" }, |
| 165 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_4, |
| 166 | "12th generation (Alder Lake S family) Core Processor (Desktop)" }, |
| 167 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_6_4, |
| 168 | "12th generation (Alder Lake S family) Core Processor (Desktop)" }, |
| 169 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_8_0, |
| 170 | "12th generation (Alder Lake S family) Core Processor (Desktop)" }, |
| 171 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CORE_ADL_ID_S_6_0, |
| 172 | "12th generation (Alder Lake S family) Core Processor (Desktop)" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 173 | /* Southbridges (LPC controllers) */ |
| 174 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371XX, "371AB/EB/MB" }, |
Arthur Heymans | 026f7df | 2017-04-10 22:26:13 +0200 | [diff] [blame] | 175 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10, "ICH10" }, |
Angel Pons | 65adc70 | 2021-11-14 15:34:02 +0100 | [diff] [blame] | 176 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10D, "ICH10D" }, |
Idwer Vollering | 66dcda9 | 2020-07-09 14:16:39 +0200 | [diff] [blame] | 177 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10DO, "ICH10DO" }, |
Warren Turkal | 9702b6b | 2009-06-30 14:11:42 +0000 | [diff] [blame] | 178 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10R, "ICH10R" }, |
Anton Kochkov | da0b456 | 2010-05-30 12:33:12 +0000 | [diff] [blame] | 179 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9DH, "ICH9DH" }, |
| 180 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9DO, "ICH9DO" }, |
| 181 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9R, "ICH9R" }, |
| 182 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9, "ICH9" }, |
| 183 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9M, "ICH9M" }, |
| 184 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9ME, "ICH9M-E" }, |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 185 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8M, "ICH8-M" }, |
Lubomir Rintel | 2a13bad | 2015-03-01 10:14:15 +0100 | [diff] [blame] | 186 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8ME, "ICH8M-E" }, |
Corey Osgood | f366ce0 | 2010-08-17 08:33:44 +0000 | [diff] [blame] | 187 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8, "ICH8" }, |
| 188 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_NM10, "NM10" }, |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 189 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7MDH, "ICH7-M DH" }, |
Stefan Reinauer | f9b9945 | 2008-05-14 20:05:00 +0000 | [diff] [blame] | 190 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7M, "ICH7-M" }, |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 191 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7, "ICH7" }, |
Stefan Reinauer | f9b9945 | 2008-05-14 20:05:00 +0000 | [diff] [blame] | 192 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7DH, "ICH7DH" }, |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 193 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6, "ICH6" }, |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 194 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH5, "ICH5" }, |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 195 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH4M, "ICH4-M" }, |
| 196 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH4, "ICH4" }, |
Uwe Hermann | 710e8b1 | 2008-05-17 21:33:35 +0000 | [diff] [blame] | 197 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH2, "ICH2" }, |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 198 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH0, "ICH0" }, |
Maciej Pijanka | 90d1740 | 2009-09-30 17:05:46 +0000 | [diff] [blame] | 199 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH, "ICH" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 200 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I63XX, "631xESB/632xESB/3100" }, |
| 201 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_POULSBO_LPC, "SCH Poulsbo" }, |
Stefan Tauner | 088f569 | 2013-05-28 11:30:25 +0200 | [diff] [blame] | 202 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_DESKTOP, "3400 Desktop" }, |
| 203 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_MOBILE, "3400 Mobile" }, |
| 204 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_P55, "P55" }, |
| 205 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PM55, "PM55" }, |
| 206 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H55, "H55" }, |
| 207 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM57, "QM57" }, |
| 208 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H57, "H57" }, |
| 209 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM55, "HM55" }, |
| 210 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q57, "Q57" }, |
| 211 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM57, "HM57" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 212 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400_MOBILE_SFF, |
| 213 | "3400 Mobile SFF" }, |
Stefan Tauner | 088f569 | 2013-05-28 11:30:25 +0200 | [diff] [blame] | 214 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B55_A, "B55" }, |
| 215 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS57, "QS57" }, |
| 216 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3400, "3400" }, |
| 217 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3420, "3420" }, |
| 218 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_3450, "3450" }, |
| 219 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B55_B, "B55" }, |
Nico Huber | 76d6049 | 2013-03-29 17:57:15 +0100 | [diff] [blame] | 220 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z68, "Z68" }, |
| 221 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_P67, "P67" }, |
| 222 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UM67, "UM67" }, |
| 223 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM65, "HM65" }, |
| 224 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H67, "H67" }, |
| 225 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM67, "HM67" }, |
| 226 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q65, "Q65" }, |
| 227 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS67, "QS67" }, |
| 228 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q67, "Q67" }, |
| 229 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM67, "QM67" }, |
| 230 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B65, "B65" }, |
| 231 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C202, "C202" }, |
| 232 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C204, "C204" }, |
| 233 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C206, "C206" }, |
| 234 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H61, "H61" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 235 | { PCI_VENDOR_ID_INTEL, 0x1d40, "X79" }, |
| 236 | { PCI_VENDOR_ID_INTEL, 0x1d41, "X79" }, |
Nico Huber | 76d6049 | 2013-03-29 17:57:15 +0100 | [diff] [blame] | 237 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z77, "Z77" }, |
| 238 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z75, "Z75" }, |
| 239 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q77, "Q77" }, |
| 240 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q75, "Q75" }, |
| 241 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B75, "B75" }, |
| 242 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H77, "H77" }, |
| 243 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C216, "C216" }, |
| 244 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM77, "QM77" }, |
| 245 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QS77, "QS77" }, |
| 246 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM77, "HM77" }, |
| 247 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UM77, "UM77" }, |
| 248 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM76, "HM76" }, |
| 249 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM75, "HM75" }, |
| 250 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM70, "HM70" }, |
| 251 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_NM70, "NM70" }, |
Johanna Schander | d756c27 | 2019-12-29 14:31:01 +0100 | [diff] [blame] | 252 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICELAKE_LP_U, |
| 253 | "Icelake U LPC" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 254 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_FULL, |
| 255 | "Lynx Point Low Power Full Featured Engineering Sample" }, |
| 256 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_PREM, |
| 257 | "Lynx Point Low Power Premium SKU" }, |
| 258 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_BASE, |
| 259 | "Lynx Point Low Power Base SKU" }, |
Angel Pons | 4684dc0 | 2020-02-21 18:37:51 +0100 | [diff] [blame] | 260 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_PREM, |
| 261 | "Wildcat Point Low Power Premium SKU" }, |
Youness Alaoui | 085d87b | 2017-04-13 12:55:31 -0400 | [diff] [blame] | 262 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP, |
Angel Pons | 4684dc0 | 2020-02-21 18:37:51 +0100 | [diff] [blame] | 263 | "Wildcat Point Low Power Base SKU" }, |
Stefan Tauner | 04c0600 | 2012-10-13 02:19:30 +0200 | [diff] [blame] | 264 | { PCI_VENDOR_ID_INTEL, 0x2310, "DH89xxCC" }, |
Martin Roth | 51dde6f | 2014-12-07 22:11:54 -0700 | [diff] [blame] | 265 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC, "Bay Trail" }, |
Maximilian Schander | cb2d21d | 2017-10-28 14:45:48 +0200 | [diff] [blame] | 266 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_PRE, |
| 267 | "Sunrise Point Desktop Engineering Sample" }, |
Felix Singer | 0a7543d | 2019-02-19 23:49:11 +0100 | [diff] [blame] | 268 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_PRE, |
| 269 | "Sunrise Point-LP Engineering Sample" }, |
| 270 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_SKL, |
| 271 | "Sunrise Point-LP U Base/Skylake" }, |
| 272 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_SKL, |
| 273 | "Sunrise Point-LP Y Premium/Skylake" }, |
| 274 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_SKL, |
| 275 | "Sunrise Point-LP U Premium/Skylake" }, |
| 276 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_KBL, |
| 277 | "Sunrise Point-LP U Base/Kabylake" }, |
| 278 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_KBL, |
| 279 | "Sunrise Point-LP Y Premium/Kabylake" }, |
| 280 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_KBL, |
| 281 | "Sunrise Point-LP U Premium/Kabylake" }, |
Matthew Garrett | 2bf28e5 | 2018-07-23 21:09:47 -0700 | [diff] [blame] | 282 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_BASE, |
Felix Singer | 0a7543d | 2019-02-19 23:49:11 +0100 | [diff] [blame] | 283 | "Sunrise Point-LP U iHDCP 2.2 Base/Kabylake" }, |
Matthew Garrett | 2bf28e5 | 2018-07-23 21:09:47 -0700 | [diff] [blame] | 284 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_PREM, |
Felix Singer | 0a7543d | 2019-02-19 23:49:11 +0100 | [diff] [blame] | 285 | "Sunrise Point-LP U iHDCP 2.2 Premium/Kabylake" }, |
Matthew Garrett | 2bf28e5 | 2018-07-23 21:09:47 -0700 | [diff] [blame] | 286 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_IHDCP_PREM, |
Felix Singer | 0a7543d | 2019-02-19 23:49:11 +0100 | [diff] [blame] | 287 | "Sunrise Point-LP Y iHDCP 2.2 Premium/Kabylake" }, |
Matt DeVillier | 3c78445 | 2019-06-11 23:23:46 -0500 | [diff] [blame] | 288 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CANNONPOINT_LP_U_PREM, |
| 289 | "Cannon Point-LP U Premium/CoffeeLake/Whiskeylake" }, |
Matt DeVillier | 62e883d | 2020-08-08 11:17:31 -0500 | [diff] [blame] | 290 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COMETPOINT_LP_U_PREM, |
| 291 | "Comet Point-LP U Premium/Cometlake" }, |
| 292 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COMETPOINT_LP_U_BASE, |
| 293 | "Comet Point-LP U Base/Cometlake" }, |
Michał Żygowski | 8ac40f3 | 2021-07-09 16:00:16 +0200 | [diff] [blame] | 294 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_SUPER, |
| 295 | "Tiger Point U Engineering Sample" }, |
| 296 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_PREM, |
| 297 | "Tiger Point U Premium/Tigerlake" }, |
| 298 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_U_BASE, |
| 299 | "Tiger Point U Base/Tigerlake" }, |
| 300 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_Y_SUPER, |
| 301 | "Tiger Point Y Engineering Sample" }, |
| 302 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGERPOINT_Y_PREM, |
| 303 | "Tiger Point Y Premium/Tigerlake" }, |
Maximilian Schander | cb2d21d | 2017-10-28 14:45:48 +0200 | [diff] [blame] | 304 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H110, "H110" }, |
| 305 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H170, "H170" }, |
| 306 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z170, "Z170" }, |
| 307 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q170, "Q170" }, |
| 308 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q150, "Q150" }, |
| 309 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B150, "B150" }, |
| 310 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C236, "C236" }, |
| 311 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C232, "C232" }, |
| 312 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM170, "QM170" }, |
| 313 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM170, "HM170" }, |
Nico Huber | ed9c9ce | 2017-03-30 17:45:36 +0200 | [diff] [blame] | 314 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM236, "CM236" }, |
Maximilian Schander | cb2d21d | 2017-10-28 14:45:48 +0200 | [diff] [blame] | 315 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM175, "HM175" }, |
| 316 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM175, "QM175" }, |
| 317 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM238, "CM238" }, |
Maxim Polyakov | ec32e61 | 2019-08-16 19:15:12 +0300 | [diff] [blame] | 318 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621, "C621" }, |
Jingle Hsu | 4067fa3 | 2020-11-03 20:46:41 +0800 | [diff] [blame] | 319 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621A, "C621A" }, |
Maxim Polyakov | ec32e61 | 2019-08-16 19:15:12 +0300 | [diff] [blame] | 320 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C622, "C622" }, |
| 321 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C624, "C624" }, |
| 322 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C625, "C625" }, |
| 323 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C626, "C626" }, |
| 324 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627, "C627" }, |
| 325 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C628, "C628" }, |
| 326 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C629, "C629" }, |
| 327 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C624_SUPER, "C624 Super SKU" }, |
| 328 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627_SUPER_1, "C627 Super SKU" }, |
| 329 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C621_SUPER, "C621 Super SKU" }, |
| 330 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C627_SUPER_2, "C627 Super SKU" }, |
| 331 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C628_SUPER, "C628 Super SKU" }, |
Jonathan Zhang | 4caa05e | 2021-05-03 14:06:22 -0700 | [diff] [blame] | 332 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EBG, "Emmits Burg" }, |
Timofey Komarov | 6c80082 | 2021-06-25 12:07:32 +0300 | [diff] [blame] | 333 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H270, "H270" }, |
| 334 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z270, "Z270" }, |
| 335 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q270, "Q270" }, |
| 336 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q250, "Q250" }, |
| 337 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B250, "B250" }, |
| 338 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z370, "Z370" }, |
| 339 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H310C, "H310C" }, |
| 340 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X299, "X299" }, |
Thomas Heijligen | 725369f | 2019-02-19 10:51:34 +0000 | [diff] [blame] | 341 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H310, "H310" }, |
| 342 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H370, "H370" }, |
| 343 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z390, "Z390" }, |
| 344 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q370, "Q370" }, |
| 345 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B360, "B360" }, |
| 346 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C246, "C246" }, |
| 347 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C242, "C242" }, |
| 348 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM370, "QM370" }, |
| 349 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM370, "HM370" }, |
| 350 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CM246, "CM246" }, |
qeed | b775a62 | 2018-06-19 19:52:19 -0400 | [diff] [blame] | 351 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C8_MOBILE, "C8 Mobile"}, |
| 352 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C8_DESKTOP, "C8 Desktop"}, |
| 353 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z87, "Z87"}, |
| 354 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z85, "Z85"}, |
| 355 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM86, "HM86"}, |
| 356 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H87, "H87"}, |
| 357 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM87, "HM87"}, |
| 358 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q85, "Q85"}, |
| 359 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q87, "Q87"}, |
| 360 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM87, "QM87"}, |
| 361 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B85, "B85"}, |
| 362 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C222, "C222"}, |
| 363 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C224, "C224"}, |
| 364 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C226, "C226"}, |
| 365 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H81, "H81"}, |
Nico Huber | 94473af | 2018-11-20 12:10:29 +0100 | [diff] [blame] | 366 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_APL_LPC, "Apollo Lake" }, |
Thomas Heijligen | da02719 | 2019-01-12 19:20:50 +0100 | [diff] [blame] | 367 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_LPC, "Denverton" }, |
Sean Rhodes | 645dde7 | 2021-10-22 09:31:22 +0100 | [diff] [blame] | 368 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GLK_LPC, "Gemini Lake" }, |
Michał Żygowski | 8ac40f3 | 2021-07-09 16:00:16 +0200 | [diff] [blame] | 369 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H510, "H510" }, |
| 370 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H570, "H570" }, |
| 371 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z590, "Z590" }, |
| 372 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q570, "Q570" }, |
| 373 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B560, "B560" }, |
| 374 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W580, "W580" }, |
| 375 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C256, "C256" }, |
| 376 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_C252, "C252" }, |
| 377 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM570, "HM570" }, |
| 378 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QM580, "QM580" }, |
| 379 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM590, "WM590" }, |
Michał Kopeć | 2d8edeb | 2022-04-05 10:40:03 +0200 | [diff] [blame] | 380 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H610, "H610" }, |
| 381 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B660, "B660" }, |
| 382 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_H670, "H670" }, |
| 383 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q670, "Q670" }, |
| 384 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Z690, "Z690" }, |
| 385 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W680, "W680" }, |
| 386 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_W685, "W685" }, |
| 387 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM690, "WM690" }, |
| 388 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM670, "HM670" }, |
| 389 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WM790, "WM790" }, |
| 390 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HM770, "HM770" }, |
Patrick Rudolph | 2d26a36 | 2017-11-07 19:51:21 +0100 | [diff] [blame] | 391 | /* Intel GPUs */ |
| 392 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G35_EXPRESS, |
| 393 | "Intel(R) G35 Express Chipset Family" }, |
| 394 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G35_EXPRESS_1, |
| 395 | "Intel(R) G35 Express Chipset Family" }, |
| 396 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS, |
| 397 | "Mobile Intel(R) 965 Express Chipset Family" }, |
| 398 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_1, |
| 399 | "Mobile Intel(R) 965 Express Chipset Family" }, |
| 400 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_2, |
| 401 | "Mobile Intel(R) 965 Express Chipset Family" }, |
| 402 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965_EXPRESS_3, |
| 403 | "Mobile Intel(R) 965 Express Chipset Family" }, |
| 404 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_4_SERIES, |
| 405 | "Mobile Intel(R) 4 Series Express Chipset Family" }, |
| 406 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_4_SERIES_1, |
| 407 | "Mobile Intel(R) 4 Series Express Chipset Family" }, |
| 408 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G45, |
| 409 | "Intel(R) G45/G43 Express Chipset Family" }, |
| 410 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G45_1, |
| 411 | "Intel(R) G45/G43 Express Chipset Family" }, |
| 412 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q45, |
| 413 | "Intel(R) Q45/Q43 Express Chipset Family" }, |
| 414 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_Q45_1, |
| 415 | "Intel(R) Q45/Q43 Express Chipset Family" }, |
| 416 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G41, |
| 417 | "Intel(R) G41 Express Chipset Family" }, |
| 418 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_G41_1, |
| 419 | "Intel(R) G41 Express Chipset Family" }, |
| 420 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43, |
| 421 | "Intel(R) B43 Express Chipset Family" }, |
| 422 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_1, |
| 423 | "Intel(R) B43 Express Chipset Family" }, |
| 424 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_2, |
| 425 | "Intel(R) B43 Express Chipset Family" }, |
| 426 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_B43_3, |
| 427 | "Intel(R) B43 Express Chipset Family" }, |
| 428 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS, |
| 429 | "Intel(R) HD Graphics" }, |
| 430 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS_1, |
| 431 | "Intel(R) HD Graphics" }, |
| 432 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_GRAPHICS_2, |
| 433 | "Intel(R) HD Graphics" }, |
| 434 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2000, |
| 435 | "Intel(R) HD 2000 Graphics" }, |
| 436 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2000_1, |
| 437 | "Intel(R) HD 2000 Graphics" }, |
| 438 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000, |
| 439 | "Intel(R) HD 3000 Graphics" }, |
| 440 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_1, |
| 441 | "Intel(R) HD 3000 Graphics" }, |
| 442 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_2, |
| 443 | "Intel(R) HD 3000 Graphics" }, |
| 444 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_3, |
| 445 | "Intel(R) HD 3000 Graphics" }, |
| 446 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_4, |
| 447 | "Intel(R) HD 3000 Graphics" }, |
| 448 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_3000_5, |
| 449 | "Intel(R) HD 3000 Graphics" }, |
| 450 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500, |
| 451 | "Intel(R) HD 2500 Graphics" }, |
| 452 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500_1, |
| 453 | "Intel(R) HD 2500 Graphics" }, |
| 454 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_2500_2, |
| 455 | "Intel(R) HD 2500 Graphics" }, |
| 456 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000, |
| 457 | "Intel(R) HD 4000 Graphics" }, |
| 458 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000_1, |
| 459 | "Intel(R) HD 4000 Graphics" }, |
| 460 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4000_2, |
| 461 | "Intel(R) HD 4000 Graphics" }, |
Sellerie | 409a5dc | 2019-07-26 15:09:18 +0200 | [diff] [blame] | 462 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4400, |
| 463 | "Intel(R) HD 4400 Graphics" }, |
Arashk Mahshidfar | e607ddc | 2022-05-20 11:20:21 +0430 | [diff] [blame^] | 464 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4400_1, |
| 465 | "Intel(R) HD 4400 Graphics" }, |
Patrick Rudolph | 2d26a36 | 2017-11-07 19:51:21 +0100 | [diff] [blame] | 466 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4600, |
| 467 | "Intel(R) HD 4600 Graphics" }, |
| 468 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_4600_1, |
| 469 | "Intel(R) HD 4600 Graphics" }, |
| 470 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000, |
| 471 | "Intel(R) HD 5000 Graphics" }, |
| 472 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000_1, |
| 473 | "Intel(R) HD 5000 Graphics" }, |
| 474 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_5000_2, |
| 475 | "Intel(R) HD 5000 Graphics" }, |
Felix Singer | 24b000a | 2019-01-02 14:44:54 +0100 | [diff] [blame] | 476 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_510, |
| 477 | "Intel(R) HD Graphics 510" }, |
| 478 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_515, |
| 479 | "Intel(R) HD Graphics 515" }, |
| 480 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_520, |
| 481 | "Intel(R) HD Graphics 520" }, |
| 482 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_530_1, |
| 483 | "Intel(R) HD Graphics 530" }, |
| 484 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HD_530_2, |
| 485 | "Intel(R) HD Graphics 530" }, |
| 486 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_615_1, |
| 487 | "Intel(R) UHD Graphics 615" }, |
| 488 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_615_2, |
| 489 | "Intel(R) UHD Graphics 615" }, |
| 490 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_617, |
| 491 | "Intel(R) UHD Graphics 617" }, |
| 492 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_1, |
| 493 | "Intel(R) UHD Graphics 620" }, |
| 494 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_2, |
| 495 | "Intel(R) UHD Graphics 620" }, |
| 496 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_620_3, |
| 497 | "Intel(R) UHD Graphics 620" }, |
| 498 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_1, |
| 499 | "Intel(R) UHD Graphics 630" }, |
| 500 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_2, |
| 501 | "Intel(R) UHD Graphics 630" }, |
| 502 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_3, |
| 503 | "Intel(R) UHD Graphics 630" }, |
| 504 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_4, |
| 505 | "Intel(R) UHD Graphics 630" }, |
| 506 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_5, |
| 507 | "Intel(R) UHD Graphics 630" }, |
| 508 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_6, |
| 509 | "Intel(R) UHD Graphics 630" }, |
| 510 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_630_7, |
| 511 | "Intel(R) UHD Graphics 630" }, |
| 512 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_640, |
| 513 | "Intel(R) UHD Graphics 640" }, |
| 514 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_540, |
| 515 | "Intel(R) Iris Graphics 540" }, |
| 516 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_550, |
| 517 | "Intel(R) Iris Graphics 550" }, |
| 518 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PRO_580, |
| 519 | "Intel(R) Iris Pro Graphics 580" }, |
| 520 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_650, |
| 521 | "Intel(R) Iris Plus Graphics 650" }, |
| 522 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_655, |
| 523 | "Intel(R) Iris Plus Graphics 655" }, |
Johanna Schander | d756c27 | 2019-12-29 14:31:01 +0100 | [diff] [blame] | 524 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IRIS_PLUS_G7, |
| 525 | "Intel(R) Iris Plus Graphics G7" }, |
Michał Żygowski | 8ac40f3 | 2021-07-09 16:00:16 +0200 | [diff] [blame] | 526 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_UY, |
| 527 | "Intel(R) Iris Xe Graphics" }, |
| 528 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_Y, |
| 529 | "Intel(R) Iris Xe Graphics" }, |
| 530 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT1, |
| 531 | "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" }, |
| 532 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT1_2, |
| 533 | "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" }, |
| 534 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_ULT_1, |
| 535 | "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" }, |
| 536 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGL_GT2_ULT_2, |
| 537 | "Intel(R) UHD Graphics for 11th Gen Intel(R) Processors" }, |
Michał Kopeć | 2d8edeb | 2022-04-05 10:40:03 +0200 | [diff] [blame] | 538 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1, |
| 539 | "Intel(R) AlderLake-S GT1" }, |
| 540 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_2, |
| 541 | "Intel(R) AlderLake-S GT1" }, |
| 542 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_3, |
| 543 | "Intel(R) AlderLake-S GT1" }, |
| 544 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ADL_S_GT1_4, |
| 545 | "Intel(R) AlderLake-S GT1" }, |
Matt DeVillier | 62e883d | 2020-08-08 11:17:31 -0500 | [diff] [blame] | 546 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_UHD_GRAPHICS, |
| 547 | "Intel(R) UHD Graphics" }, |
Stefan Reinauer | 9f7af6e | 2008-05-14 14:22:59 +0000 | [diff] [blame] | 548 | }; |
| 549 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 550 | #ifndef __DARWIN__ |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 551 | static int fd_mem; |
| 552 | |
Stefan Reinauer | cff573d | 2011-03-18 22:08:39 +0000 | [diff] [blame] | 553 | void *map_physical(uint64_t phys_addr, size_t len) |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 554 | { |
| 555 | void *virt_addr; |
| 556 | |
| 557 | virt_addr = mmap(0, len, PROT_WRITE | PROT_READ, MAP_SHARED, |
| 558 | fd_mem, (off_t) phys_addr); |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 559 | |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 560 | if (virt_addr == MAP_FAILED) { |
Stefan Reinauer | a7b296d | 2011-11-14 12:40:34 -0800 | [diff] [blame] | 561 | printf("Error mapping physical memory 0x%08" PRIx64 "[0x%zx]\n", |
| 562 | phys_addr, len); |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 563 | return NULL; |
| 564 | } |
| 565 | |
| 566 | return virt_addr; |
| 567 | } |
| 568 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 569 | void unmap_physical(void *virt_addr, size_t len) |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 570 | { |
| 571 | munmap(virt_addr, len); |
| 572 | } |
| 573 | #endif |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 574 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 575 | static void print_version(void) |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 576 | { |
| 577 | printf("inteltool v%s -- ", INTELTOOL_VERSION); |
| 578 | printf("Copyright (C) 2008 coresystems GmbH\n\n"); |
| 579 | printf( |
| 580 | "This program is free software: you can redistribute it and/or modify\n" |
| 581 | "it under the terms of the GNU General Public License as published by\n" |
| 582 | "the Free Software Foundation, version 2 of the License.\n\n" |
| 583 | "This program is distributed in the hope that it will be useful,\n" |
| 584 | "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" |
| 585 | "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" |
Martin Roth | eb20e60 | 2016-01-12 13:30:50 -0700 | [diff] [blame] | 586 | "GNU General Public License for more details.\n\n"); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 587 | } |
| 588 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 589 | static void print_usage(const char *name) |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 590 | { |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 591 | printf("usage: %s [-vh?gGrplmedPMaAsfSRx]\n", name); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 592 | printf("\n" |
| 593 | " -v | --version: print the version\n" |
| 594 | " -h | --help: print this help\n\n" |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 595 | " -s | --spi: dump southbridge spi and bios_cntrl registers\n" |
Stefan Tauner | 37fcd58 | 2016-05-10 23:16:33 +0200 | [diff] [blame] | 596 | " -f | --gfx: dump graphics registers (UNSAFE: may hang system!)\n" |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 597 | " -R | --ahci: dump AHCI registers\n" |
Idwer Vollering | b123e0d | 2014-08-25 23:59:42 +0200 | [diff] [blame] | 598 | " -g | --gpio: dump southbridge GPIO registers\n" |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 599 | " -G | --gpio-diffs: show GPIO differences from defaults\n" |
Idwer Vollering | b123e0d | 2014-08-25 23:59:42 +0200 | [diff] [blame] | 600 | " -r | --rcba: dump southbridge RCBA registers\n" |
| 601 | " -p | --pmbase: dump southbridge Power Management registers\n\n" |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 602 | " -l | --lpc: dump southbridge LPC/eSPI Interface registers\n\n" |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 603 | " -m | --mchbar: dump northbridge Memory Controller registers\n" |
Stefan Tauner | 572f074 | 2016-05-05 17:29:39 +0200 | [diff] [blame] | 604 | " -S FILE | --spd=FILE: create a file storing current timings (implies -m)\n" |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 605 | " -e | --epbar: dump northbridge EPBAR registers\n" |
| 606 | " -d | --dmibar: dump northbridge DMIBAR registers\n" |
| 607 | " -P | --pciexpress: dump northbridge PCIEXBAR registers\n\n" |
| 608 | " -M | --msrs: dump CPU MSRs\n" |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 609 | " --cpu-range <start>[-<end>]: (optional) set CPU cores range for -M (--msrs) option\n" |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 610 | " -A | --ambs: dump AMB registers\n" |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 611 | " -x | --sgx: dump SGX status\n" |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 612 | " -t | --tme: dump TME status\n" |
Stefan Tauner | 37fcd58 | 2016-05-10 23:16:33 +0200 | [diff] [blame] | 613 | " -a | --all: dump all known (safe) registers\n" |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 614 | " --pcr=PORT_ID: dump all registers of a PCR port\n" |
| 615 | " (may be specified max %d times)\n" |
| 616 | "\n", MAX_PCR_PORTS); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 617 | exit(1); |
| 618 | } |
| 619 | |
Felix Singer | 19e3534 | 2019-10-25 00:16:22 +0200 | [diff] [blame] | 620 | static void print_system_info(struct pci_dev *nb, struct pci_dev *sb, struct pci_dev *gfx) |
| 621 | { |
| 622 | unsigned int id, i; |
| 623 | char *sbname = "unknown", *nbname = "unknown", *gfxname = "unknown"; |
| 624 | |
| 625 | id = cpuid(1); |
| 626 | |
| 627 | /* Determine names */ |
| 628 | for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++) { |
| 629 | if (nb->device_id == supported_chips_list[i].device_id) |
| 630 | nbname = supported_chips_list[i].name; |
| 631 | } |
| 632 | for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++) { |
| 633 | if (sb->device_id == supported_chips_list[i].device_id) |
| 634 | sbname = supported_chips_list[i].name; |
| 635 | } |
| 636 | if (gfx) { |
| 637 | for (i = 0; i < ARRAY_SIZE(supported_chips_list); i++) |
| 638 | if (gfx->device_id == supported_chips_list[i].device_id) |
| 639 | gfxname = supported_chips_list[i].name; |
| 640 | } |
| 641 | |
| 642 | /* Intel has suggested applications to display the family of a CPU as |
| 643 | * the sum of the "Family" and the "Extended Family" fields shown |
| 644 | * above, and the model as the sum of the "Model" and the 4-bit |
| 645 | * left-shifted "Extended Model" fields. |
| 646 | * http://download.intel.com/design/processor/applnots/24161832.pdf |
| 647 | */ |
| 648 | printf("CPU: ID 0x%x, Processor Type 0x%x, Family 0x%x, Model 0x%x, Stepping 0x%x\n", |
| 649 | id, (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff), |
| 650 | ((id >> 12) & 0xf0) + ((id >> 4) & 0xf), (id & 0xf)); |
| 651 | |
| 652 | printf("Northbridge: %04x:%04x (%s)\n", |
| 653 | nb->vendor_id, nb->device_id, nbname); |
| 654 | |
| 655 | printf("Southbridge: %04x:%04x (%s)\n", |
| 656 | sb->vendor_id, sb->device_id, sbname); |
| 657 | |
| 658 | if (gfx) |
| 659 | printf("IGD: %04x:%04x (%s)\n", |
| 660 | gfx->vendor_id, gfx->device_id, gfxname); |
| 661 | } |
| 662 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 663 | int main(int argc, char *argv[]) |
| 664 | { |
| 665 | struct pci_access *pacc; |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 666 | struct pci_dev *sb = NULL, *nb, *gfx = NULL, *ahci = NULL, *dev; |
Stefan Tauner | 572f074 | 2016-05-05 17:29:39 +0200 | [diff] [blame] | 667 | const char *dump_spd_file = NULL; |
Maciej Suminski | 3455672 | 2017-08-09 11:30:14 +0200 | [diff] [blame] | 668 | int opt, option_index = 0; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 669 | |
Uwe Hermann | 9a6b6b5 | 2008-05-14 21:20:55 +0000 | [diff] [blame] | 670 | int dump_gpios = 0, dump_mchbar = 0, dump_rcba = 0; |
| 671 | int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0; |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 672 | int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0; |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 673 | int dump_spi = 0, dump_gfx = 0, dump_ahci = 0, dump_sgx = 0, dump_tme = 0; |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 674 | int dump_lpc = 0; |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 675 | int show_gpio_diffs = 0; |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 676 | size_t pcr_count = 0; |
| 677 | uint8_t dump_pcr[MAX_PCR_PORTS]; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 678 | |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 679 | unsigned int cores_range_start = 0, cores_range_end = UINT_MAX; |
| 680 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 681 | static struct option long_options[] = { |
| 682 | {"version", 0, 0, 'v'}, |
| 683 | {"help", 0, 0, 'h'}, |
| 684 | {"gpios", 0, 0, 'g'}, |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 685 | {"gpio-diffs", 0, 0, 'G'}, |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 686 | {"mchbar", 0, 0, 'm'}, |
| 687 | {"rcba", 0, 0, 'r'}, |
| 688 | {"pmbase", 0, 0, 'p'}, |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 689 | {"lpc", 0, 0, 'l'}, |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 690 | {"epbar", 0, 0, 'e'}, |
| 691 | {"dmibar", 0, 0, 'd'}, |
| 692 | {"pciexpress", 0, 0, 'P'}, |
| 693 | {"msrs", 0, 0, 'M'}, |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 694 | {"cpu-range", required_argument, 0, LONG_OPT_RANGE}, |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 695 | {"ambs", 0, 0, 'A'}, |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 696 | {"spi", 0, 0, 's'}, |
Vladimir Serbinenko | fb69a69 | 2015-10-10 13:20:32 +0200 | [diff] [blame] | 697 | {"spd", 0, 0, 'S'}, |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 698 | {"all", 0, 0, 'a'}, |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 699 | {"gfx", 0, 0, 'f'}, |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 700 | {"ahci", 0, 0, 'R'}, |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 701 | {"sgx", 0, 0, 'x'}, |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 702 | {"pcr", required_argument, 0, LONG_OPT_PCR}, |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 703 | {"tme", 0, 0, 't'}, |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 704 | {0, 0, 0, 0} |
| 705 | }; |
| 706 | |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 707 | while ((opt = getopt_long(argc, argv, "vh?gGrplmedPMaAsfRS:xt", |
Uwe Hermann | 9a6b6b5 | 2008-05-14 21:20:55 +0000 | [diff] [blame] | 708 | long_options, &option_index)) != EOF) { |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 709 | switch (opt) { |
| 710 | case 'v': |
| 711 | print_version(); |
| 712 | exit(0); |
| 713 | break; |
Vladimir Serbinenko | fb69a69 | 2015-10-10 13:20:32 +0200 | [diff] [blame] | 714 | case 'S': |
| 715 | dump_spd_file = optarg; |
| 716 | dump_mchbar = 1; |
| 717 | break; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 718 | case 'g': |
| 719 | dump_gpios = 1; |
| 720 | break; |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 721 | case 'f': |
| 722 | dump_gfx = 1; |
| 723 | break; |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 724 | case 'R': |
| 725 | dump_ahci = 1; |
| 726 | break; |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 727 | case 'G': |
| 728 | show_gpio_diffs = 1; |
| 729 | break; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 730 | case 'm': |
| 731 | dump_mchbar = 1; |
| 732 | break; |
| 733 | case 'r': |
| 734 | dump_rcba = 1; |
| 735 | break; |
| 736 | case 'p': |
| 737 | dump_pmbase = 1; |
| 738 | break; |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 739 | case 'l': |
| 740 | dump_lpc = 1; |
| 741 | break; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 742 | case 'e': |
| 743 | dump_epbar = 1; |
| 744 | break; |
| 745 | case 'd': |
| 746 | dump_dmibar = 1; |
| 747 | break; |
| 748 | case 'P': |
| 749 | dump_pciexbar = 1; |
| 750 | break; |
| 751 | case 'M': |
| 752 | dump_coremsrs = 1; |
| 753 | break; |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 754 | case LONG_OPT_RANGE: |
| 755 | if (strlen(optarg) == 0) { |
| 756 | print_usage(argv[0]); |
| 757 | exit(1); |
| 758 | } |
| 759 | const int sscanf_ret = sscanf(optarg, "%u-%u", &cores_range_start, &cores_range_end); |
| 760 | if (sscanf_ret == 1) { |
| 761 | /* the end of the range is not specified - only for one core */ |
| 762 | cores_range_end = cores_range_start; |
| 763 | } else if (sscanf_ret != 2) { |
| 764 | print_usage(argv[0]); |
| 765 | exit(1); |
| 766 | } else if (cores_range_end < cores_range_start) { |
| 767 | printf("Error: invalid cores range <%u-%u>!\n", |
| 768 | cores_range_start, cores_range_end); |
| 769 | exit(1); |
| 770 | } |
| 771 | break; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 772 | case 'a': |
| 773 | dump_gpios = 1; |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 774 | show_gpio_diffs = 1; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 775 | dump_mchbar = 1; |
| 776 | dump_rcba = 1; |
| 777 | dump_pmbase = 1; |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 778 | dump_lpc = 1; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 779 | dump_epbar = 1; |
| 780 | dump_dmibar = 1; |
| 781 | dump_pciexbar = 1; |
| 782 | dump_coremsrs = 1; |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 783 | dump_ambs = 1; |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 784 | dump_spi = 1; |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 785 | dump_ahci = 1; |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 786 | dump_sgx = 1; |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 787 | dump_tme = 1; |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 788 | break; |
| 789 | case 'A': |
| 790 | dump_ambs = 1; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 791 | break; |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 792 | case 's': |
| 793 | dump_spi = 1; |
| 794 | break; |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 795 | case 'x': |
| 796 | dump_sgx = 1; |
| 797 | break; |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 798 | case 't': |
| 799 | dump_tme = 1; |
| 800 | break; |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 801 | case LONG_OPT_PCR: |
| 802 | if (pcr_count < MAX_PCR_PORTS) { |
| 803 | errno = 0; |
| 804 | const unsigned long int pcr = |
| 805 | strtoul(optarg, NULL, 0); |
| 806 | if (strlen(optarg) == 0 || errno) { |
| 807 | print_usage(argv[0]); |
| 808 | exit(1); |
| 809 | } |
| 810 | dump_pcr[pcr_count++] = (uint8_t)pcr; |
| 811 | } else { |
| 812 | print_usage(argv[0]); |
| 813 | exit(1); |
| 814 | } |
| 815 | break; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 816 | case 'h': |
| 817 | case '?': |
| 818 | default: |
| 819 | print_usage(argv[0]); |
| 820 | exit(0); |
| 821 | break; |
| 822 | } |
| 823 | } |
| 824 | |
Idwer Vollering | 3f91d81 | 2010-10-24 13:50:13 +0000 | [diff] [blame] | 825 | #if defined(__FreeBSD__) |
Stefan Tauner | 0c8b7d1 | 2013-04-05 20:38:08 +0200 | [diff] [blame] | 826 | if (open("/dev/io", O_RDWR) < 0) { |
Idwer Vollering | 3f91d81 | 2010-10-24 13:50:13 +0000 | [diff] [blame] | 827 | perror("/dev/io"); |
Andrey Korolyov | 046d217 | 2016-01-05 19:59:06 +0300 | [diff] [blame] | 828 | #elif defined(__NetBSD__) |
| 829 | # ifdef __i386__ |
| 830 | if (i386_iopl(3)) { |
| 831 | perror("iopl"); |
| 832 | # else |
| 833 | if (x86_64_iopl(3)) { |
| 834 | perror("iopl"); |
| 835 | # endif |
Idwer Vollering | 3f91d81 | 2010-10-24 13:50:13 +0000 | [diff] [blame] | 836 | #else |
Uwe Hermann | 9a6b6b5 | 2008-05-14 21:20:55 +0000 | [diff] [blame] | 837 | if (iopl(3)) { |
Idwer Vollering | 3f91d81 | 2010-10-24 13:50:13 +0000 | [diff] [blame] | 838 | perror("iopl"); |
| 839 | #endif |
Uwe Hermann | 9a6b6b5 | 2008-05-14 21:20:55 +0000 | [diff] [blame] | 840 | printf("You need to be root.\n"); |
| 841 | exit(1); |
| 842 | } |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 843 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 844 | #ifndef __DARWIN__ |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 845 | if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) { |
| 846 | perror("Can not open /dev/mem"); |
| 847 | exit(1); |
| 848 | } |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 849 | #endif |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 850 | |
| 851 | pacc = pci_alloc(); |
Nico Huber | 99b02a1 | 2017-04-05 17:39:57 +0200 | [diff] [blame] | 852 | pacc->method = PCI_ACCESS_I386_TYPE1; |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 853 | pci_init(pacc); |
| 854 | pci_scan_bus(pacc); |
| 855 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 856 | /* Find the required devices */ |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 857 | for (dev = pacc->devices; dev; dev = dev->next) { |
Maciej Pijanka | 90d1740 | 2009-09-30 17:05:46 +0000 | [diff] [blame] | 858 | pci_fill_info(dev, PCI_FILL_CLASS); |
| 859 | /* The ISA/LPC bridge can be 0x1f, 0x07, or 0x04 so we probe. */ |
| 860 | if (dev->device_class == 0x0601) { /* ISA/LPC bridge */ |
Mathias Krause | 5ad6ec5 | 2014-11-05 21:27:01 +0100 | [diff] [blame] | 861 | if (sb == NULL) { |
Maciej Pijanka | 90d1740 | 2009-09-30 17:05:46 +0000 | [diff] [blame] | 862 | sb = dev; |
Mathias Krause | 5ad6ec5 | 2014-11-05 21:27:01 +0100 | [diff] [blame] | 863 | } else { |
Maciej Pijanka | 90d1740 | 2009-09-30 17:05:46 +0000 | [diff] [blame] | 864 | fprintf(stderr, "Multiple devices with class ID" |
| 865 | " 0x0601, using %02x%02x:%02x.%02x\n", |
Mathias Krause | 5ad6ec5 | 2014-11-05 21:27:01 +0100 | [diff] [blame] | 866 | sb->domain, sb->bus, sb->dev, sb->func); |
| 867 | break; |
| 868 | } |
Maciej Pijanka | 90d1740 | 2009-09-30 17:05:46 +0000 | [diff] [blame] | 869 | } |
| 870 | } |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 871 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 872 | if (!sb) { |
| 873 | printf("No southbridge found.\n"); |
| 874 | exit(1); |
| 875 | } |
| 876 | |
Nico Huber | ac826c8 | 2017-03-31 12:09:58 +0200 | [diff] [blame] | 877 | pci_fill_info(sb, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 878 | |
| 879 | if (sb->vendor_id != PCI_VENDOR_ID_INTEL) { |
| 880 | printf("Not an Intel(R) southbridge.\n"); |
| 881 | exit(1); |
| 882 | } |
| 883 | |
| 884 | nb = pci_get_dev(pacc, 0, 0, 0x00, 0); |
| 885 | if (!nb) { |
| 886 | printf("No northbridge found.\n"); |
| 887 | exit(1); |
| 888 | } |
| 889 | |
Nico Huber | ac826c8 | 2017-03-31 12:09:58 +0200 | [diff] [blame] | 890 | pci_fill_info(nb, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 891 | |
| 892 | if (nb->vendor_id != PCI_VENDOR_ID_INTEL) { |
| 893 | printf("Not an Intel(R) northbridge.\n"); |
| 894 | exit(1); |
| 895 | } |
| 896 | |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 897 | gfx = pci_get_dev(pacc, 0, 0, 0x02, 0); |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 898 | if (gfx) { |
Nico Huber | ac826c8 | 2017-03-31 12:09:58 +0200 | [diff] [blame] | 899 | pci_fill_info(gfx, PCI_FILL_IDENT | PCI_FILL_BASES | |
| 900 | PCI_FILL_CLASS); |
Stefan Reinauer | f3b1a53 | 2020-10-23 01:42:25 +0000 | [diff] [blame] | 901 | if ((gfx->device_class & 0xff00) != 0x0300) |
| 902 | gfx = NULL; |
| 903 | else if (gfx->vendor_id != PCI_VENDOR_ID_INTEL) |
| 904 | gfx = NULL; |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 905 | } |
| 906 | |
Nico Huber | da94e17 | 2017-03-30 17:47:24 +0200 | [diff] [blame] | 907 | if (sb->device_id == PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC) { |
Marshall Dawson | 5c32549 | 2016-11-17 16:51:13 -0700 | [diff] [blame] | 908 | ahci = pci_get_dev(pacc, 0, 0, 0x13, 0); |
Nico Huber | da94e17 | 2017-03-30 17:47:24 +0200 | [diff] [blame] | 909 | } else { |
Marshall Dawson | 5c32549 | 2016-11-17 16:51:13 -0700 | [diff] [blame] | 910 | ahci = pci_get_dev(pacc, 0, 0, 0x1f, 2); |
Nico Huber | da94e17 | 2017-03-30 17:47:24 +0200 | [diff] [blame] | 911 | if (ahci) { |
| 912 | pci_fill_info(ahci, PCI_FILL_CLASS); |
| 913 | if (ahci->device_class != PCI_CLASS_STORAGE_SATA) |
| 914 | ahci = pci_get_dev(pacc, 0, 0, 0x17, 0); |
| 915 | } |
| 916 | } |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 917 | |
| 918 | if (ahci) { |
Nico Huber | ac826c8 | 2017-03-31 12:09:58 +0200 | [diff] [blame] | 919 | pci_fill_info(ahci, PCI_FILL_IDENT | PCI_FILL_BASES | |
| 920 | PCI_FILL_CLASS); |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 921 | |
Nico Huber | da94e17 | 2017-03-30 17:47:24 +0200 | [diff] [blame] | 922 | if (ahci->vendor_id != PCI_VENDOR_ID_INTEL || |
| 923 | ahci->device_class != PCI_CLASS_STORAGE_SATA) |
| 924 | ahci = NULL; |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 925 | } |
| 926 | |
Felix Singer | 19e3534 | 2019-10-25 00:16:22 +0200 | [diff] [blame] | 927 | print_system_info(nb, sb, gfx); |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 928 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 929 | /* Now do the deed */ |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 930 | if (dump_gpios) { |
Nico Huber | 09dcbf0 | 2013-04-01 15:08:04 +0200 | [diff] [blame] | 931 | print_gpios(sb, 1, show_gpio_diffs); |
| 932 | printf("\n\n"); |
| 933 | } else if (show_gpio_diffs) { |
| 934 | print_gpios(sb, 0, show_gpio_diffs); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 935 | printf("\n\n"); |
| 936 | } |
| 937 | |
| 938 | if (dump_rcba) { |
| 939 | print_rcba(sb); |
| 940 | printf("\n\n"); |
| 941 | } |
| 942 | |
| 943 | if (dump_pmbase) { |
Tobias Diedrich | 3645e61 | 2010-11-27 14:44:19 +0000 | [diff] [blame] | 944 | print_pmbase(sb, pacc); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 945 | printf("\n\n"); |
| 946 | } |
| 947 | |
Michael Niewöhner | 9952e72 | 2020-03-13 22:22:26 +0100 | [diff] [blame] | 948 | if (dump_lpc) { |
| 949 | print_lpc(sb, pacc); |
| 950 | printf("\n\n"); |
| 951 | } |
| 952 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 953 | if (dump_mchbar) { |
Vladimir Serbinenko | fb69a69 | 2015-10-10 13:20:32 +0200 | [diff] [blame] | 954 | print_mchbar(nb, pacc, dump_spd_file); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 955 | printf("\n\n"); |
| 956 | } |
| 957 | |
| 958 | if (dump_epbar) { |
| 959 | print_epbar(nb); |
| 960 | printf("\n\n"); |
| 961 | } |
| 962 | |
| 963 | if (dump_dmibar) { |
| 964 | print_dmibar(nb); |
| 965 | printf("\n\n"); |
| 966 | } |
| 967 | |
| 968 | if (dump_pciexbar) { |
| 969 | print_pciexbar(nb); |
| 970 | printf("\n\n"); |
| 971 | } |
| 972 | |
| 973 | if (dump_coremsrs) { |
Maxim Polyakov | d8163ed | 2019-10-09 18:35:23 +0300 | [diff] [blame] | 974 | print_intel_msrs(cores_range_start, cores_range_end); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 975 | printf("\n\n"); |
| 976 | } |
| 977 | |
Pratik Prajapati | 015082d | 2017-07-25 11:16:55 -0700 | [diff] [blame] | 978 | if (dump_ambs) |
Sven Schnelle | 4b7b320 | 2012-01-08 15:27:18 +0100 | [diff] [blame] | 979 | print_ambs(nb, pacc); |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 980 | |
Pratik Prajapati | 015082d | 2017-07-25 11:16:55 -0700 | [diff] [blame] | 981 | if (dump_spi) |
Alexander Couzens | aa3dd5d | 2015-01-03 02:52:10 +0100 | [diff] [blame] | 982 | print_spi(sb); |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 983 | |
Pratik Prajapati | 015082d | 2017-07-25 11:16:55 -0700 | [diff] [blame] | 984 | if (dump_gfx) |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 985 | print_gfx(gfx); |
Vladimir Serbinenko | 188aec0 | 2015-05-20 14:04:41 +0200 | [diff] [blame] | 986 | |
Pratik Prajapati | 015082d | 2017-07-25 11:16:55 -0700 | [diff] [blame] | 987 | if (dump_ahci) |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 988 | print_ahci(ahci); |
Iru Cai | 904538b | 2016-06-08 22:39:22 +0800 | [diff] [blame] | 989 | |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 990 | if (dump_sgx) |
| 991 | print_sgx(); |
| 992 | |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame] | 993 | if (dump_tme) |
| 994 | print_tme(); |
| 995 | |
Youness Alaoui | d8214d7e | 2018-03-13 16:58:52 -0400 | [diff] [blame] | 996 | if (pcr_count) |
| 997 | print_pcr_ports(sb, dump_pcr, pcr_count); |
| 998 | |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 999 | /* Clean up */ |
Nico Huber | 99b02a1 | 2017-04-05 17:39:57 +0200 | [diff] [blame] | 1000 | pcr_cleanup(); |
Nico Huber | 0660c6c | 2017-04-05 17:33:46 +0200 | [diff] [blame] | 1001 | if (ahci) |
| 1002 | pci_free_dev(ahci); |
| 1003 | if (gfx) |
| 1004 | pci_free_dev(gfx); |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 1005 | pci_free_dev(nb); |
Nico Huber | 0660c6c | 2017-04-05 17:33:46 +0200 | [diff] [blame] | 1006 | /* `sb` wasn't allocated by pci_get_dev() */ |
Stefan Reinauer | 03646be | 2008-05-13 22:14:21 +0000 | [diff] [blame] | 1007 | pci_cleanup(pacc); |
| 1008 | |
| 1009 | return 0; |
| 1010 | } |