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

Function is_platform_ifd_2

util/ifdtool/ifdtool.c:296–324  ·  view source on GitHub ↗

* Some newer platforms have re-defined the FCBA field that was used to * distinguish IFD v1 v/s v2. Define a list of platforms that we know do not * have the required FCBA field, but are IFD v2 and return true if current * platform is one of them. */

Source from the content-addressed store, hash-verified

294 * platform is one of them.
295 */
296static int is_platform_ifd_2(void)
297{
298 static const int ifd_2_platforms[] = {
299 PLATFORM_APL,
300 PLATFORM_GLK,
301 PLATFORM_CNL,
302 PLATFORM_LBG,
303 PLATFORM_DNV,
304 PLATFORM_ICL,
305 PLATFORM_TGL,
306 PLATFORM_JSL,
307 PLATFORM_EHL,
308 PLATFORM_ADL,
309 PLATFORM_SKLKBL,
310 PLATFORM_IFD2,
311 PLATFORM_MTL,
312 PLATFORM_PTL,
313 PLATFORM_NVL,
314 PLATFORM_WBG,
315 };
316 unsigned int i;
317
318 for (i = 0; i < ARRAY_SIZE(ifd_2_platforms); i++) {
319 if (platform == ifd_2_platforms[i])
320 return 1;
321 }
322
323 return 0;
324}
325
326static void check_ifd_version(char *image, int size)
327{

Callers 1

check_ifd_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected