blob: a068571d28449f49f4483378a79bb5b1bb0f9b13 [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.
Stefan Tauner1e146392011-09-15 23:52:55 +000016 */
17
Stefan Tauner1e146392011-09-15 23:52:55 +000018#ifndef __ICH_DESCRIPTORS_H__
19#define __ICH_DESCRIPTORS_H__ 1
20
Nico Huber4d440a72017-08-15 11:26:48 +020021#include <sys/types.h>
Stefan Tauner1e146392011-09-15 23:52:55 +000022#include <stdint.h>
Edward O'Callaghan927c1f02022-08-02 11:31:16 +100023#include <stdbool.h>
Stefan Taunera8d838d2011-11-06 23:51:09 +000024#include "programmer.h" /* for enum ich_chipset */
Stefan Tauner1e146392011-09-15 23:52:55 +000025
26/* FIXME: Replace with generic return codes */
27#define ICH_RET_OK 0
28#define ICH_RET_ERR -1
29#define ICH_RET_WARN -2
30#define ICH_RET_PARAM -3
31#define ICH_RET_OOB -4
32
33#define ICH9_REG_FDOC 0xB0 /* 32 Bits Flash Descriptor Observability Control */
Nico Huberd54e4f42017-03-23 23:45:47 +010034#define PCH100_REG_FDOC 0xB4 /* New offset from Sunrise Point on */
Stefan Tauner1e146392011-09-15 23:52:55 +000035 /* 0-1: reserved */
36#define FDOC_FDSI_OFF 2 /* 2-11: Flash Descriptor Section Index */
37#define FDOC_FDSI (0x3f << FDOC_FDSI_OFF)
38#define FDOC_FDSS_OFF 12 /* 12-14: Flash Descriptor Section Select */
39#define FDOC_FDSS (0x3 << FDOC_FDSS_OFF)
40 /* 15-31: reserved */
41
42#define ICH9_REG_FDOD 0xB4 /* 32 Bits Flash Descriptor Observability Data */
Nico Huberd54e4f42017-03-23 23:45:47 +010043#define PCH100_REG_FDOD 0xB8 /* New offset from Sunrise Point on */
Stefan Tauner1e146392011-09-15 23:52:55 +000044
45/* Field locations and semantics for LVSCC, UVSCC and related words in the flash
46 * descriptor are equal therefore they all share the same macros below. */
47#define VSCC_BES_OFF 0 /* 0-1: Block/Sector Erase Size */
48#define VSCC_BES (0x3 << VSCC_BES_OFF)
49#define VSCC_WG_OFF 2 /* 2: Write Granularity */
50#define VSCC_WG (0x1 << VSCC_WG_OFF)
51#define VSCC_WSR_OFF 3 /* 3: Write Status Required */
52#define VSCC_WSR (0x1 << VSCC_WSR_OFF)
53#define VSCC_WEWS_OFF 4 /* 4: Write Enable on Write Status */
54#define VSCC_WEWS (0x1 << VSCC_WEWS_OFF)
55 /* 5-7: reserved */
56#define VSCC_EO_OFF 8 /* 8-15: Erase Opcode */
57#define VSCC_EO (0xff << VSCC_EO_OFF)
58 /* 16-22: reserved */
59#define VSCC_VCL_OFF 23 /* 23: Vendor Component Lock */
60#define VSCC_VCL (0x1 << VSCC_VCL_OFF)
61 /* 24-31: reserved */
62
Nico Huberfa622942017-03-24 17:25:37 +010063#define ICH_FREG_BASE(flreg) (((flreg) << 12) & 0x07fff000)
64#define ICH_FREG_LIMIT(flreg) ((((flreg) >> 4) & 0x07fff000) | 0x00000fff)
Stefan Tauner1e146392011-09-15 23:52:55 +000065
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +000066void prettyprint_ich_reg_vscc(uint32_t reg_val, int verbosity, bool print_vcl);
Stefan Tauner1e146392011-09-15 23:52:55 +000067
68struct ich_desc_content {
69 uint32_t FLVALSIG; /* 0x00 */
70 union { /* 0x04 */
71 uint32_t FLMAP0;
72 struct {
73 uint32_t FCBA :8, /* Flash Component Base Address */
74 NC :2, /* Number Of Components */
75 :6,
76 FRBA :8, /* Flash Region Base Address */
Nico Huberfa622942017-03-24 17:25:37 +010077 NR :3, /* Number Of Regions (reserved from Skylake on) */
Stefan Tauner1e146392011-09-15 23:52:55 +000078 :5;
79 };
80 };
81 union { /* 0x08 */
82 uint32_t FLMAP1;
83 struct {
84 uint32_t FMBA :8, /* Flash Master Base Address */
85 NM :3, /* Number Of Masters */
86 :5,
87 FISBA :8, /* Flash ICH Strap Base Address */
88 ISL :8; /* ICH Strap Length */
89 };
90 };
91 union { /* 0x0c */
92 uint32_t FLMAP2;
93 struct {
Nico Huber1dc3d422017-06-17 00:09:31 +020094 uint32_t FMSBA :8, /* Flash (G)MCH Strap Base Addr. */
95 MSL :8, /* MCH Strap Length */
96 ICCRIBA :8, /* ICC Reg. Init Base Addr. (new since Sandy Bridge) */
97 RIL :8; /* Register Init Length (new since Hawell) */
Stefan Tauner1e146392011-09-15 23:52:55 +000098 };
Michał Żygowski5c9f5422021-06-16 15:13:54 +020099 struct { /* new since Tiger Point */
100 uint32_t :2,
101 CSSO :10, /* CPU Soft Strap Offset from PMC Base */
102 :4,
103 CSSL :8, /* CPU Soft Strap Length */
104 :8;
105 };
Stefan Tauner1e146392011-09-15 23:52:55 +0000106 };
107};
108
109struct ich_desc_component {
110 union { /* 0x00 */
111 uint32_t FLCOMP; /* Flash Components Register */
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000112 /* FLCOMP encoding on various generations:
113 *
114 * Chipset/Generation max_speed dual_output density
Elyes HAOUASac01baa2018-05-28 16:52:21 +0200115 * [MHz] bits max. bits
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000116 * ICH8: 33 N/A 5 0:2, 3:5
117 * ICH9: 33 N/A 5 0:2, 3:5
118 * ICH10: 33 N/A 5 0:2, 3:5
119 * Ibex Peak/5: 50 N/A 5 0:2, 3:5
120 * Cougar Point/6: 50 30 5 0:2, 3:5
121 * Patsburg: 50 30 5 0:2, 3:5
122 * Panther Point/7 50 30 5 0:2, 3:5
123 * Lynx Point/8: 50 30 7 0:3, 4:7
Nico Huberfa622942017-03-24 17:25:37 +0100124 * Wildcat Point/9: 50 30 (multi I/O) 7 0:3, 4:7
125 * Sunrise Point/100: 48 30 7 0:3, 4:7
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000126 */
Stefan Tauner1e146392011-09-15 23:52:55 +0000127 struct {
Nico Huber9c6b35f2026-02-08 18:19:00 +0100128 uint32_t :9,
129 volt_sel :1,
130 :7,
Stefan Tauner1e146392011-09-15 23:52:55 +0000131 freq_read :3,
132 fastread :1,
133 freq_fastread :3,
134 freq_write :3,
135 freq_read_id :3,
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000136 dual_output :1, /* new since Cougar Point/6 */
137 :1;
138 } modes;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000139 struct {
140 uint32_t comp1_density :3,
141 comp2_density :3,
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000142 :26;
143 } dens_old;
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000144 struct {
145 uint32_t comp1_density :4, /* new since Lynx Point/8 */
146 comp2_density :4,
Tai-Hong Wu60dead42015-01-05 23:00:14 +0000147 :24;
148 } dens_new;
Stefan Tauner1e146392011-09-15 23:52:55 +0000149 };
150 union { /* 0x04 */
151 uint32_t FLILL; /* Flash Invalid Instructions Register */
152 struct {
153 uint32_t invalid_instr0 :8,
154 invalid_instr1 :8,
155 invalid_instr2 :8,
156 invalid_instr3 :8;
157 };
158 };
159 union { /* 0x08 */
Nico Huberfa622942017-03-24 17:25:37 +0100160 uint32_t FLPB; /* Flash Partition Boundary Register, until Panther Point/7 */
Stefan Tauner1e146392011-09-15 23:52:55 +0000161 struct {
162 uint32_t FPBA :13, /* Flash Partition Boundary Addr */
163 :19;
164 };
Nico Huberfa622942017-03-24 17:25:37 +0100165 uint32_t FLILL1; /* Flash Invalid Instructions Register, new since Sunrise Point/100 */
Stefan Tauner1e146392011-09-15 23:52:55 +0000166 struct {
Nico Huberfa622942017-03-24 17:25:37 +0100167 uint32_t invalid_instr4 :8,
168 invalid_instr5 :8,
169 invalid_instr6 :8,
170 invalid_instr7 :8;
Stefan Tauner1e146392011-09-15 23:52:55 +0000171 };
172 };
173};
174
David Hendricks8e762302017-08-09 22:21:31 -0700175#define MAX_NUM_FLREGS 16
Nico Huberfa622942017-03-24 17:25:37 +0100176struct ich_desc_region {
177 /*
178 * Number of entries and width differ on various generations:
179 *
180 * Chipset/Generation #FLREGs width (bits)
181 * ICH8 .. Panther Point/7 5 13
182 * Lynx Point/8 .. Wildcat Point/9 7 15
Nico Huber2a5dfaf2019-07-04 16:01:51 +0200183 * Sunrise Point/100 .. 200 Series 10 15
David Hendricks8e762302017-08-09 22:21:31 -0700184 * Lewisburg/100 .. 16 15
Nico Huber2a5dfaf2019-07-04 16:01:51 +0200185 * Cannon Point/300 .. 16 15
Nico Huberfa622942017-03-24 17:25:37 +0100186 */
187 union {
188 uint32_t FLREGs[MAX_NUM_FLREGS]; /* Flash Descriptor Regions */
189
190 /* only used for bit-field check */
191 struct {
192 uint32_t base :13,
193 :3,
194 limit :13,
195 :3;
196 } old_reg[MAX_NUM_FLREGS];
197 };
198};
199
David Hendricks8e762302017-08-09 22:21:31 -0700200#define MAX_NUM_MASTERS 6 /* 5 prior to C620/Lewisburg PCH */
Stefan Tauner1e146392011-09-15 23:52:55 +0000201struct ich_desc_master {
202 union {
Nico Huberfa622942017-03-24 17:25:37 +0100203 uint32_t FLMSTRs[MAX_NUM_MASTERS]; /* Flash Masters */
204 /* For pre-Skylake platforms */
Stefan Tauner1e146392011-09-15 23:52:55 +0000205 struct {
206 uint32_t BIOS_req_ID :16,
207 BIOS_descr_r :1,
208 BIOS_BIOS_r :1,
209 BIOS_ME_r :1,
210 BIOS_GbE_r :1,
211 BIOS_plat_r :1,
212 :3,
213 BIOS_descr_w :1,
214 BIOS_BIOS_w :1,
215 BIOS_ME_w :1,
216 BIOS_GbE_w :1,
217 BIOS_plat_w :1,
218 :3;
Stefan Tauner1e146392011-09-15 23:52:55 +0000219 uint32_t ME_req_ID :16,
220 ME_descr_r :1,
221 ME_BIOS_r :1,
222 ME_ME_r :1,
223 ME_GbE_r :1,
224 ME_plat_r :1,
225 :3,
226 ME_descr_w :1,
227 ME_BIOS_w :1,
228 ME_ME_w :1,
229 ME_GbE_w :1,
230 ME_plat_w :1,
231 :3;
Stefan Tauner1e146392011-09-15 23:52:55 +0000232 uint32_t GbE_req_ID :16,
233 GbE_descr_r :1,
234 GbE_BIOS_r :1,
235 GbE_ME_r :1,
236 GbE_GbE_r :1,
237 GbE_plat_r :1,
238 :3,
239 GbE_descr_w :1,
240 GbE_BIOS_w :1,
241 GbE_ME_w :1,
242 GbE_GbE_w :1,
243 GbE_plat_w :1,
244 :3;
245 };
Nico Huberfa622942017-03-24 17:25:37 +0100246 /* From Skylake on */
Nico Huberb3cc2c62024-07-15 00:45:17 +0200247 struct ich_desc_master_region_access {
Nico Huber2a5dfaf2019-07-04 16:01:51 +0200248 uint32_t ext_read :4,
249 ext_write :4,
250 read :12,
251 write :12;
Nico Huberfa622942017-03-24 17:25:37 +0100252 } mstr[MAX_NUM_MASTERS];
Stefan Tauner1e146392011-09-15 23:52:55 +0000253 };
254};
255
Stefan Taunerb3850962011-12-24 00:00:32 +0000256struct ich_desc_north_strap {
257 union {
258 uint32_t STRPs[1]; /* current maximum: ich8 */
259 struct { /* ich8 */
260 struct { /* STRP2 (in the datasheet) */
261 uint32_t MDB :1,
262 :31;
263 };
264 } ich8;
265 };
266};
267
268struct ich_desc_south_strap {
269 union {
Angel Pons4db0fdf2020-07-10 17:04:10 +0200270 uint32_t STRPs[23]; /* current maximum: gemini lake */
Stefan Taunerb3850962011-12-24 00:00:32 +0000271 struct { /* ich8 */
272 struct { /* STRP1 */
273 uint32_t ME_DISABLE :1,
274 :6,
275 TCOMODE :1,
276 ASD :7,
277 BMCMODE :1,
278 :3,
279 GLAN_PCIE_SEL :1,
280 GPIO12_SEL :2,
281 SPICS1_LANPHYPC_SEL :1,
282 MESM2SEL :1,
283 :1,
284 ASD2 :7;
285 };
286 } ich8;
287 struct { /* ibex peak */
288 struct { /* STRP0 */
289 uint32_t :1,
290 cs_ss2 :1,
291 :5,
292 SMB_EN :1,
293 SML0_EN :1,
294 SML1_EN :1,
295 SML1FRQ :2,
296 SMB0FRQ :2,
297 SML0FRQ :2,
298 :4,
299 LANPHYPC_GP12_SEL :1,
300 cs_ss1 :1,
301 :2,
302 DMI_REQID_DIS :1,
303 :4,
304 BBBS :2,
305 :1;
306 };
307 struct { /* STRP1 */
308 uint32_t cs_ss3 :4,
309 :28;
310 };
311 struct { /* STRP2 */
312 uint32_t :8,
313 MESMASDEN :1,
314 MESMASDA :7,
315 :8,
316 MESMI2CEN :1,
317 MESMI2CA :7;
318 };
319 struct { /* STRP3 */
320 uint32_t :32;
321 };
322 struct { /* STRP4 */
323 uint32_t PHYCON :2,
324 :6,
325 GBEMAC_SMBUS_ADDR_EN :1,
326 GBEMAC_SMBUS_ADDR :7,
327 :1,
328 GBEPHY_SMBUS_ADDR :7,
329 :8;
330 };
331 struct { /* STRP5 */
332 uint32_t :32;
333 };
334 struct { /* STRP6 */
335 uint32_t :32;
336 };
337 struct { /* STRP7 */
338 uint32_t MESMA2UDID_VENDOR :16,
339 MESMA2UDID_DEVICE :16;
340 };
341 struct { /* STRP8 */
342 uint32_t :32;
343 };
344 struct { /* STRP9 */
345 uint32_t PCIEPCS1 :2,
346 PCIEPCS2 :2,
347 PCIELR1 :1,
348 PCIELR2 :1,
349 DMILR :1,
350 :1,
351 PHY_PCIEPORTSEL :3,
352 PHY_PCIE_EN :1,
353 :20;
354 };
355 struct { /* STRP10 */
356 uint32_t :1,
357 ME_BOOT_FLASH :1,
358 cs_ss5 :1,
359 VE_EN :1,
360 :4,
361 MMDDE :1,
362 MMADDR :7,
363 cs_ss7 :1,
364 :1,
365 ICC_SEL :3,
366 MER_CL1 :1,
367 :10;
368 };
369 struct { /* STRP11 */
370 uint32_t SML1GPAEN :1,
371 SML1GPA :7,
372 :16,
373 SML1I2CAEN :1,
374 SML1I2CA :7;
375 };
376 struct { /* STRP12 */
377 uint32_t :32;
378 };
379 struct { /* STRP13 */
380 uint32_t :32;
381 };
382 struct { /* STRP14 */
383 uint32_t :8,
384 VE_EN2 :1,
385 :5,
386 VE_BOOT_FLASH :1,
387 :1,
388 BW_SSD :1,
389 NVMHCI_EN :1,
390 :14;
391 };
392 struct { /* STRP15 */
393 uint32_t :3,
394 cs_ss6 :2,
395 :1,
396 IWL_EN :1,
397 :1,
398 t209min :2,
399 :22;
400 };
401 } ibex;
402 struct { /* cougar point */
403 struct { /* STRP0 */
404 uint32_t :1,
405 cs_ss1 :1,
406 :5,
407 SMB_EN :1,
408 SML0_EN :1,
409 SML1_EN :1,
410 SML1FRQ :2,
411 SMB0FRQ :2,
412 SML0FRQ :2,
413 :4,
414 LANPHYPC_GP12_SEL :1,
415 LINKSEC_DIS :1,
416 :2,
417 DMI_REQID_DIS :1,
418 :4,
419 BBBS :2,
420 :1;
421 };
422 struct { /* STRP1 */
423 uint32_t cs_ss3 :4,
424 :4,
425 cs_ss2 :1,
426 :28;
427 };
428 struct { /* STRP2 */
429 uint32_t :8,
430 MESMASDEN :1,
431 MESMASDA :7,
432 MESMMCTPAEN :1,
433 MESMMCTPA :7,
434 MESMI2CEN :1,
435 MESMI2CA :7;
436 };
437 struct { /* STRP3 */
438 uint32_t :32;
439 };
440 struct { /* STRP4 */
441 uint32_t PHYCON :2,
442 :6,
443 GBEMAC_SMBUS_ADDR_EN :1,
444 GBEMAC_SMBUS_ADDR :7,
445 :1,
446 GBEPHY_SMBUS_ADDR :7,
447 :8;
448 };
449 struct { /* STRP5 */
450 uint32_t :32;
451 };
452 struct { /* STRP6 */
453 uint32_t :32;
454 };
455 struct { /* STRP7 */
456 uint32_t MESMA2UDID_VENDOR :16,
457 MESMA2UDID_DEVICE :16;
458 };
459 struct { /* STRP8 */
460 uint32_t :32;
461 };
462 struct { /* STRP9 */
463 uint32_t PCIEPCS1 :2,
464 PCIEPCS2 :2,
465 PCIELR1 :1,
466 PCIELR2 :1,
467 DMILR :1,
468 cs_ss4 :1,
469 PHY_PCIEPORTSEL :3,
470 PHY_PCIE_EN :1,
471 :2,
472 SUB_DECODE_EN :1,
473 :7,
474 PCHHOT_SML1ALERT_SEL :1,
475 :9;
476 };
477 struct { /* STRP10 */
478 uint32_t :1,
479 ME_BOOT_FLASH :1,
480 :6,
481 MDSMBE_EN :1,
482 MDSMBE_ADD :7,
483 :2,
484 ICC_SEL :3,
485 MER_CL1 :1,
486 ICC_PRO_SEL :1,
487 Deep_SX_EN :1,
488 ME_DBG_LAN :1,
489 :7;
490 };
491 struct { /* STRP11 */
492 uint32_t SML1GPAEN :1,
493 SML1GPA :7,
494 :16,
495 SML1I2CAEN :1,
496 SML1I2CA :7;
497 };
498 struct { /* STRP12 */
499 uint32_t :32;
500 };
501 struct { /* STRP13 */
502 uint32_t :32;
503 };
504 struct { /* STRP14 */
505 uint32_t :32;
506 };
507 struct { /* STRP15 */
508 uint32_t cs_ss6 :6,
509 IWL_EN :1,
510 cs_ss5 :2,
511 :4,
512 SMLINK1_THERM_SEL :1,
513 SLP_LAN_GP29_SEL :1,
514 :16;
515 };
516 struct { /* STRP16 */
517 uint32_t :32;
518 };
519 struct { /* STRP17 */
520 uint32_t ICML :1,
521 cs_ss7 :1,
522 :30;
523 };
524 } cougar;
525 };
526};
527
528struct ich_desc_upper_map {
529 union {
530 uint32_t FLUMAP1; /* Flash Upper Map 1 */
531 struct {
532 uint32_t VTBA :8, /* ME VSCC Table Base Address */
533 VTL :8, /* ME VSCC Table Length */
Nico Huber3ad9aad2021-06-17 22:05:00 +0200534 :8,
535 MDTBA :8; /* MIP Descr. Table Base Addr. (new since Cannon Point/300) */
Stefan Taunerb3850962011-12-24 00:00:32 +0000536 };
537 };
538 struct {
539 union { /* JEDEC-ID Register */
540 uint32_t JID;
541 struct {
542 uint32_t vid :8, /* Vendor ID */
543 cid0 :8, /* Component ID 0 */
544 cid1 :8, /* Component ID 1 */
545 :8;
546 };
547 };
548 union { /* Vendor Specific Component Capabilities */
549 uint32_t VSCC;
550 struct {
551 uint32_t ubes :2, /* Upper Block/Sector Erase Size */
552 uwg :1, /* Upper Write Granularity */
553 uwsr :1, /* Upper Write Status Required */
554 uwews :1, /* Upper Write Enable on Write Status */
555 :3,
556 ueo :8, /* Upper Erase Opcode */
557 lbes :2, /* Lower Block/Sector Erase Size */
558 lwg :1, /* Lower Write Granularity */
559 lwsr :1, /* Lower Write Status Required */
560 lwews :1, /* Lower Write Enable on Write Status */
561 :3,
562 leo :16; /* Lower Erase Opcode */
563 };
564 };
565 } vscc_table[128];
566};
Stefan Taunerb3850962011-12-24 00:00:32 +0000567
Stefan Tauner1e146392011-09-15 23:52:55 +0000568struct ich_descriptors {
569 struct ich_desc_content content;
570 struct ich_desc_component component;
571 struct ich_desc_region region;
572 struct ich_desc_master master;
Stefan Taunerb3850962011-12-24 00:00:32 +0000573 struct ich_desc_north_strap north;
574 struct ich_desc_south_strap south;
575 struct ich_desc_upper_map upper;
Stefan Tauner1e146392011-09-15 23:52:55 +0000576};
577
Nico Huberfa622942017-03-24 17:25:37 +0100578ssize_t ich_number_of_regions(enum ich_chipset cs, const struct ich_desc_content *content);
579ssize_t ich_number_of_masters(enum ich_chipset cs, const struct ich_desc_content *content);
580
Nico Huber67d71792017-06-17 03:10:15 +0200581void prettyprint_ich_chipset(enum ich_chipset cs);
Stefan Taunerb3850962011-12-24 00:00:32 +0000582void prettyprint_ich_descriptors(enum ich_chipset cs, const struct ich_descriptors *desc);
Stefan Tauner1e146392011-09-15 23:52:55 +0000583
Nico Huberfa622942017-03-24 17:25:37 +0100584void prettyprint_ich_descriptor_content(enum ich_chipset cs, const struct ich_desc_content *content);
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000585void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_descriptors *desc);
Nico Huberfa622942017-03-24 17:25:37 +0100586void prettyprint_ich_descriptor_region(enum ich_chipset cs, const struct ich_descriptors *desc);
587void prettyprint_ich_descriptor_master(enum ich_chipset cs, const struct ich_descriptors *desc);
Stefan Tauner1e146392011-09-15 23:52:55 +0000588
Stefan Taunerb3850962011-12-24 00:00:32 +0000589void prettyprint_ich_descriptor_upper_map(const struct ich_desc_upper_map *umap);
590void prettyprint_ich_descriptor_straps(enum ich_chipset cs, const struct ich_descriptors *desc);
Nico Huberfa622942017-03-24 17:25:37 +0100591int read_ich_descriptors_from_dump(const uint32_t *dump, size_t len, enum ich_chipset *cs, struct ich_descriptors *desc);
Stefan Taunerb3850962011-12-24 00:00:32 +0000592
Nico Huberd54e4f42017-03-23 23:45:47 +0100593int read_ich_descriptors_via_fdo(enum ich_chipset cs, void *spibar, struct ich_descriptors *desc);
Stefan Tauner2ba9f6e2014-08-20 15:39:19 +0000594int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors *desc, uint8_t idx);
Stefan Tauner1e146392011-09-15 23:52:55 +0000595
Nico Huberc3b02dc2023-08-12 01:13:45 +0200596int layout_from_ich_descriptors(struct flashprog_layout **, const void *dump, size_t len);
Nico Huber305f4172013-06-14 11:55:26 +0200597
Stefan Tauner1e146392011-09-15 23:52:55 +0000598#endif /* __ICH_DESCRIPTORS_H__ */