util/ifdtool: add generic `PLATFORM_IFD2` for early SoC development

`PLATFORM_IFD2` macro is more generic tag that can be associated with
early next SoC platform development which using IFDv2.

The current assumption is that newer SoC platform still uses the same
SPI/eSPI frequency definition being used for latest platform(TGL, ADL)
and if the frequency definition is updated later, `PLATFORM_IFD2' will
use latest frequency definition for early next SoC development.
And once upstream is allowed for new platform, platform name will be
added in tool later.

Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I14a71a58c7d51b9c8b92e013b5637c6b35005f22
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61576
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Wonkyu Kim 2022-02-02 15:19:05 -08:00 committed by Felix Held
parent 80c9289712
commit 3922aa5c2c
2 changed files with 7 additions and 0 deletions

View File

@ -231,6 +231,7 @@ static enum ich_chipset ifd2_platform_to_chipset(const int pindex)
return CHIPSET_300_SERIES_CANNON_POINT;
case PLATFORM_TGL:
case PLATFORM_ADL:
case PLATFORM_IFD2:
return CHIPSET_500_600_SERIES_TIGER_ALDER_POINT;
case PLATFORM_ICL:
return CHIPSET_400_SERIES_ICE_POINT;
@ -260,6 +261,7 @@ static int is_platform_ifd_2(void)
PLATFORM_EHL,
PLATFORM_ADL,
PLATFORM_SKLKBL,
PLATFORM_IFD2,
};
unsigned int i;
@ -1185,6 +1187,7 @@ static void lock_descriptor(const char *filename, char *image, int size)
case PLATFORM_JSL:
case PLATFORM_EHL:
case PLATFORM_ADL:
case PLATFORM_IFD2:
/* CPU/BIOS can read descriptor and BIOS. */
fmba->flmstr1 |= (1 << REGION_DESC) << rd_shift;
fmba->flmstr1 |= (1 << REGION_BIOS) << rd_shift;
@ -1642,6 +1645,7 @@ static void print_usage(const char *name)
" ehl - Elkhart Lake\n"
" glk - Gemini Lake\n"
" icl - Ice Lake\n"
" ifd2 - IFDv2 Platform\n"
" jsl - Jasper Lake\n"
" sklkbl - Sky Lake/Kaby Lake\n"
" tgl - Tiger Lake\n"
@ -1909,6 +1913,8 @@ int main(int argc, char *argv[])
platform = PLATFORM_TGL;
} else if (!strcmp(optarg, "adl")) {
platform = PLATFORM_ADL;
} else if (!strcmp(optarg, "ifd2")) {
platform = PLATFORM_IFD2;
} else {
fprintf(stderr, "Unknown platform: %s\n", optarg);
exit(EXIT_FAILURE);

View File

@ -58,6 +58,7 @@ enum platform {
PLATFORM_SKLKBL,
PLATFORM_TGL,
PLATFORM_ADL,
PLATFORM_IFD2,
};
#define LAYOUT_LINELEN 80