Name of user not set #1004065 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60729 )
Change subject: util/ifdtool.h: util/ifdtool.c: Add additional regions for platforms that support them. Add Denverton platform support. ......................................................................
util/ifdtool.h: util/ifdtool.c: Add additional regions for platforms that support them. Add Denverton platform support.
Change-Id: Ic8a4f26d833b1e628b7a72518d0a27252ec62f7c Signed-off-by: Jeff Daly jeffd@silicom-usa.com --- M util/ifdtool/ifdtool.c M util/ifdtool/ifdtool.h 2 files changed, 50 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/60729/1
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index ca5d3b8..e577b85 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 Expansion 1", "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 };
@@ -229,6 +237,8 @@ return CHIPSET_400_SERIES_ICE_POINT; case PLATFORM_LBG: return CHIPSET_C620_SERIES_LEWISBURG; + case PLATFORM_DNV: + return CHIPSET_DENVERTON; default: return CHIPSET_PCH_UNKNOWN; } @@ -253,6 +263,7 @@ PLATFORM_EHL, PLATFORM_ADL, PLATFORM_SKLKBL, + PLATFORM_DNV, }; unsigned int i;
@@ -718,6 +729,12 @@ (flmstr & (1 << (wr_shift + 1))) ? "enabled" : "disabled"); printf(" Flash Descriptor Write Access: %s\n", (flmstr & (1 << wr_shift)) ? "enabled" : "disabled"); + if (platform == PLATFORM_DNV) { + printf(" 10GB A Region Write Access: %s\n", + (flmstr & (1 << (wr_shift + 11))) ? "enabled" : "disabled"); + printf(" 10GB B Region Write Access: %s\n", + (flmstr & (1 << (wr_shift + 12))) ? "enabled" : "disabled"); + }
if (ifd_version >= IFD_VERSION_2) printf(" EC Region Read Access: %s\n", @@ -733,6 +750,12 @@ (flmstr & (1 << (rd_shift + 1))) ? "enabled" : "disabled"); printf(" Flash Descriptor Read Access: %s\n", (flmstr & (1 << rd_shift)) ? "enabled" : "disabled"); + if (platform == PLATFORM_DNV) { + printf(" 10GB A Region Read Access: %s\n", + (flmstr & (1 << (rd_shift + 11))) ? "enabled" : "disabled"); + printf(" 10GB B Region Read Access: %s\n", + (flmstr & (1 << (rd_shift + 12))) ? "enabled" : "disabled"); + }
/* Requestor ID doesn't exist for ifd 2 */ if (ifd_version < IFD_VERSION_2) @@ -1631,6 +1654,7 @@ " adl - Alder Lake\n" " aplk - Apollo Lake\n" " cnl - Cannon Lake\n" + " dnv - Denverton\n" " lbg - Lewisburg PCH\n" " ehl - Elkhart Lake\n" " glk - Gemini Lake\n" @@ -1642,7 +1666,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 +1759,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); @@ -1875,6 +1911,8 @@ platform = PLATFORM_APL; } else if (!strcmp(optarg, "cnl")) { platform = PLATFORM_CNL; + } else if (!strcmp(optarg, "dnv")) { + platform = PLATFORM_DNV; } else if (!strcmp(optarg, "lbg")) { platform = PLATFORM_LBG; } else if (!strcmp(optarg, "ehl")) { diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h index 4f63e20..2dd6ed6 100644 --- a/util/ifdtool/ifdtool.h +++ b/util/ifdtool/ifdtool.h @@ -45,6 +45,7 @@ CHIPSET_500_600_SERIES_TIGER_ALDER_POINT, /* 11th-12th gen Core i/o (LP) * variants onwards */ CHIPSET_C620_SERIES_LEWISBURG, + CHIPSET_DENVERTON, };
enum platform { @@ -58,6 +59,7 @@ PLATFORM_SKLKBL, PLATFORM_TGL, PLATFORM_ADL, + PLATFORM_DNV, };
#define LAYOUT_LINELEN 80 @@ -117,7 +119,7 @@ } __attribute__((packed)) fdbar_t;
// regions -#define MAX_REGIONS 9 +#define MAX_REGIONS 16 #define MAX_REGIONS_OLD 5
enum flash_regions { @@ -126,7 +128,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 {