| 324 | } |
| 325 | |
| 326 | static 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 | |
| 344 | static struct region get_region(const struct frba *frba, unsigned int region_type) |
| 345 | { |
no test coverage detected