1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ifdtool - Manage Intel Firmware Descriptor information
5 * Copyright (C) 2011 The ChromiumOS Authors.
7 * From Coreboot project
12 #define __packed __attribute__((packed))
14 #define IFDTOOL_VERSION "1.1-U-Boot"
19 SPI_FREQUENCY_20MHZ
= 0,
20 SPI_FREQUENCY_33MHZ
= 1,
21 SPI_FREQUENCY_50MHZ
= 4,
24 enum component_density
{
25 COMPONENT_DENSITY_512KB
= 0,
26 COMPONENT_DENSITY_1MB
= 1,
27 COMPONENT_DENSITY_2MB
= 2,
28 COMPONENT_DENSITY_4MB
= 3,
29 COMPONENT_DENSITY_8MB
= 4,
30 COMPONENT_DENSITY_16MB
= 5,
33 /* flash descriptor */
34 struct __packed fdbar_t
{
39 uint8_t reserved
[0xefc - 0x20];
46 struct __packed frba_t
{
47 uint32_t flreg
[MAX_REGIONS
];
50 /* component section */
51 struct __packed fcba_t
{
60 struct __packed fpsba_t
{
61 uint32_t pchstrp
[MAX_STRAPS
];
65 struct __packed fmba_t
{
72 struct __packed fmsba_t
{
83 /* Actual number of entries specified in vtl */
84 struct vscc_t entry
[8];
88 int base
, limit
, size
;