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

Function platform_identify

util/amdfwtool/soc.c:186–195  ·  view source on GitHub ↗

* Identify the platform based on SoC name string. * * @param soc_name: Case-insensitive SoC name string to match * @return: Matching platform enum value, or PLATFORM_UNKNOWN if no match found */

Source from the content-addressed store, hash-verified

184 * @return: Matching platform enum value, or PLATFORM_UNKNOWN if no match found
185 */
186enum platform platform_identify(char *soc_name)
187{
188 for (size_t i = 0; i < ARRAY_SIZE(platform_table); i++) {
189 if (!platform_table[i].name) /* PLATFORM_UNKNOWN has no entry */
190 continue;
191 if (!strcasecmp(soc_name, platform_table[i].name))
192 return i;
193 }
194 return PLATFORM_UNKNOWN;
195}
196
197/**
198 * Check if the platform requires ISH (Image slot header) support.

Callers 1

process_configFunction · 0.85

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected