coreboot-kgpe-d16/util/ifdtool
Subrata Banik 8c082e5fef util/ifdtool: Use -p platform name to detect IFDv2 platform and chipset
ifdtool uses `chipset` information to determine how certain straps
are decoded. This has been used for IFDv1 platforms as well as IFDv2
platforms (CHIPSET_500_600_SERIES_TIGER_ALDER_POINT).

IFDv2 platforms are all expected to pass in `-p` argument to identify
the platform. This platform information can be used to identify the
appropriate chipset information. For IFDv1 since `-p` argument is not
provided, ifdtool needs to use certain fields in the descriptor
(e.g. strap length) for unique identification of IFDv1 chipset.

This change updates `check_ifd_version()` function to:
1. Determine if IFD version is v1 or v2 based on `-p` argument.
If `-p` is not provided, it assumes that the platform is using IFDv1.
2. Based on IFD version, it calls either `ifd2_platform_to_chipset()`
or `ifd1_guess_chipset()` to determine chipset information.

This fixes the issue reported with CB:44815, where ifdtool is unable
to identify Alder Lake chipsets.

BUG=b:153888802
TEST=Able to dump FD contains correctly with platform quirks on Brya Platform.
> ifdtool -d coreboot.rom -p adl
PCH Revision: 500 series Tiger Point/ 600 series Alder Point

Change-Id: I25f69ce775454409974056d8326c02e29038ec8a
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54305
Reviewed-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-06-20 06:01:52 +00:00
..
.gitignore .gitignore: Ignore .test/.dependencies globally 2020-10-31 18:21:36 +00:00
description.md util: Add description.md to each util 2018-07-26 13:26:50 +00:00
ifdtool.c util/ifdtool: Use -p platform name to detect IFDv2 platform and chipset 2021-06-20 06:01:52 +00:00
ifdtool.h util/ifdtool: Use -p platform name to detect IFDv2 platform and chipset 2021-06-20 06:01:52 +00:00
Makefile util: Allow overriding gcc as default host compiler 2020-06-04 08:11:48 +00:00
Makefile.inc util/ifdtool: Add coreboot build system support 2021-01-12 14:43:26 +00:00