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"
20 SPI_FREQUENCY_20MHZ = 0,
21 SPI_FREQUENCY_33MHZ = 1,
22 SPI_FREQUENCY_50MHZ = 4,
25 enum component_density {
26 COMPONENT_DENSITY_512KB = 0,
27 COMPONENT_DENSITY_1MB = 1,
28 COMPONENT_DENSITY_2MB = 2,
29 COMPONENT_DENSITY_4MB = 3,
30 COMPONENT_DENSITY_8MB = 4,
31 COMPONENT_DENSITY_16MB = 5,
34 /* flash descriptor */
35 struct __packed fdbar_t {
40 uint8_t reserved[0xefc - 0x20];
47 struct __packed frba_t {
48 uint32_t flreg[MAX_REGIONS];
51 /* component section */
52 struct __packed fcba_t {
61 struct __packed fpsba_t {
62 uint32_t pchstrp[MAX_STRAPS];
66 struct __packed fmba_t {
73 struct __packed fmsba_t {
84 /* Actual number of entries specified in vtl */
85 struct vscc_t entry[8];
89 int base, limit, size;