util/ifdtool: Add Wellsburg support

Wellsburg is IFDv2 compatible in most fields, but not in all.
It only has 8 regions and the flash master bits match the defines for
IFDv1 and thus has an "IFDv1.5" descriptor.

Add a new enum for IFDv1.5 descriptor and use them to properly operate
on this IFD.

The 'SPI programming guide' is inconsistent and mentions 6 regions
in one place, but 7 regions in another chapter. Tests showed that it
actually supports 7 regions.

Add support using the -p argument to specify Wellsburg platform.

The previous patch made sure that only 8 regions are used and that no
corruption can happen when operating in IFDv2/IFDv1.5 mode.

Tested on Intel Grangeville.

Documents used:
Intel Document Id: 516552
Intel Document Id: 565117

Change-Id: I651730b05deb512478d059174cf8615547d2fde4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Co-developed-by: Julian Elischer <jrelis@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
Patrick Rudolph
2022-10-21 15:13:43 +02:00
committed by Lean Sheng Tan
parent 794137e2a8
commit 16598745b8
2 changed files with 17 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
enum ifd_version {
IFD_VERSION_1,
IFD_VERSION_1_5,
IFD_VERSION_2,
};
@@ -62,6 +63,7 @@ enum platform {
PLATFORM_IFD2,
PLATFORM_DNV,
PLATFORM_MTL,
PLATFORM_WBG
};
#define LAYOUT_LINELEN 80