1 /* ifdtool - dump Intel Firmware Descriptor information */
2 /* SPDX-License-Identifier: GPL-2.0-only */
6 #define IFDTOOL_VERSION "1.2"
14 /* port from flashrom */
21 CHIPSET_5_SERIES_IBEX_PEAK
,
22 CHIPSET_6_SERIES_COUGAR_POINT
,
23 CHIPSET_7_SERIES_PANTHER_POINT
,
24 CHIPSET_8_SERIES_LYNX_POINT
,
25 CHIPSET_BAYTRAIL
, /* Actually all with Silvermont architecture:
26 * Bay Trail, Avoton/Rangeley
28 CHIPSET_8_SERIES_LYNX_POINT_LP
,
29 CHIPSET_8_SERIES_WELLSBURG
,
30 CHIPSET_9_SERIES_WILDCAT_POINT
,
31 CHIPSET_9_SERIES_WILDCAT_POINT_LP
,
32 CHIPSET_N_J_SERIES_APOLLO_LAKE
, /* Apollo Lake: N3xxx, J3xxx */
33 CHIPSET_N_J_SERIES_GEMINI_LAKE
, /* Gemini Lake: N5xxx, J5xxx, N4xxx, J4xxx */
34 CHIPSET_N_SERIES_JASPER_LAKE
, /* Jasper Lake: N6xxx, N51xx, N45xx */
35 CHIPSET_x6000_SERIES_ELKHART_LAKE
, /* Elkhart Lake: x6000 */
36 CHIPSET_100_200_SERIES_SUNRISE_POINT
, /* 6th-7th gen Core i/o (LP) variants */
37 CHIPSET_300_SERIES_CANNON_POINT
, /* 8th-9th gen Core i/o (LP) variants */
38 CHIPSET_400_SERIES_ICE_POINT
, /* 10th gen Core i/o (LP) variants */
39 CHIPSET_500_600_SERIES_TIGER_ALDER_POINT
, /* 11th-12th gen Core i/o (LP)
41 CHIPSET_800_SERIES_METEOR_LAKE
, /* 14th gen Core i/o (LP) variants onwards */
42 CHIPSET_900_SERIES_PANTHER_LAKE
, /* 16th gen Core i/o (LP) variants onwards */
43 CHIPSET_C620_SERIES_LEWISBURG
,
65 #define LAYOUT_LINELEN 80
68 SPI_FREQUENCY_20MHZ
= 0,
69 SPI_FREQUENCY_33MHZ
= 1,
70 SPI_FREQUENCY_48MHZ
= 2,
71 SPI_FREQUENCY_50MHZ_30MHZ
= 4,
72 SPI_FREQUENCY_17MHZ
= 6,
75 enum spi_frequency_500_series
{
76 SPI_FREQUENCY_100MHZ
= 0,
77 SPI_FREQUENCY_50MHZ
= 1,
78 SPI_FREQUENCY_500SERIES_33MHZ
= 3,
79 SPI_FREQUENCY_25MHZ
= 4,
80 SPI_FREQUENCY_14MHZ
= 6,
84 ESPI_FREQUENCY_20MHZ
= 0,
85 ESPI_FREQUENCY_24MHZ
= 1,
86 ESPI_FREQUENCY_30MHZ
= 2,
87 ESPI_FREQUENCY_48MHZ
= 3,
88 ESPI_FREQUENCY_60MHZ
= 4,
89 ESPI_FREQUENCY_17MHZ
= 6,
92 enum espi_frequency_500_series
{
93 ESPI_FREQUENCY_500SERIES_20MHZ
= 0,
94 ESPI_FREQUENCY_500SERIES_24MHZ
= 1,
95 ESPI_FREQUENCY_500SERIES_25MHZ
= 2,
96 ESPI_FREQUENCY_500SERIES_48MHZ
= 3,
97 ESPI_FREQUENCY_500SERIES_60MHZ
= 4,
100 enum espi_frequency_800_series
{
101 ESPI_FREQUENCY_800SERIES_20MHZ
= 0,
102 ESPI_FREQUENCY_800SERIES_25MHZ
= 1,
103 ESPI_FREQUENCY_800SERIES_33MHZ
= 2,
104 ESPI_FREQUENCY_800SERIES_50MHZ
= 4,
107 enum component_density
{
108 COMPONENT_DENSITY_512KB
= 0,
109 COMPONENT_DENSITY_1MB
= 1,
110 COMPONENT_DENSITY_2MB
= 2,
111 COMPONENT_DENSITY_4MB
= 3,
112 COMPONENT_DENSITY_8MB
= 4,
113 COMPONENT_DENSITY_16MB
= 5,
114 COMPONENT_DENSITY_32MB
= 6,
115 COMPONENT_DENSITY_64MB
= 7,
116 COMPONENT_DENSITY_UNUSED
= 0xf
120 struct __packed fdbar
{
125 uint32_t flmap3
; // Exist for 500 series onwards
129 #define MAX_REGIONS 16
130 #define MAX_REGIONS_OLD 5
148 struct __packed frba
{
149 uint32_t flreg
[MAX_REGIONS
];
153 struct __packed fcba
{
160 #define MAX_PCHSTRP 1024
162 struct __packed fpsba
{
163 uint32_t pchstrp
[MAX_PCHSTRP
];
167 * WR / RD bits start at different locations within the flmstr regs, but
168 * otherwise have identical meaning.
170 #define FLMSTR_WR_SHIFT_V1 24
171 #define FLMSTR_WR_SHIFT_V2 20
172 #define FLMSTR_RD_SHIFT_V1 16
173 #define FLMSTR_RD_SHIFT_V2 8
176 struct __packed fmba
{
186 struct __packed fmsba
{
197 // Actual number of entries specified in vtl
198 /* FIXME: Rationale for the limit of 8.
199 * AFAICT it's 127, cf. flashrom's ich_descriptors_tool). */
200 struct vscc entry
[8];
204 int base
, limit
, size
, type
;
210 const char *filename
;
211 const char *fmapname
;
215 const char signature
[4];
217 uint8_t header_version
;
218 uint8_t entry_version
;
221 uint8_t reserved
[20];
224 struct cse_fpt_sub_part
{
225 const char signature
[4];
229 uint8_t reserved_2
[12];