summaryrefslogtreecommitdiffstats
path: root/util/ifdtool/ifdtool.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-06-22 11:14:48 -0700
committerAaron Durbin <adurbin@chromium.org>2015-08-19 14:03:26 +0000
commit1f7fd720c81755144423f2d4062c39cc651adc0a (patch)
tree95d3392f688d428bcec3db90b500a59d69fefdd6 /util/ifdtool/ifdtool.h
parente0334e82960aa72c602686f1f8a840002bc3a73a (diff)
downloadcoreboot-1f7fd720c81755144423f2d4062c39cc651adc0a.tar.gz
coreboot-1f7fd720c81755144423f2d4062c39cc651adc0a.tar.bz2
coreboot-1f7fd720c81755144423f2d4062c39cc651adc0a.zip
ifdtool: Update to support Skylake+ descriptor format
The descriptor format has changed with Skylake and some fields have moved or been expanded. This includes new SPI frequencies and chip densities, though unfortunately 30MHz in the new format conflicts with 50MHz in the old format... There are also new regions with a few reserved regions inserted before a new embedded controller region. Unfortunately there does not seem to be a documented version field so there does not seem to be an official way to determine if a specific descriptor is new or old. To work around this ifdtool checks the hardcoded "SPI Read Frequency" to see if it set for 20MHz (old descriptor) or 17MHz (new descriptor). BUG=chrome-os-partner:40635 BUG=chrome-os-partner:43461 BRANCH=none TEST=run ifdtool on skylake and broadwell images Original-Change-Id: I0561b3c65fcb3e77c0a24be58b01db9b3a36e5a9 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/281001 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Aaron Durbin <adurbin@chromium.org> Change-Id: I9a08c26432e13c4000afc50de9d8473e6f911805 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/293240 Reviewed-on: http://review.coreboot.org/11228 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/ifdtool/ifdtool.h')
-rw-r--r--util/ifdtool/ifdtool.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index b91c02dddb51..8b1328372c02 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -18,14 +18,21 @@
*/
#include <stdint.h>
-#define IFDTOOL_VERSION "1.1"
+#define IFDTOOL_VERSION "1.2"
+
+enum ifd_version {
+ IFD_VERSION_1,
+ IFD_VERSION_2,
+};
#define LAYOUT_LINELEN 80
enum spi_frequency {
SPI_FREQUENCY_20MHZ = 0,
SPI_FREQUENCY_33MHZ = 1,
- SPI_FREQUENCY_50MHZ = 4,
+ SPI_FREQUENCY_48MHZ = 2,
+ SPI_FREQUENCY_50MHZ_30MHZ = 4,
+ SPI_FREQUENCY_17MHZ = 6,
};
enum component_density {
@@ -35,6 +42,9 @@ enum component_density {
COMPONENT_DENSITY_4MB = 3,
COMPONENT_DENSITY_8MB = 4,
COMPONENT_DENSITY_16MB = 5,
+ COMPONENT_DENSITY_32MB = 6,
+ COMPONENT_DENSITY_64MB = 7,
+ COMPONENT_DENSITY_UNUSED = 0xf
};
// flash descriptor
@@ -48,12 +58,18 @@ typedef struct {
} __attribute__((packed)) fdbar_t;
// regions
+#define MAX_REGIONS 9
+#define MAX_REGIONS_OLD 5
typedef struct {
uint32_t flreg0;
uint32_t flreg1;
uint32_t flreg2;
uint32_t flreg3;
uint32_t flreg4;
+ uint32_t flreg5;
+ uint32_t flreg6;
+ uint32_t flreg7;
+ uint32_t flreg8;
} __attribute__((packed)) frba_t;
// component section
@@ -90,6 +106,8 @@ typedef struct {
uint32_t flmstr1;
uint32_t flmstr2;
uint32_t flmstr3;
+ uint32_t flmstr4;
+ uint32_t flmstr5;
} __attribute__((packed)) fmba_t;
// processor strap