2 * ifdtool - Manage Intel Firmware Descriptor information
4 * Copyright (C) 2011 The ChromiumOS Authors.
6 * SPDX-License-Identifier: GPL-2.0
8 * From Coreboot project
13 #define __packed __attribute__((packed))
15 #define IFDTOOL_VERSION "1.1-U-Boot"
18 SPI_FREQUENCY_20MHZ = 0,
19 SPI_FREQUENCY_33MHZ = 1,
20 SPI_FREQUENCY_50MHZ = 4,
23 enum component_density {
24 COMPONENT_DENSITY_512KB = 0,
25 COMPONENT_DENSITY_1MB = 1,
26 COMPONENT_DENSITY_2MB = 2,
27 COMPONENT_DENSITY_4MB = 3,
28 COMPONENT_DENSITY_8MB = 4,
29 COMPONENT_DENSITY_16MB = 5,
32 /* flash descriptor */
33 struct __packed fdbar_t {
38 uint8_t reserved[0xefc - 0x20];
45 struct __packed frba_t {
46 uint32_t flreg[MAX_REGIONS];
49 /* component section */
50 struct __packed fcba_t {
59 struct __packed fpsba_t {
60 uint32_t pchstrp[MAX_STRAPS];
64 struct __packed fmba_t {
71 struct __packed fmsba_t {
82 /* Actual number of entries specified in vtl */
83 struct vscc_t entry[8];
87 int base, limit, size;