Name of user not set #1004065 has uploaded this change for review.

View Change

util/ifdtool: Add additional regions for platforms that support them.

Some Intel SoCs support additional IFD regions for things like embedded LAN FW or
Innovation Engine firmware, etc.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Change-Id: I64cc1d787f15a01dff7db89218410228fd0082a6
---
M util/ifdtool/ifdtool.c
M util/ifdtool/ifdtool.h
2 files changed, 30 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/60736/1
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c
index ca5d3b8..a6e0f8a 100644
--- a/util/ifdtool/ifdtool.c
+++ b/util/ifdtool/ifdtool.c
@@ -40,10 +40,17 @@
{ "Intel ME", "me", "flashregion_2_intel_me.bin", "SI_ME" },
{ "GbE", "gbe", "flashregion_3_gbe.bin", "SI_GBE" },
{ "Platform Data", "pd", "flashregion_4_platform_data.bin", "SI_PDR" },
- { "Reserved", "res1", "flashregion_5_reserved.bin", NULL },
- { "Reserved", "res2", "flashregion_6_reserved.bin", NULL },
+ { "Device Expansion1", "devexp", "flashregion_5_device_expansion.bin", "SI_DEV_EXP1" },
+ { "Secondary BIOS", "bios2", "flashregion_6_bios2.bin", "SI_BIOS2" },
{ "Reserved", "res3", "flashregion_7_reserved.bin", NULL },
{ "EC", "ec", "flashregion_8_ec.bin", "SI_EC" },
+ { "Reserved", "res4", "flashregion_9_reserved.bin", NULL },
+ { "IE", "ie", "flashregion_10_ie.bin", "SI_IE" },
+ { "10GbA", "10gba", "flashregion_11_10gbeA.bin", "SI_10GBA" },
+ { "10GbB", "10gbb", "flashregion_12_10gbeB.bin", "SI_10GBB" },
+ { "Reserved", "res6", "flashregion_13_reserved.bin", NULL },
+ { "Reserved", "res7", "flashregion_14_reserved.bin", NULL },
+ { "PTT", "ptt", "flashregion_15_ptt.bin", "SI_PTT"}
};

/* port from flashrom */
@@ -78,6 +85,7 @@
"400 series Ice Point",
"500 series Tiger Point/ 600 series Alder Point",
"C620 series Lewisburg",
+ "Denverton",
NULL
};

@@ -1642,7 +1650,7 @@
" -V | --newvalue The new value to write into PCH strap specified by -S\n"
" -v | --version: print the version\n"
" -h | --help: print this help\n\n"
- "<region> is one of Descriptor, BIOS, ME, GbE, Platform, res1, res2, res3\n"
+ "<region> is one of Descriptor, BIOS, ME, GbE, Platform, res1, res2, res3, EC, 10GB[A/B], PDR\n"
"\n");
}

@@ -1735,12 +1743,24 @@
region_type = 4;
else if (!strcasecmp("res1", region_type_string))
region_type = 5;
+ else if (!strcasecmp("Device", region_type_string))
+ region_type = 5;
else if (!strcasecmp("res2", region_type_string))
region_type = 6;
+ else if (!strcasecmp("Secondary", region_type_string))
+ region_type = 6;
else if (!strcasecmp("res3", region_type_string))
region_type = 7;
else if (!strcasecmp("EC", region_type_string))
region_type = 8;
+ else if (!strcasecmp("IE", region_type_string))
+ region_type = 10;
+ else if (!strcasecmp("10GbA", region_type_string))
+ region_type = 11;
+ else if (!strcasecmp("10GbB", region_type_string))
+ region_type = 12;
+ else if (!strcasecmp("PTT", region_type_string))
+ region_type = 15;
if (region_type == -1) {
fprintf(stderr, "No such region type: '%s'\n\n",
region_type_string);
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index 4f63e20..638033f 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -117,7 +117,7 @@
} __attribute__((packed)) fdbar_t;

// regions
-#define MAX_REGIONS 9
+#define MAX_REGIONS 16
#define MAX_REGIONS_OLD 5

enum flash_regions {
@@ -126,7 +126,13 @@
REGION_ME,
REGION_GBE,
REGION_PDR,
+ REGION_DEV_EXP1,
+ REGION_BIOS2,
REGION_EC = 8,
+ REGION_IE = 10,
+ REGION_10GBA,
+ REGION_10GBB,
+ REGION_PTT = 15,
};

typedef struct {

To view, visit change 60736. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I64cc1d787f15a01dff7db89218410228fd0082a6
Gerrit-Change-Number: 60736
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1004065
Gerrit-MessageType: newchange