blob: a2aa9402440349f7727ea9a04b4de2facf6e5460 [file] [log] [blame]
Stefan Tauner1e146392011-09-15 23:52:55 +00001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (c) 2010 Matthias Wenzel <bios at mazzoo dot de>
5 * Copyright (c) 2011 Stefan Tauner
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
Stefan Tauner1e146392011-09-15 23:52:55 +000022#include "ich_descriptors.h"
Stefan Taunerb3850962011-12-24 00:00:32 +000023
Nico Huberad186312016-05-02 15:15:29 +020024#ifdef ICH_DESCRIPTORS_FROM_DUMP_ONLY
Stefan Taunerb3850962011-12-24 00:00:32 +000025#include <stdio.h>
Nico Huber305f4172013-06-14 11:55:26 +020026#include <string.h>
Stefan Taunerb3850962011-12-24 00:00:32 +000027#define print(t, ...) printf(__VA_ARGS__)
Nico Huberad186312016-05-02 15:15:29 +020028#endif
29
Stefan Taunerb3850962011-12-24 00:00:32 +000030#define DESCRIPTOR_MODE_SIGNATURE 0x0ff0a55a
31/* The upper map is located in the word before the 256B-long OEM section at the
32 * end of the 4kB-long flash descriptor.
33 */
34#define UPPER_MAP_OFFSET (4096 - 256 - 4)
35#define getVTBA(flumap) (((flumap)->FLUMAP1 << 4) & 0x00000ff0)
36
Nico Huberad186312016-05-02 15:15:29 +020037#include <string.h>
Stefan Tauner1e146392011-09-15 23:52:55 +000038#include "flash.h" /* for msg_* */
39#include "programmer.h"
40
Stefan Taunerb3850962011-12-24 00:00:32 +000041#ifndef min
Nico Huber305f4172013-06-14 11:55:26 +020042#define min(a, b) (((a) < (b)) ? (a) : (b))
Stefan Taunerb3850962011-12-24 00:00:32 +000043#endif
44
Nico Huberfa622942017-03-24 17:25:37 +010045ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_content *const cont)
46{
47 switch (cs) {
48 case CHIPSET_100_SERIES_SUNRISE_POINT:
49 return 10;
50 case CHIPSET_9_SERIES_WILDCAT_POINT_LP:
51 case CHIPSET_9_SERIES_WILDCAT_POINT:
52 case CHIPSET_8_SERIES_LYNX_POINT_LP:
53 case CHIPSET_8_SERIES_LYNX_POINT:
54 case CHIPSET_8_SERIES_WELLSBURG:
55 if (cont->NR <= 6)
56 return cont->NR + 1;
57 else
58 return -1;
59 default:
60 if (cont->NR <= 4)
61 return cont->NR + 1;
62 else
63 return -1;
64 }
65}
66
67ssize_t ich_number_of_masters(const enum ich_chipset cs, const struct ich_desc_content *const cont)
68{
69 if (cont->NM < MAX_NUM_MASTERS)
70 return cont->NM + 1;
71 else
72 return -1;
73}
74
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +000075void prettyprint_ich_reg_vscc(uint32_t reg_val, int verbosity, bool print_vcl)
Stefan Tauner1e146392011-09-15 23:52:55 +000076{
77 print(verbosity, "BES=0x%x, ", (reg_val & VSCC_BES) >> VSCC_BES_OFF);
78 print(verbosity, "WG=%d, ", (reg_val & VSCC_WG) >> VSCC_WG_OFF);
79 print(verbosity, "WSR=%d, ", (reg_val & VSCC_WSR) >> VSCC_WSR_OFF);
80 print(verbosity, "WEWS=%d, ", (reg_val & VSCC_WEWS) >> VSCC_WEWS_OFF);
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +000081 print(verbosity, "EO=0x%x", (reg_val & VSCC_EO) >> VSCC_EO_OFF);
82 if (print_vcl)
83 print(verbosity, ", VCL=%d", (reg_val & VSCC_VCL) >> VSCC_VCL_OFF);
84 print(verbosity, "\n");
Stefan Tauner1e146392011-09-15 23:52:55 +000085}
86
87#define getFCBA(cont) (((cont)->FLMAP0 << 4) & 0x00000ff0)
88#define getFRBA(cont) (((cont)->FLMAP0 >> 12) & 0x00000ff0)
89#define getFMBA(cont) (((cont)->FLMAP1 << 4) & 0x00000ff0)
90#define getFISBA(cont) (((cont)->FLMAP1 >> 12) & 0x00000ff0)
91#define getFMSBA(cont) (((cont)->FLMAP2 << 4) & 0x00000ff0)
92
93void prettyprint_ich_descriptors(enum ich_chipset cs, const struct ich_descriptors *desc)
94{
Nico Huberfa622942017-03-24 17:25:37 +010095 prettyprint_ich_descriptor_content(cs, &desc->content);
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +000096 prettyprint_ich_descriptor_component(cs, desc);
Nico Huberfa622942017-03-24 17:25:37 +010097 prettyprint_ich_descriptor_region(cs, desc);
98 prettyprint_ich_descriptor_master(cs, desc);
Nico Huberad186312016-05-02 15:15:29 +020099#ifdef ICH_DESCRIPTORS_FROM_DUMP_ONLY
Stefan Taunerb3850962011-12-24 00:00:32 +0000100 if (cs >= CHIPSET_ICH8) {
101 prettyprint_ich_descriptor_upper_map(&desc->upper);
102 prettyprint_ich_descriptor_straps(cs, desc);
103 }
Nico Huberad186312016-05-02 15:15:29 +0200104#endif /* ICH_DESCRIPTORS_FROM_DUMP_ONLY */
Stefan Tauner1e146392011-09-15 23:52:55 +0000105}
106
Nico Huberfa622942017-03-24 17:25:37 +0100107void prettyprint_ich_descriptor_content(enum ich_chipset cs, const struct ich_desc_content *cont)
Stefan Tauner1e146392011-09-15 23:52:55 +0000108{
109 msg_pdbg2("=== Content Section ===\n");
110 msg_pdbg2("FLVALSIG 0x%08x\n", cont->FLVALSIG);
111 msg_pdbg2("FLMAP0 0x%08x\n", cont->FLMAP0);
112 msg_pdbg2("FLMAP1 0x%08x\n", cont->FLMAP1);
113 msg_pdbg2("FLMAP2 0x%08x\n", cont->FLMAP2);
114 msg_pdbg2("\n");
115
116 msg_pdbg2("--- Details ---\n");
Nico Huberfa622942017-03-24 17:25:37 +0100117 msg_pdbg2("NR (Number of Regions): %5zd\n", ich_number_of_regions(cs, cont));
118 msg_pdbg2("FRBA (Flash Region Base Address): 0x%03x\n", getFRBA(cont));
119 msg_pdbg2("NC (Number of Components): %5d\n", cont->NC + 1);
120 msg_pdbg2("FCBA (Flash Component Base Address): 0x%03x\n", getFCBA(cont));
121 msg_pdbg2("ISL (ICH/PCH Strap Length): %5d\n", cont->ISL);
122 msg_pdbg2("FISBA/FPSBA (Flash ICH/PCH Strap Base Address): 0x%03x\n", getFISBA(cont));
123 msg_pdbg2("NM (Number of Masters): %5zd\n", ich_number_of_masters(cs, cont));
124 msg_pdbg2("FMBA (Flash Master Base Address): 0x%03x\n", getFMBA(cont));
125 msg_pdbg2("MSL/PSL (MCH/PROC Strap Length): %5d\n", cont->MSL);
126 msg_pdbg2("FMSBA (Flash MCH/PROC Strap Base Address): 0x%03x\n", getFMSBA(cont));
Stefan Tauner1e146392011-09-15 23:52:55 +0000127 msg_pdbg2("\n");
128}
129
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000130static const char *pprint_density(enum ich_chipset cs, const struct ich_descriptors *desc, uint8_t idx)
131{
132 if (idx > 1) {
133 msg_perr("Only ICH SPI component index 0 or 1 are supported yet.\n");
134 return NULL;
135 }
136
137 if (desc->content.NC == 0 && idx > 0)
138 return "unused";
139
140 static const char * const size_str[] = {
141 "512 kB", /* 0000 */
142 "1 MB", /* 0001 */
143 "2 MB", /* 0010 */
144 "4 MB", /* 0011 */
145 "8 MB", /* 0100 */
146 "16 MB", /* 0101 */ /* Maximum up to Lynx Point (excl.) */
147 "32 MB", /* 0110 */
148 "64 MB", /* 0111 */
149 };
150
151 switch (cs) {
152 case CHIPSET_ICH8:
153 case CHIPSET_ICH9:
154 case CHIPSET_ICH10:
155 case CHIPSET_5_SERIES_IBEX_PEAK:
156 case CHIPSET_6_SERIES_COUGAR_POINT:
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000157 case CHIPSET_7_SERIES_PANTHER_POINT:
158 case CHIPSET_BAYTRAIL: {
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000159 uint8_t size_enc;
160 if (idx == 0) {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000161 size_enc = desc->component.dens_old.comp1_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000162 } else {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000163 size_enc = desc->component.dens_old.comp2_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000164 }
165 if (size_enc > 5)
166 return "reserved";
167 return size_str[size_enc];
168 }
169 case CHIPSET_8_SERIES_LYNX_POINT:
170 case CHIPSET_8_SERIES_LYNX_POINT_LP:
Duncan Laurie823096e2014-08-20 15:39:38 +0000171 case CHIPSET_8_SERIES_WELLSBURG:
Nico Huber51205912017-03-17 17:59:54 +0100172 case CHIPSET_9_SERIES_WILDCAT_POINT:
Nico Huberfa622942017-03-24 17:25:37 +0100173 case CHIPSET_9_SERIES_WILDCAT_POINT_LP:
174 case CHIPSET_100_SERIES_SUNRISE_POINT: {
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000175 uint8_t size_enc;
176 if (idx == 0) {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000177 size_enc = desc->component.dens_new.comp1_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000178 } else {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000179 size_enc = desc->component.dens_new.comp2_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000180 }
181 if (size_enc > 7)
182 return "reserved";
183 return size_str[size_enc];
184 }
185 case CHIPSET_ICH_UNKNOWN:
186 default:
187 return "unknown";
188 }
189}
190
191static const char *pprint_freq(enum ich_chipset cs, uint8_t value)
Stefan Tauner1e146392011-09-15 23:52:55 +0000192{
Nico Huberfa622942017-03-24 17:25:37 +0100193 static const char *const freq_str[2][8] = { {
Stefan Tauner1e146392011-09-15 23:52:55 +0000194 "20 MHz", /* 000 */
195 "33 MHz", /* 001 */
196 "reserved", /* 010 */
197 "reserved", /* 011 */
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000198 "50 MHz", /* 100 */ /* New since Ibex Peak */
Stefan Tauner1e146392011-09-15 23:52:55 +0000199 "reserved", /* 101 */
200 "reserved", /* 110 */
201 "reserved" /* 111 */
Nico Huberfa622942017-03-24 17:25:37 +0100202 }, {
203 "reserved", /* 000 */
204 "reserved", /* 001 */
205 "48 MHz", /* 010 */
206 "reserved", /* 011 */
207 "30 MHz", /* 100 */
208 "reserved", /* 101 */
209 "17 MHz", /* 110 */
210 "reserved" /* 111 */
211 } };
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000212
213 switch (cs) {
214 case CHIPSET_ICH8:
215 case CHIPSET_ICH9:
216 case CHIPSET_ICH10:
217 if (value > 1)
218 return "reserved";
219 case CHIPSET_5_SERIES_IBEX_PEAK:
220 case CHIPSET_6_SERIES_COUGAR_POINT:
221 case CHIPSET_7_SERIES_PANTHER_POINT:
222 case CHIPSET_8_SERIES_LYNX_POINT:
Duncan Laurie4095ed72014-08-20 15:39:32 +0000223 case CHIPSET_BAYTRAIL:
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000224 case CHIPSET_8_SERIES_LYNX_POINT_LP:
225 case CHIPSET_8_SERIES_WELLSBURG:
Duncan Laurie823096e2014-08-20 15:39:38 +0000226 case CHIPSET_9_SERIES_WILDCAT_POINT:
Nico Huber51205912017-03-17 17:59:54 +0100227 case CHIPSET_9_SERIES_WILDCAT_POINT_LP:
Nico Huberfa622942017-03-24 17:25:37 +0100228 return freq_str[0][value];
229 case CHIPSET_100_SERIES_SUNRISE_POINT:
230 return freq_str[1][value];
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000231 case CHIPSET_ICH_UNKNOWN:
232 default:
233 return "unknown";
234 }
235}
236
237void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_descriptors *desc)
238{
Stefan Tauner1e146392011-09-15 23:52:55 +0000239
240 msg_pdbg2("=== Component Section ===\n");
241 msg_pdbg2("FLCOMP 0x%08x\n", desc->component.FLCOMP);
242 msg_pdbg2("FLILL 0x%08x\n", desc->component.FLILL );
Nico Huberfa622942017-03-24 17:25:37 +0100243 if (cs == CHIPSET_100_SERIES_SUNRISE_POINT)
244 msg_pdbg2("FLILL1 0x%08x\n", desc->component.FLILL1);
Stefan Tauner1e146392011-09-15 23:52:55 +0000245 msg_pdbg2("\n");
246
247 msg_pdbg2("--- Details ---\n");
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000248 msg_pdbg2("Component 1 density: %s\n", pprint_density(cs, desc, 0));
Stefan Tauner1e146392011-09-15 23:52:55 +0000249 if (desc->content.NC)
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000250 msg_pdbg2("Component 2 density: %s\n", pprint_density(cs, desc, 1));
Stefan Tauner1e146392011-09-15 23:52:55 +0000251 else
252 msg_pdbg2("Component 2 is not used.\n");
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000253 msg_pdbg2("Read Clock Frequency: %s\n", pprint_freq(cs, desc->component.modes.freq_read));
254 msg_pdbg2("Read ID and Status Clock Freq.: %s\n", pprint_freq(cs, desc->component.modes.freq_read_id));
255 msg_pdbg2("Write and Erase Clock Freq.: %s\n", pprint_freq(cs, desc->component.modes.freq_write));
256 msg_pdbg2("Fast Read is %ssupported.\n", desc->component.modes.fastread ? "" : "not ");
257 if (desc->component.modes.fastread)
Stefan Tauner1e146392011-09-15 23:52:55 +0000258 msg_pdbg2("Fast Read Clock Frequency: %s\n",
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000259 pprint_freq(cs, desc->component.modes.freq_fastread));
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000260 if (cs > CHIPSET_6_SERIES_COUGAR_POINT)
261 msg_pdbg2("Dual Output Fast Read Support: %sabled\n",
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000262 desc->component.modes.dual_output ? "dis" : "en");
Nico Huberfa622942017-03-24 17:25:37 +0100263 if (desc->component.FLILL == 0 &&
264 (cs != CHIPSET_100_SERIES_SUNRISE_POINT || desc->component.FLILL1 == 0)) {
Stefan Tauner1e146392011-09-15 23:52:55 +0000265 msg_pdbg2("No forbidden opcodes.\n");
Nico Huberfa622942017-03-24 17:25:37 +0100266 } else {
Stefan Tauner1e146392011-09-15 23:52:55 +0000267 msg_pdbg2("Invalid instruction 0: 0x%02x\n",
268 desc->component.invalid_instr0);
269 msg_pdbg2("Invalid instruction 1: 0x%02x\n",
270 desc->component.invalid_instr1);
271 msg_pdbg2("Invalid instruction 2: 0x%02x\n",
272 desc->component.invalid_instr2);
273 msg_pdbg2("Invalid instruction 3: 0x%02x\n",
274 desc->component.invalid_instr3);
Nico Huberfa622942017-03-24 17:25:37 +0100275 if (cs == CHIPSET_100_SERIES_SUNRISE_POINT) {
276 msg_pdbg2("Invalid instruction 4: 0x%02x\n",
277 desc->component.invalid_instr4);
278 msg_pdbg2("Invalid instruction 5: 0x%02x\n",
279 desc->component.invalid_instr5);
280 msg_pdbg2("Invalid instruction 6: 0x%02x\n",
281 desc->component.invalid_instr6);
282 msg_pdbg2("Invalid instruction 7: 0x%02x\n",
283 desc->component.invalid_instr7);
284 }
Stefan Tauner1e146392011-09-15 23:52:55 +0000285 }
286 msg_pdbg2("\n");
287}
288
289static void pprint_freg(const struct ich_desc_region *reg, uint32_t i)
290{
Nico Huberfa622942017-03-24 17:25:37 +0100291 static const char *const region_names[] = {
292 "Descr.", "BIOS", "ME", "GbE", "Platf.", "unknown", "unknown", "unknown",
293 "EC", "unknown",
Stefan Tauner1e146392011-09-15 23:52:55 +0000294 };
Nico Huberfa622942017-03-24 17:25:37 +0100295 if (i >= ARRAY_SIZE(region_names)) {
Stefan Tauner1e146392011-09-15 23:52:55 +0000296 msg_pdbg2("%s: region index too high.\n", __func__);
297 return;
298 }
299 uint32_t base = ICH_FREG_BASE(reg->FLREGs[i]);
300 uint32_t limit = ICH_FREG_LIMIT(reg->FLREGs[i]);
Nico Huberfa622942017-03-24 17:25:37 +0100301 msg_pdbg2("Region %d (%-7s) ", i, region_names[i]);
Stefan Tauner1e146392011-09-15 23:52:55 +0000302 if (base > limit)
303 msg_pdbg2("is unused.\n");
304 else
Nico Huber0bb3f712017-03-29 16:44:33 +0200305 msg_pdbg2("0x%08x - 0x%08x\n", base, limit);
Stefan Tauner1e146392011-09-15 23:52:55 +0000306}
307
Nico Huberfa622942017-03-24 17:25:37 +0100308void prettyprint_ich_descriptor_region(const enum ich_chipset cs, const struct ich_descriptors *const desc)
Stefan Tauner1e146392011-09-15 23:52:55 +0000309{
Nico Huberfa622942017-03-24 17:25:37 +0100310 size_t i;
311 const ssize_t nr = ich_number_of_regions(cs, &desc->content);
Stefan Tauner1e146392011-09-15 23:52:55 +0000312 msg_pdbg2("=== Region Section ===\n");
Nico Huberfa622942017-03-24 17:25:37 +0100313 if (nr < 0) {
Stefan Tauner1e146392011-09-15 23:52:55 +0000314 msg_pdbg2("%s: number of regions too high (%d).\n", __func__,
Nico Huberfa622942017-03-24 17:25:37 +0100315 desc->content.NR + 1);
Stefan Tauner1e146392011-09-15 23:52:55 +0000316 return;
317 }
Nico Huberfa622942017-03-24 17:25:37 +0100318 for (i = 0; i < nr; i++)
319 msg_pdbg2("FLREG%zu 0x%08x\n", i, desc->region.FLREGs[i]);
Stefan Tauner1e146392011-09-15 23:52:55 +0000320 msg_pdbg2("\n");
321
322 msg_pdbg2("--- Details ---\n");
Nico Huberfa622942017-03-24 17:25:37 +0100323 for (i = 0; i < nr; i++)
Stefan Tauner1e146392011-09-15 23:52:55 +0000324 pprint_freg(&desc->region, i);
325 msg_pdbg2("\n");
326}
327
Nico Huberfa622942017-03-24 17:25:37 +0100328void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct ich_descriptors *const desc)
Stefan Tauner1e146392011-09-15 23:52:55 +0000329{
Nico Huberfa622942017-03-24 17:25:37 +0100330 size_t i;
331 const ssize_t nm = ich_number_of_masters(cs, &desc->content);
Stefan Tauner1e146392011-09-15 23:52:55 +0000332 msg_pdbg2("=== Master Section ===\n");
Nico Huberfa622942017-03-24 17:25:37 +0100333 if (nm < 0) {
334 msg_pdbg2("%s: number of masters too high (%d).\n", __func__,
335 desc->content.NM + 1);
336 return;
337 }
338 for (i = 0; i < nm; i++)
339 msg_pdbg2("FLMSTR%zu 0x%08x\n", i + 1, desc->master.FLMSTRs[i]);
Stefan Tauner1e146392011-09-15 23:52:55 +0000340 msg_pdbg2("\n");
341
342 msg_pdbg2("--- Details ---\n");
Nico Huberfa622942017-03-24 17:25:37 +0100343 if (cs == CHIPSET_100_SERIES_SUNRISE_POINT) {
344 const char *const master_names[] = {
345 "BIOS", "ME", "GbE", "unknown", "EC",
346 };
347 if (nm >= ARRAY_SIZE(master_names)) {
348 msg_pdbg2("%s: number of masters too high (%d).\n", __func__,
349 desc->content.NM + 1);
350 return;
351 }
352
353 msg_pdbg2(" FD BIOS ME GbE Pltf Reg5 Reg6 Reg7 EC Reg9\n");
354 for (i = 0; i < nm; i++) {
355 size_t j;
356 msg_pdbg2("%-4s", master_names[i]);
357 for (j = 0; j < 10; j++)
358 msg_pdbg2(" %c%c ",
359 desc->master.mstr[i].read & (1 << j) ? 'r' : ' ',
360 desc->master.mstr[i].write & (1 << j) ? 'w' : ' ');
361 msg_pdbg2("\n");
362 }
363 } else {
364 const struct ich_desc_master *const mstr = &desc->master;
365 msg_pdbg2(" Descr. BIOS ME GbE Platf.\n");
366 msg_pdbg2("BIOS %c%c %c%c %c%c %c%c %c%c\n",
367 (mstr->BIOS_descr_r) ?'r':' ', (mstr->BIOS_descr_w) ?'w':' ',
368 (mstr->BIOS_BIOS_r) ?'r':' ', (mstr->BIOS_BIOS_w) ?'w':' ',
369 (mstr->BIOS_ME_r) ?'r':' ', (mstr->BIOS_ME_w) ?'w':' ',
370 (mstr->BIOS_GbE_r) ?'r':' ', (mstr->BIOS_GbE_w) ?'w':' ',
371 (mstr->BIOS_plat_r) ?'r':' ', (mstr->BIOS_plat_w) ?'w':' ');
372 msg_pdbg2("ME %c%c %c%c %c%c %c%c %c%c\n",
373 (mstr->ME_descr_r) ?'r':' ', (mstr->ME_descr_w) ?'w':' ',
374 (mstr->ME_BIOS_r) ?'r':' ', (mstr->ME_BIOS_w) ?'w':' ',
375 (mstr->ME_ME_r) ?'r':' ', (mstr->ME_ME_w) ?'w':' ',
376 (mstr->ME_GbE_r) ?'r':' ', (mstr->ME_GbE_w) ?'w':' ',
377 (mstr->ME_plat_r) ?'r':' ', (mstr->ME_plat_w) ?'w':' ');
378 msg_pdbg2("GbE %c%c %c%c %c%c %c%c %c%c\n",
379 (mstr->GbE_descr_r) ?'r':' ', (mstr->GbE_descr_w) ?'w':' ',
380 (mstr->GbE_BIOS_r) ?'r':' ', (mstr->GbE_BIOS_w) ?'w':' ',
381 (mstr->GbE_ME_r) ?'r':' ', (mstr->GbE_ME_w) ?'w':' ',
382 (mstr->GbE_GbE_r) ?'r':' ', (mstr->GbE_GbE_w) ?'w':' ',
383 (mstr->GbE_plat_r) ?'r':' ', (mstr->GbE_plat_w) ?'w':' ');
384 }
Stefan Tauner1e146392011-09-15 23:52:55 +0000385 msg_pdbg2("\n");
386}
387
Stefan Taunerb3850962011-12-24 00:00:32 +0000388void prettyprint_ich_descriptor_straps_ich8(const struct ich_descriptors *desc)
389{
390 static const char * const str_GPIO12[4] = {
391 "GPIO12",
392 "LAN PHY Power Control Function (Native Output)",
393 "GLAN_DOCK# (Native Input)",
394 "invalid configuration",
395 };
396
397 msg_pdbg2("--- MCH details ---\n");
398 msg_pdbg2("ME B is %sabled.\n", desc->north.ich8.MDB ? "dis" : "en");
399 msg_pdbg2("\n");
400
401 msg_pdbg2("--- ICH details ---\n");
402 msg_pdbg2("ME SMBus Address 1: 0x%02x\n", desc->south.ich8.ASD);
403 msg_pdbg2("ME SMBus Address 2: 0x%02x\n", desc->south.ich8.ASD2);
404 msg_pdbg2("ME SMBus Controller is connected to the %s.\n",
405 desc->south.ich8.MESM2SEL ? "SMLink pins" : "SMBus pins");
406 msg_pdbg2("SPI CS1 is used for %s.\n",
407 desc->south.ich8.SPICS1_LANPHYPC_SEL ?
408 "LAN PHY Power Control Function" :
409 "SPI Chip Select");
410 msg_pdbg2("GPIO12 is used as %s.\n",
411 str_GPIO12[desc->south.ich8.GPIO12_SEL]);
412 msg_pdbg2("PCIe Port 6 is used for %s.\n",
413 desc->south.ich8.GLAN_PCIE_SEL ? "integrated LAN" : "PCI Express");
414 msg_pdbg2("%sn BMC Mode: "
415 "Intel AMT SMBus Controller 1 is connected to %s.\n",
416 desc->south.ich8.BMCMODE ? "I" : "Not i",
417 desc->south.ich8.BMCMODE ? "SMLink" : "SMBus");
418 msg_pdbg2("TCO is in %s Mode.\n",
419 desc->south.ich8.TCOMODE ? "Advanced TCO" : "Legacy/Compatible");
420 msg_pdbg2("ME A is %sabled.\n",
421 desc->south.ich8.ME_DISABLE ? "dis" : "en");
422 msg_pdbg2("\n");
423}
424
425static void prettyprint_ich_descriptor_straps_56_pciecs(uint8_t conf, uint8_t off)
426{
427 msg_pdbg2("PCI Express Port Configuration Strap %d: ", off+1);
428
429 off *= 4;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000430 switch (conf){
Stefan Taunerb3850962011-12-24 00:00:32 +0000431 case 0:
432 msg_pdbg2("4x1 Ports %d-%d (x1)", 1+off, 4+off);
433 break;
434 case 1:
435 msg_pdbg2("1x2, 2x1 Port %d (x2), Port %d (disabled), "
436 "Ports %d, %d (x1)", 1+off, 2+off, 3+off, 4+off);
437 break;
438 case 2:
439 msg_pdbg2("2x2 Port %d (x2), Port %d (x2), Ports "
440 "%d, %d (disabled)", 1+off, 3+off, 2+off, 4+off);
441 break;
442 case 3:
443 msg_pdbg2("1x4 Port %d (x4), Ports %d-%d (disabled)",
444 1+off, 2+off, 4+off);
445 break;
446 }
447 msg_pdbg2("\n");
448}
449
450void prettyprint_ich_descriptor_pchstraps45678_56(const struct ich_desc_south_strap *s)
451{
452 /* PCHSTRP4 */
453 msg_pdbg2("Intel PHY is %s.\n",
454 (s->ibex.PHYCON == 2) ? "connected" :
455 (s->ibex.PHYCON == 0) ? "disconnected" : "reserved");
456 msg_pdbg2("GbE MAC SMBus address is %sabled.\n",
457 s->ibex.GBEMAC_SMBUS_ADDR_EN ? "en" : "dis");
458 msg_pdbg2("GbE MAC SMBus address: 0x%02x\n",
459 s->ibex.GBEMAC_SMBUS_ADDR);
460 msg_pdbg2("GbE PHY SMBus address: 0x%02x\n",
461 s->ibex.GBEPHY_SMBUS_ADDR);
462
463 /* PCHSTRP5 */
464 /* PCHSTRP6 */
465 /* PCHSTRP7 */
466 msg_pdbg2("Intel ME SMBus Subsystem Vendor ID: 0x%04x\n",
467 s->ibex.MESMA2UDID_VENDOR);
468 msg_pdbg2("Intel ME SMBus Subsystem Device ID: 0x%04x\n",
469 s->ibex.MESMA2UDID_VENDOR);
470
471 /* PCHSTRP8 */
472}
473
474void prettyprint_ich_descriptor_pchstraps111213_56(const struct ich_desc_south_strap *s)
475{
476 /* PCHSTRP11 */
477 msg_pdbg2("SMLink1 GP Address is %sabled.\n",
478 s->ibex.SML1GPAEN ? "en" : "dis");
479 msg_pdbg2("SMLink1 controller General Purpose Target address: 0x%02x\n",
480 s->ibex.SML1GPA);
481 msg_pdbg2("SMLink1 I2C Target address is %sabled.\n",
482 s->ibex.SML1I2CAEN ? "en" : "dis");
483 msg_pdbg2("SMLink1 I2C Target address: 0x%02x\n",
484 s->ibex.SML1I2CA);
485
486 /* PCHSTRP12 */
487 /* PCHSTRP13 */
488}
489
490void prettyprint_ich_descriptor_straps_ibex(const struct ich_desc_south_strap *s)
491{
Stefan Tauner67d163d2013-01-15 17:37:48 +0000492 static const uint8_t dec_t209min[4] = {
Stefan Taunerb3850962011-12-24 00:00:32 +0000493 100,
494 50,
495 5,
496 1
497 };
498
499 msg_pdbg2("--- PCH ---\n");
500
501 /* PCHSTRP0 */
502 msg_pdbg2("Chipset configuration Softstrap 2: %d\n", s->ibex.cs_ss2);
503 msg_pdbg2("Intel ME SMBus Select is %sabled.\n",
504 s->ibex.SMB_EN ? "en" : "dis");
505 msg_pdbg2("SMLink0 segment is %sabled.\n",
506 s->ibex.SML0_EN ? "en" : "dis");
507 msg_pdbg2("SMLink1 segment is %sabled.\n",
508 s->ibex.SML1_EN ? "en" : "dis");
509 msg_pdbg2("SMLink1 Frequency: %s\n",
510 (s->ibex.SML1FRQ == 1) ? "100 kHz" : "reserved");
511 msg_pdbg2("Intel ME SMBus Frequency: %s\n",
512 (s->ibex.SMB0FRQ == 1) ? "100 kHz" : "reserved");
513 msg_pdbg2("SMLink0 Frequency: %s\n",
514 (s->ibex.SML0FRQ == 1) ? "100 kHz" : "reserved");
515 msg_pdbg2("GPIO12 is used as %s.\n", s->ibex.LANPHYPC_GP12_SEL ?
516 "LAN_PHY_PWR_CTRL" : "general purpose output");
517 msg_pdbg2("Chipset configuration Softstrap 1: %d\n", s->ibex.cs_ss1);
518 msg_pdbg2("DMI RequesterID Checks are %sabled.\n",
519 s->ibex.DMI_REQID_DIS ? "en" : "dis");
520 msg_pdbg2("BIOS Boot-Block size (BBBS): %d kB.\n",
521 1 << (6 + s->ibex.BBBS));
522
523 /* PCHSTRP1 */
524 msg_pdbg2("Chipset configuration Softstrap 3: 0x%x\n", s->ibex.cs_ss3);
525
526 /* PCHSTRP2 */
527 msg_pdbg2("ME SMBus ASD address is %sabled.\n",
528 s->ibex.MESMASDEN ? "en" : "dis");
529 msg_pdbg2("ME SMBus Controller ASD Target address: 0x%02x\n",
530 s->ibex.MESMASDA);
531 msg_pdbg2("ME SMBus I2C address is %sabled.\n",
532 s->ibex.MESMI2CEN ? "en" : "dis");
533 msg_pdbg2("ME SMBus I2C target address: 0x%02x\n",
534 s->ibex.MESMI2CA);
535
536 /* PCHSTRP3 */
537 prettyprint_ich_descriptor_pchstraps45678_56(s);
538 /* PCHSTRP9 */
539 prettyprint_ich_descriptor_straps_56_pciecs(s->ibex.PCIEPCS1, 0);
540 prettyprint_ich_descriptor_straps_56_pciecs(s->ibex.PCIEPCS1, 1);
541 msg_pdbg2("PCIe Lane Reversal 1: PCIe Lanes 0-3 are %sreserved.\n",
542 s->ibex.PCIELR1 ? "" : "not ");
543 msg_pdbg2("PCIe Lane Reversal 2: PCIe Lanes 4-7 are %sreserved.\n",
544 s->ibex.PCIELR2 ? "" : "not ");
545 msg_pdbg2("DMI Lane Reversal: DMI Lanes 0-3 are %sreserved.\n",
546 s->ibex.DMILR ? "" : "not ");
547 msg_pdbg2("Default PHY PCIe Port is %d.\n", s->ibex.PHY_PCIEPORTSEL+1);
548 msg_pdbg2("Integrated MAC/PHY communication over PCIe is %sabled.\n",
549 s->ibex.PHY_PCIE_EN ? "en" : "dis");
550
551 /* PCHSTRP10 */
552 msg_pdbg2("Management Engine will boot from %sflash.\n",
553 s->ibex.ME_BOOT_FLASH ? "" : "ROM, then ");
554 msg_pdbg2("Chipset configuration Softstrap 5: %d\n", s->ibex.cs_ss5);
555 msg_pdbg2("Virtualization Engine Enable 1 is %sabled.\n",
556 s->ibex.VE_EN ? "en" : "dis");
557 msg_pdbg2("ME Memory-attached Debug Display Device is %sabled.\n",
558 s->ibex.MMDDE ? "en" : "dis");
559 msg_pdbg2("ME Memory-attached Debug Display Device address: 0x%02x\n",
560 s->ibex.MMADDR);
561 msg_pdbg2("Chipset configuration Softstrap 7: %d\n", s->ibex.cs_ss7);
562 msg_pdbg2("Integrated Clocking Configuration is %d.\n",
563 (s->ibex.ICC_SEL == 7) ? 0 : s->ibex.ICC_SEL);
564 msg_pdbg2("PCH Signal CL_RST1# does %sassert when Intel ME performs a "
565 "reset.\n", s->ibex.MER_CL1 ? "" : "not ");
566
567 prettyprint_ich_descriptor_pchstraps111213_56(s);
568
569 /* PCHSTRP14 */
570 msg_pdbg2("Virtualization Engine Enable 2 is %sabled.\n",
571 s->ibex.VE_EN2 ? "en" : "dis");
572 msg_pdbg2("Virtualization Engine will boot from %sflash.\n",
573 s->ibex.VE_BOOT_FLASH ? "" : "ROM, then ");
574 msg_pdbg2("Braidwood SSD functionality is %sabled.\n",
575 s->ibex.BW_SSD ? "en" : "dis");
576 msg_pdbg2("Braidwood NVMHCI functionality is %sabled.\n",
577 s->ibex.NVMHCI_EN ? "en" : "dis");
578
579 /* PCHSTRP15 */
580 msg_pdbg2("Chipset configuration Softstrap 6: %d\n", s->ibex.cs_ss6);
581 msg_pdbg2("Integrated wired LAN Solution is %sabled.\n",
582 s->ibex.IWL_EN ? "en" : "dis");
583 msg_pdbg2("t209 min Timing: %d ms\n",
584 dec_t209min[s->ibex.t209min]);
585 msg_pdbg2("\n");
586}
587
588void prettyprint_ich_descriptor_straps_cougar(const struct ich_desc_south_strap *s)
589{
590 msg_pdbg2("--- PCH ---\n");
591
592 /* PCHSTRP0 */
593 msg_pdbg2("Chipset configuration Softstrap 1: %d\n", s->cougar.cs_ss1);
594 msg_pdbg2("Intel ME SMBus Select is %sabled.\n",
595 s->ibex.SMB_EN ? "en" : "dis");
596 msg_pdbg2("SMLink0 segment is %sabled.\n",
597 s->ibex.SML0_EN ? "en" : "dis");
598 msg_pdbg2("SMLink1 segment is %sabled.\n",
599 s->ibex.SML1_EN ? "en" : "dis");
600 msg_pdbg2("SMLink1 Frequency: %s\n",
601 (s->ibex.SML1FRQ == 1) ? "100 kHz" : "reserved");
602 msg_pdbg2("Intel ME SMBus Frequency: %s\n",
603 (s->ibex.SMB0FRQ == 1) ? "100 kHz" : "reserved");
604 msg_pdbg2("SMLink0 Frequency: %s\n",
605 (s->ibex.SML0FRQ == 1) ? "100 kHz" : "reserved");
606 msg_pdbg2("GPIO12 is used as %s.\n", s->ibex.LANPHYPC_GP12_SEL ?
607 "LAN_PHY_PWR_CTRL" : "general purpose output");
608 msg_pdbg2("LinkSec is %sabled.\n",
609 s->cougar.LINKSEC_DIS ? "en" : "dis");
610 msg_pdbg2("DMI RequesterID Checks are %sabled.\n",
611 s->ibex.DMI_REQID_DIS ? "en" : "dis");
612 msg_pdbg2("BIOS Boot-Block size (BBBS): %d kB.\n",
613 1 << (6 + s->ibex.BBBS));
614
615 /* PCHSTRP1 */
616 msg_pdbg2("Chipset configuration Softstrap 3: 0x%x\n", s->ibex.cs_ss3);
617 msg_pdbg2("Chipset configuration Softstrap 2: 0x%x\n", s->ibex.cs_ss2);
618
619 /* PCHSTRP2 */
620 msg_pdbg2("ME SMBus ASD address is %sabled.\n",
621 s->ibex.MESMASDEN ? "en" : "dis");
622 msg_pdbg2("ME SMBus Controller ASD Target address: 0x%02x\n",
623 s->ibex.MESMASDA);
624 msg_pdbg2("ME SMBus MCTP Address is %sabled.\n",
625 s->cougar.MESMMCTPAEN ? "en" : "dis");
626 msg_pdbg2("ME SMBus MCTP target address: 0x%02x\n",
627 s->cougar.MESMMCTPA);
628 msg_pdbg2("ME SMBus I2C address is %sabled.\n",
629 s->ibex.MESMI2CEN ? "en" : "dis");
630 msg_pdbg2("ME SMBus I2C target address: 0x%02x\n",
631 s->ibex.MESMI2CA);
632
633 /* PCHSTRP3 */
634 prettyprint_ich_descriptor_pchstraps45678_56(s);
635 /* PCHSTRP9 */
636 prettyprint_ich_descriptor_straps_56_pciecs(s->ibex.PCIEPCS1, 0);
637 prettyprint_ich_descriptor_straps_56_pciecs(s->ibex.PCIEPCS1, 1);
638 msg_pdbg2("PCIe Lane Reversal 1: PCIe Lanes 0-3 are %sreserved.\n",
639 s->ibex.PCIELR1 ? "" : "not ");
640 msg_pdbg2("PCIe Lane Reversal 2: PCIe Lanes 4-7 are %sreserved.\n",
641 s->ibex.PCIELR2 ? "" : "not ");
642 msg_pdbg2("DMI Lane Reversal: DMI Lanes 0-3 are %sreserved.\n",
643 s->ibex.DMILR ? "" : "not ");
644 msg_pdbg2("ME Debug status writes over SMBUS are %sabled.\n",
645 s->cougar.MDSMBE_EN ? "en" : "dis");
646 msg_pdbg2("ME Debug SMBus Emergency Mode address: 0x%02x (raw)\n",
647 s->cougar.MDSMBE_ADD);
648 msg_pdbg2("Default PHY PCIe Port is %d.\n", s->ibex.PHY_PCIEPORTSEL+1);
649 msg_pdbg2("Integrated MAC/PHY communication over PCIe is %sabled.\n",
650 s->ibex.PHY_PCIE_EN ? "en" : "dis");
651 msg_pdbg2("PCIe ports Subtractive Decode Agent is %sabled.\n",
652 s->cougar.SUB_DECODE_EN ? "en" : "dis");
653 msg_pdbg2("GPIO74 is used as %s.\n", s->cougar.PCHHOT_SML1ALERT_SEL ?
654 "PCHHOT#" : "SML1ALERT#");
655
656 /* PCHSTRP10 */
657 msg_pdbg2("Management Engine will boot from %sflash.\n",
658 s->ibex.ME_BOOT_FLASH ? "" : "ROM, then ");
659
660 msg_pdbg2("ME Debug SMBus Emergency Mode is %sabled.\n",
661 s->cougar.MDSMBE_EN ? "en" : "dis");
662 msg_pdbg2("ME Debug SMBus Emergency Mode Address: 0x%02x\n",
663 s->cougar.MDSMBE_ADD);
664
665 msg_pdbg2("Integrated Clocking Configuration used: %d\n",
666 s->cougar.ICC_SEL);
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000667 msg_pdbg2("PCH Signal CL_RST1# does %sassert when Intel ME performs a reset.\n",
668 s->ibex.MER_CL1 ? "" : "not ");
Stefan Taunerb3850962011-12-24 00:00:32 +0000669 msg_pdbg2("ICC Profile is selected by %s.\n",
670 s->cougar.ICC_PRO_SEL ? "Softstraps" : "BIOS");
671 msg_pdbg2("Deep SX is %ssupported on the platform.\n",
672 s->cougar.Deep_SX_EN ? "not " : "");
673 msg_pdbg2("ME Debug LAN Emergency Mode is %sabled.\n",
674 s->cougar.ME_DBG_LAN ? "en" : "dis");
675
676 prettyprint_ich_descriptor_pchstraps111213_56(s);
677
678 /* PCHSTRP14 */
679 /* PCHSTRP15 */
680 msg_pdbg2("Chipset configuration Softstrap 6: %d\n", s->cougar.cs_ss6);
681 msg_pdbg2("Integrated wired LAN is %sabled.\n",
682 s->cougar.IWL_EN ? "en" : "dis");
683 msg_pdbg2("Chipset configuration Softstrap 5: %d\n", s->cougar.cs_ss5);
684 msg_pdbg2("SMLink1 provides temperature from %s.\n",
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000685 s->cougar.SMLINK1_THERM_SEL ? "PCH only" : "the CPU, PCH and DIMMs");
Stefan Taunerb3850962011-12-24 00:00:32 +0000686 msg_pdbg2("GPIO29 is used as %s.\n", s->cougar.SLP_LAN_GP29_SEL ?
687 "general purpose output" : "SLP_LAN#");
688
689 /* PCHSTRP16 */
690 /* PCHSTRP17 */
691 msg_pdbg2("Integrated Clock: %s Clock Mode\n",
692 s->cougar.ICML ? "Buffered Through" : "Full Integrated");
693 msg_pdbg2("\n");
694}
695
696void prettyprint_ich_descriptor_straps(enum ich_chipset cs, const struct ich_descriptors *desc)
697{
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000698 unsigned int i, max_count;
Stefan Taunerb3850962011-12-24 00:00:32 +0000699 msg_pdbg2("=== Softstraps ===\n");
700
Nico Huberd7c75522017-03-29 16:31:49 +0200701 max_count = min(ARRAY_SIZE(desc->north.STRPs), desc->content.MSL);
702 if (max_count < desc->content.MSL) {
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000703 msg_pdbg2("MSL (%u) is greater than the current maximum of %u entries.\n",
Nico Huberd7c75522017-03-29 16:31:49 +0200704 desc->content.MSL, max_count);
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000705 msg_pdbg2("Only the first %u entries will be printed.\n", max_count);
Nico Huberd7c75522017-03-29 16:31:49 +0200706 }
Stefan Taunerb3850962011-12-24 00:00:32 +0000707
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000708 msg_pdbg2("--- North/MCH/PROC (%d entries) ---\n", max_count);
709 for (i = 0; i < max_count; i++)
Stefan Taunerb3850962011-12-24 00:00:32 +0000710 msg_pdbg2("STRP%-2d = 0x%08x\n", i, desc->north.STRPs[i]);
711 msg_pdbg2("\n");
712
Nico Huberd7c75522017-03-29 16:31:49 +0200713 max_count = min(ARRAY_SIZE(desc->south.STRPs), desc->content.ISL);
714 if (max_count < desc->content.ISL) {
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000715 msg_pdbg2("ISL (%u) is greater than the current maximum of %u entries.\n",
716 desc->content.ISL, max_count);
717 msg_pdbg2("Only the first %u entries will be printed.\n", max_count);
Nico Huberd7c75522017-03-29 16:31:49 +0200718 }
Stefan Taunerb3850962011-12-24 00:00:32 +0000719
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000720 msg_pdbg2("--- South/ICH/PCH (%d entries) ---\n", max_count);
721 for (i = 0; i < max_count; i++)
Stefan Taunerb3850962011-12-24 00:00:32 +0000722 msg_pdbg2("STRP%-2d = 0x%08x\n", i, desc->south.STRPs[i]);
723 msg_pdbg2("\n");
724
725 switch (cs) {
726 case CHIPSET_ICH8:
727 if (sizeof(desc->north.ich8) / 4 != desc->content.MSL)
728 msg_pdbg2("Detailed North/MCH/PROC information is "
729 "probably not reliable, printing anyway.\n");
730 if (sizeof(desc->south.ich8) / 4 != desc->content.ISL)
731 msg_pdbg2("Detailed South/ICH/PCH information is "
732 "probably not reliable, printing anyway.\n");
733 prettyprint_ich_descriptor_straps_ich8(desc);
734 break;
735 case CHIPSET_5_SERIES_IBEX_PEAK:
736 /* PCH straps only. PROCSTRPs are unknown. */
737 if (sizeof(desc->south.ibex) / 4 != desc->content.ISL)
738 msg_pdbg2("Detailed South/ICH/PCH information is "
739 "probably not reliable, printing anyway.\n");
740 prettyprint_ich_descriptor_straps_ibex(&desc->south);
741 break;
742 case CHIPSET_6_SERIES_COUGAR_POINT:
743 /* PCH straps only. PROCSTRP0 is "reserved". */
744 if (sizeof(desc->south.cougar) / 4 != desc->content.ISL)
745 msg_pdbg2("Detailed South/ICH/PCH information is "
746 "probably not reliable, printing anyway.\n");
747 prettyprint_ich_descriptor_straps_cougar(&desc->south);
748 break;
749 case CHIPSET_ICH_UNKNOWN:
750 break;
751 default:
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000752 msg_pdbg2("The meaning of the descriptor straps are unknown yet.\n\n");
Stefan Taunerb3850962011-12-24 00:00:32 +0000753 break;
754 }
755}
756
757void prettyprint_rdid(uint32_t reg_val)
758{
759 uint8_t mid = reg_val & 0xFF;
760 uint16_t did = ((reg_val >> 16) & 0xFF) | (reg_val & 0xFF00);
761 msg_pdbg2("Manufacturer ID 0x%02x, Device ID 0x%04x\n", mid, did);
762}
763
764void prettyprint_ich_descriptor_upper_map(const struct ich_desc_upper_map *umap)
765{
766 int i;
767 msg_pdbg2("=== Upper Map Section ===\n");
768 msg_pdbg2("FLUMAP1 0x%08x\n", umap->FLUMAP1);
769 msg_pdbg2("\n");
770
771 msg_pdbg2("--- Details ---\n");
772 msg_pdbg2("VTL (length in DWORDS) = %d\n", umap->VTL);
773 msg_pdbg2("VTBA (base address) = 0x%6.6x\n", getVTBA(umap));
774 msg_pdbg2("\n");
775
776 msg_pdbg2("VSCC Table: %d entries\n", umap->VTL/2);
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000777 for (i = 0; i < umap->VTL/2; i++) {
Stefan Taunerb3850962011-12-24 00:00:32 +0000778 uint32_t jid = umap->vscc_table[i].JID;
779 uint32_t vscc = umap->vscc_table[i].VSCC;
780 msg_pdbg2(" JID%d = 0x%08x\n", i, jid);
781 msg_pdbg2(" VSCC%d = 0x%08x\n", i, vscc);
782 msg_pdbg2(" "); /* indention */
783 prettyprint_rdid(jid);
784 msg_pdbg2(" "); /* indention */
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000785 prettyprint_ich_reg_vscc(vscc, 0, false);
Stefan Taunerb3850962011-12-24 00:00:32 +0000786 }
787 msg_pdbg2("\n");
788}
789
Nico Huber1dc3d422017-06-17 00:09:31 +0200790/*
791 * Guesses a minimum chipset version based on the maximum number of
792 * soft straps per generation.
793 */
794static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_content *const content)
795{
796 if (content->ICCRIBA == 0x00) {
797 if (content->MSL == 0 && content->ISL <= 2)
798 return CHIPSET_ICH8;
799 else if (content->ISL <= 2)
800 return CHIPSET_ICH9;
801 else if (content->ISL <= 10)
802 return CHIPSET_ICH10;
803 else if (content->ISL <= 16)
804 return CHIPSET_5_SERIES_IBEX_PEAK;
805 msg_pwarn("Peculiar firmware descriptor, assuming Ibex Peak compatibility.\n");
806 return CHIPSET_5_SERIES_IBEX_PEAK;
807 } else if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) {
808 if (content->MSL == 0 && content->ISL <= 17)
809 return CHIPSET_BAYTRAIL;
810 else if (content->MSL <= 1 && content->ISL <= 18)
811 return CHIPSET_6_SERIES_COUGAR_POINT;
812 else if (content->MSL <= 1 && content->ISL <= 21)
813 return CHIPSET_8_SERIES_LYNX_POINT;
814 msg_pwarn("Peculiar firmware descriptor, assuming Wildcat Point compatibility.\n");
815 return CHIPSET_9_SERIES_WILDCAT_POINT;
816 } else {
817 return CHIPSET_100_SERIES_SUNRISE_POINT;
818 }
819}
820
821/*
822 * As an additional measure, we check the read frequency like `ifdtool`.
823 * The frequency value 6 (17MHz) was reserved before Skylake and is the
824 * only valid value since. Skylake is currently the most important dis-
825 * tinction because of the dropped number of regions field (NR).
826 */
Nico Huberfa622942017-03-24 17:25:37 +0100827static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const content,
828 const struct ich_desc_component *const component)
Nico Huber1dc3d422017-06-17 00:09:31 +0200829{
830 const enum ich_chipset guess = guess_ich_chipset_from_content(content);
831
832 if (component->modes.freq_read == 6) {
833 if (guess != CHIPSET_100_SERIES_SUNRISE_POINT)
834 msg_pwarn("\nThe firmware descriptor has the read frequency set to 17MHz. However,\n"
835 "it doesn't look like a Skylake/Sunrise Point compatible descriptor.\n"
836 "Please report this message, the output of `ich_descriptors_tool` for\n"
837 "your descriptor and the output of `lspci -nn` to flashrom@flashrom.org\n\n");
838 return CHIPSET_100_SERIES_SUNRISE_POINT;
839 } else {
840 if (guess == CHIPSET_100_SERIES_SUNRISE_POINT) {
841 msg_pwarn("\nThe firmware descriptor looks like a Skylake/Sunrise Point descriptor.\n"
842 "However, the read frequency isn't set to 17MHz (the only valid value).\n"
843 "Please report this message, the output of `ich_descriptors_tool` for\n"
844 "your descriptor and the output of `lspci -nn` to flashrom@flashrom.org\n\n");
845 return CHIPSET_9_SERIES_WILDCAT_POINT;
846 }
847 }
848
849 return guess;
850}
851
Stefan Taunerb3850962011-12-24 00:00:32 +0000852/* len is the length of dump in bytes */
Nico Huberfa622942017-03-24 17:25:37 +0100853int read_ich_descriptors_from_dump(const uint32_t *const dump, const size_t len,
854 enum ich_chipset *const cs, struct ich_descriptors *const desc)
Stefan Taunerb3850962011-12-24 00:00:32 +0000855{
Nico Huberfa622942017-03-24 17:25:37 +0100856 size_t i, max_count;
Stefan Taunerb3850962011-12-24 00:00:32 +0000857 uint8_t pch_bug_offset = 0;
858
859 if (dump == NULL || desc == NULL)
860 return ICH_RET_PARAM;
861
862 if (dump[0] != DESCRIPTOR_MODE_SIGNATURE) {
863 if (dump[4] == DESCRIPTOR_MODE_SIGNATURE)
864 pch_bug_offset = 4;
865 else
866 return ICH_RET_ERR;
867 }
868
869 /* map */
Nico Huber9e14aed2017-03-28 17:08:46 +0200870 if (len < (4 + pch_bug_offset) * 4)
Stefan Taunerb3850962011-12-24 00:00:32 +0000871 return ICH_RET_OOB;
872 desc->content.FLVALSIG = dump[0 + pch_bug_offset];
873 desc->content.FLMAP0 = dump[1 + pch_bug_offset];
874 desc->content.FLMAP1 = dump[2 + pch_bug_offset];
875 desc->content.FLMAP2 = dump[3 + pch_bug_offset];
876
877 /* component */
Nico Huber9e14aed2017-03-28 17:08:46 +0200878 if (len < getFCBA(&desc->content) + 3 * 4)
Stefan Taunerb3850962011-12-24 00:00:32 +0000879 return ICH_RET_OOB;
880 desc->component.FLCOMP = dump[(getFCBA(&desc->content) >> 2) + 0];
881 desc->component.FLILL = dump[(getFCBA(&desc->content) >> 2) + 1];
882 desc->component.FLPB = dump[(getFCBA(&desc->content) >> 2) + 2];
883
Nico Huberfa622942017-03-24 17:25:37 +0100884 if (*cs == CHIPSET_ICH_UNKNOWN)
885 *cs = guess_ich_chipset(&desc->content, &desc->component);
886
Stefan Taunerb3850962011-12-24 00:00:32 +0000887 /* region */
Nico Huberfa622942017-03-24 17:25:37 +0100888 const ssize_t nr = ich_number_of_regions(*cs, &desc->content);
889 if (nr < 0 || len < getFRBA(&desc->content) + nr * 4)
Stefan Taunerb3850962011-12-24 00:00:32 +0000890 return ICH_RET_OOB;
Nico Huberfa622942017-03-24 17:25:37 +0100891 for (i = 0; i < nr; i++)
892 desc->region.FLREGs[i] = dump[(getFRBA(&desc->content) >> 2) + i];
Stefan Taunerb3850962011-12-24 00:00:32 +0000893
894 /* master */
Nico Huberfa622942017-03-24 17:25:37 +0100895 const ssize_t nm = ich_number_of_masters(*cs, &desc->content);
896 if (nm < 0 || len < getFMBA(&desc->content) + nm * 4)
Stefan Taunerb3850962011-12-24 00:00:32 +0000897 return ICH_RET_OOB;
Nico Huberfa622942017-03-24 17:25:37 +0100898 for (i = 0; i < nm; i++)
899 desc->master.FLMSTRs[i] = dump[(getFMBA(&desc->content) >> 2) + i];
Stefan Taunerb3850962011-12-24 00:00:32 +0000900
901 /* upper map */
902 desc->upper.FLUMAP1 = dump[(UPPER_MAP_OFFSET >> 2) + 0];
903
904 /* VTL is 8 bits long. Quote from the Ibex Peak SPI programming guide:
905 * "Identifies the 1s based number of DWORDS contained in the VSCC
906 * Table. Each SPI component entry in the table is 2 DWORDS long." So
907 * the maximum of 255 gives us 127.5 SPI components(!?) 8 bytes each. A
908 * check ensures that the maximum offset actually accessed is available.
909 */
Nico Huber9e14aed2017-03-28 17:08:46 +0200910 if (len < getVTBA(&desc->upper) + (desc->upper.VTL / 2 * 8))
Stefan Taunerb3850962011-12-24 00:00:32 +0000911 return ICH_RET_OOB;
912
913 for (i = 0; i < desc->upper.VTL/2; i++) {
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000914 desc->upper.vscc_table[i].JID = dump[(getVTBA(&desc->upper) >> 2) + i * 2 + 0];
915 desc->upper.vscc_table[i].VSCC = dump[(getVTBA(&desc->upper) >> 2) + i * 2 + 1];
Stefan Taunerb3850962011-12-24 00:00:32 +0000916 }
917
918 /* MCH/PROC (aka. North) straps */
919 if (len < getFMSBA(&desc->content) + desc->content.MSL * 4)
920 return ICH_RET_OOB;
921
922 /* limit the range to be written */
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000923 max_count = min(sizeof(desc->north.STRPs) / 4, desc->content.MSL);
924 for (i = 0; i < max_count; i++)
925 desc->north.STRPs[i] = dump[(getFMSBA(&desc->content) >> 2) + i];
Stefan Taunerb3850962011-12-24 00:00:32 +0000926
927 /* ICH/PCH (aka. South) straps */
928 if (len < getFISBA(&desc->content) + desc->content.ISL * 4)
929 return ICH_RET_OOB;
930
931 /* limit the range to be written */
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000932 max_count = min(sizeof(desc->south.STRPs) / 4, desc->content.ISL);
933 for (i = 0; i < max_count; i++)
934 desc->south.STRPs[i] = dump[(getFISBA(&desc->content) >> 2) + i];
Stefan Taunerb3850962011-12-24 00:00:32 +0000935
936 return ICH_RET_OK;
937}
938
Nico Huberad186312016-05-02 15:15:29 +0200939#ifndef ICH_DESCRIPTORS_FROM_DUMP_ONLY
Stefan Taunerb3850962011-12-24 00:00:32 +0000940
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000941/** Returns the integer representation of the component density with index
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000942\em idx in bytes or -1 if the correct size can not be determined. */
943int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors *desc, uint8_t idx)
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000944{
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000945 if (idx > 1) {
Stefan Taunera1a14ec2012-08-13 08:45:13 +0000946 msg_perr("Only ICH SPI component index 0 or 1 are supported yet.\n");
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000947 return -1;
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000948 }
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000949
950 if (desc->content.NC == 0 && idx > 0)
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000951 return 0;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000952
953 uint8_t size_enc;
954 uint8_t size_max;
955
956 switch (cs) {
957 case CHIPSET_ICH8:
958 case CHIPSET_ICH9:
959 case CHIPSET_ICH10:
960 case CHIPSET_5_SERIES_IBEX_PEAK:
961 case CHIPSET_6_SERIES_COUGAR_POINT:
962 case CHIPSET_7_SERIES_PANTHER_POINT:
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000963 case CHIPSET_BAYTRAIL:
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000964 if (idx == 0) {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000965 size_enc = desc->component.dens_old.comp1_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000966 } else {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000967 size_enc = desc->component.dens_old.comp2_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000968 }
969 size_max = 5;
970 break;
971 case CHIPSET_8_SERIES_LYNX_POINT:
972 case CHIPSET_8_SERIES_LYNX_POINT_LP:
973 case CHIPSET_8_SERIES_WELLSBURG:
Duncan Laurie823096e2014-08-20 15:39:38 +0000974 case CHIPSET_9_SERIES_WILDCAT_POINT:
Nico Huber51205912017-03-17 17:59:54 +0100975 case CHIPSET_9_SERIES_WILDCAT_POINT_LP:
Nico Huberd54e4f42017-03-23 23:45:47 +0100976 case CHIPSET_100_SERIES_SUNRISE_POINT:
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000977 if (idx == 0) {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000978 size_enc = desc->component.dens_new.comp1_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000979 } else {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000980 size_enc = desc->component.dens_new.comp2_density;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000981 }
982 size_max = 7;
983 break;
984 case CHIPSET_ICH_UNKNOWN:
985 default:
986 msg_pwarn("Density encoding is unknown on this chipset.\n");
987 return -1;
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000988 }
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000989
990 if (size_enc > size_max) {
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000991 msg_perr("Density of ICH SPI component with index %d is invalid.\n"
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000992 "Encoded density is 0x%x while maximum allowed is 0x%x.\n",
993 idx, size_enc, size_max);
994 return -1;
995 }
996
Stefan Taunerd0c5dc22011-10-20 12:57:14 +0000997 return (1 << (19 + size_enc));
998}
999
Nico Huber8d494992017-06-19 12:18:33 +02001000/* Only used by ichspi.c */
1001#if CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__))
Nico Huberd54e4f42017-03-23 23:45:47 +01001002static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16_t offset, void *spibar)
Stefan Tauner1e146392011-09-15 23:52:55 +00001003{
1004 uint32_t control = 0;
1005 control |= (section << FDOC_FDSS_OFF) & FDOC_FDSS;
1006 control |= (offset << FDOC_FDSI_OFF) & FDOC_FDSI;
Nico Huberd54e4f42017-03-23 23:45:47 +01001007 if (cs == CHIPSET_100_SERIES_SUNRISE_POINT) {
1008 mmio_le_writel(control, spibar + PCH100_REG_FDOC);
1009 return mmio_le_readl(spibar + PCH100_REG_FDOD);
1010 } else {
1011 mmio_le_writel(control, spibar + ICH9_REG_FDOC);
1012 return mmio_le_readl(spibar + ICH9_REG_FDOD);
1013 }
1014
Stefan Tauner1e146392011-09-15 23:52:55 +00001015}
1016
Nico Huberd54e4f42017-03-23 23:45:47 +01001017int read_ich_descriptors_via_fdo(enum ich_chipset cs, void *spibar, struct ich_descriptors *desc)
Stefan Tauner1e146392011-09-15 23:52:55 +00001018{
Nico Huberfa622942017-03-24 17:25:37 +01001019 size_t i;
Stefan Tauner1e146392011-09-15 23:52:55 +00001020 struct ich_desc_region *r = &desc->region;
1021
1022 /* Test if bit-fields are working as expected.
1023 * FIXME: Replace this with dynamic bitfield fixup
1024 */
1025 for (i = 0; i < 4; i++)
1026 desc->region.FLREGs[i] = 0x5A << (i * 8);
Nico Huberfa622942017-03-24 17:25:37 +01001027 if (r->old_reg[0].base != 0x005A || r->old_reg[0].limit != 0x0000 ||
1028 r->old_reg[1].base != 0x1A00 || r->old_reg[1].limit != 0x0000 ||
1029 r->old_reg[2].base != 0x0000 || r->old_reg[2].limit != 0x005A ||
1030 r->old_reg[3].base != 0x0000 || r->old_reg[3].limit != 0x1A00) {
Stefan Tauner1e146392011-09-15 23:52:55 +00001031 msg_pdbg("The combination of compiler and CPU architecture used"
1032 "does not lay out bit-fields as expected, sorry.\n");
Nico Huberfa622942017-03-24 17:25:37 +01001033 msg_pspew("r->old_reg[0].base = 0x%04X (0x005A)\n", r->old_reg[0].base);
1034 msg_pspew("r->old_reg[0].limit = 0x%04X (0x0000)\n", r->old_reg[0].limit);
1035 msg_pspew("r->old_reg[1].base = 0x%04X (0x1A00)\n", r->old_reg[1].base);
1036 msg_pspew("r->old_reg[1].limit = 0x%04X (0x0000)\n", r->old_reg[1].limit);
1037 msg_pspew("r->old_reg[2].base = 0x%04X (0x0000)\n", r->old_reg[2].base);
1038 msg_pspew("r->old_reg[2].limit = 0x%04X (0x005A)\n", r->old_reg[2].limit);
1039 msg_pspew("r->old_reg[3].base = 0x%04X (0x0000)\n", r->old_reg[3].base);
1040 msg_pspew("r->old_reg[3].limit = 0x%04X (0x1A00)\n", r->old_reg[3].limit);
Stefan Tauner1e146392011-09-15 23:52:55 +00001041 return ICH_RET_ERR;
1042 }
1043
Stefan Taunera1a14ec2012-08-13 08:45:13 +00001044 msg_pdbg2("Reading flash descriptors mapped by the chipset via FDOC/FDOD...");
Stefan Tauner1e146392011-09-15 23:52:55 +00001045 /* content section */
Nico Huberd54e4f42017-03-23 23:45:47 +01001046 desc->content.FLVALSIG = read_descriptor_reg(cs, 0, 0, spibar);
1047 desc->content.FLMAP0 = read_descriptor_reg(cs, 0, 1, spibar);
1048 desc->content.FLMAP1 = read_descriptor_reg(cs, 0, 2, spibar);
1049 desc->content.FLMAP2 = read_descriptor_reg(cs, 0, 3, spibar);
Stefan Tauner1e146392011-09-15 23:52:55 +00001050
1051 /* component section */
Nico Huberd54e4f42017-03-23 23:45:47 +01001052 desc->component.FLCOMP = read_descriptor_reg(cs, 1, 0, spibar);
1053 desc->component.FLILL = read_descriptor_reg(cs, 1, 1, spibar);
1054 desc->component.FLPB = read_descriptor_reg(cs, 1, 2, spibar);
Stefan Tauner1e146392011-09-15 23:52:55 +00001055
1056 /* region section */
Nico Huberfa622942017-03-24 17:25:37 +01001057 const ssize_t nr = ich_number_of_regions(cs, &desc->content);
1058 if (nr < 0) {
Stefan Tauner1e146392011-09-15 23:52:55 +00001059 msg_pdbg2("%s: number of regions too high (%d) - failed\n",
Nico Huberfa622942017-03-24 17:25:37 +01001060 __func__, desc->content.NR + 1);
Stefan Tauner1e146392011-09-15 23:52:55 +00001061 return ICH_RET_ERR;
1062 }
Nico Huberfa622942017-03-24 17:25:37 +01001063 for (i = 0; i < nr; i++)
Nico Huberd54e4f42017-03-23 23:45:47 +01001064 desc->region.FLREGs[i] = read_descriptor_reg(cs, 2, i, spibar);
Stefan Tauner1e146392011-09-15 23:52:55 +00001065
1066 /* master section */
Nico Huberfa622942017-03-24 17:25:37 +01001067 const ssize_t nm = ich_number_of_masters(cs, &desc->content);
1068 if (nm < 0) {
1069 msg_pdbg2("%s: number of masters too high (%d) - failed\n",
1070 __func__, desc->content.NM + 1);
1071 return ICH_RET_ERR;
1072 }
1073 for (i = 0; i < nm; i++)
1074 desc->master.FLMSTRs[i] = read_descriptor_reg(cs, 3, i, spibar);
Stefan Tauner1e146392011-09-15 23:52:55 +00001075
1076 /* Accessing the strap section via FDOC/D is only possible on ICH8 and
1077 * reading the upper map is impossible on all chipsets, so don't bother.
1078 */
1079
1080 msg_pdbg2(" done.\n");
1081 return ICH_RET_OK;
1082}
Nico Huber8d494992017-06-19 12:18:33 +02001083#endif
Nico Huber305f4172013-06-14 11:55:26 +02001084
1085/**
1086 * @brief Read a layout from the dump of an Intel ICH descriptor.
1087 *
1088 * @param layout Pointer where to store the layout.
1089 * @param dump The descriptor dump to read from.
1090 * @param len The length of the descriptor dump.
1091 *
1092 * @return 0 on success,
1093 * 1 if the descriptor couldn't be parsed.
1094 */
1095int layout_from_ich_descriptors(struct ich_layout *const layout, const void *const dump, const size_t len)
1096{
Nico Huberfa622942017-03-24 17:25:37 +01001097 static const char *const regions[] = {
1098 "fd", "bios", "me", "gbe", "pd", "reg5", "reg6", "reg7", "ec", "reg9"
1099 };
Nico Huber305f4172013-06-14 11:55:26 +02001100
1101 struct ich_descriptors desc;
Nico Huberfa622942017-03-24 17:25:37 +01001102 enum ich_chipset cs = CHIPSET_ICH_UNKNOWN;
1103 if (read_ich_descriptors_from_dump(dump, len, &cs, &desc))
Nico Huber305f4172013-06-14 11:55:26 +02001104 return 1;
1105
1106 memset(layout, 0x00, sizeof(*layout));
1107
Nico Huberfa622942017-03-24 17:25:37 +01001108 ssize_t i, j;
1109 for (i = 0, j = 0; i < min(ich_number_of_regions(cs, &desc.content), ARRAY_SIZE(regions)); ++i) {
Nico Huber305f4172013-06-14 11:55:26 +02001110 const chipoff_t base = ICH_FREG_BASE(desc.region.FLREGs[i]);
Nico Huber0bb3f712017-03-29 16:44:33 +02001111 const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]);
Nico Huber305f4172013-06-14 11:55:26 +02001112 if (limit <= base)
1113 continue;
1114 layout->entries[j].start = base;
1115 layout->entries[j].end = limit;
1116 layout->entries[j].included = false;
1117 snprintf(layout->entries[j].name, sizeof(layout->entries[j].name), "%s", regions[i]);
1118 ++j;
1119 }
1120 layout->base.entries = layout->entries;
1121 layout->base.num_entries = j;
1122 return 0;
1123}
1124
Nico Huberad186312016-05-02 15:15:29 +02001125#endif /* ICH_DESCRIPTORS_FROM_DUMP_ONLY */