MCPcopy Create free account
hub / github.com/coreboot/coreboot / check_ifd_version

Function check_ifd_version

util/ifdtool/ifdtool.c:326–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326static void check_ifd_version(char *image, int size)
327{
328 const struct fdbar *fdb = find_fd(image, size);
329
330 if (is_platform_ifd_2()) {
331 chipset = ifd2_platform_to_chipset(platform);
332 if (chipset == CHIPSET_8_SERIES_WELLSBURG)
333 ifd_version = IFD_VERSION_1_5;
334 else
335 ifd_version = IFD_VERSION_2;
336 max_regions = MIN(max_regions_from_fdbar(fdb), MAX_REGIONS);
337 } else {
338 ifd_version = IFD_VERSION_1;
339 chipset = ifd1_guess_chipset(image, size);
340 max_regions = MIN(max_regions_from_fdbar(fdb), MAX_REGIONS_OLD);
341 }
342}
343
344static struct region get_region(const struct frba *frba, unsigned int region_type)
345{

Callers 1

mainFunction · 0.85

Calls 5

find_fdFunction · 0.85
is_platform_ifd_2Function · 0.85
ifd2_platform_to_chipsetFunction · 0.85
max_regions_from_fdbarFunction · 0.85
ifd1_guess_chipsetFunction · 0.85

Tested by

no test coverage detected