Generate aliases for coreboot modules to allow automatic module probing.
Showing the changes to scripts (2 of 3 files). Show all
Unified · Split
| @@ -274,5 +274,8 @@ int main(void) · 273 unmodified lines | ||
| 274 | 274 | DEVID(vchiq_device_id); |
| 275 | 275 | DEVID_FIELD(vchiq_device_id, name); |
| 276 | 276 | |
| 277 | + DEVID(coreboot_device_id); | |
| 278 | + DEVID_FIELD(coreboot_device_id, tag); | |
| 279 | + | |
| 277 | 280 | return 0; |
| 278 | 281 | } |
| @@ -1494,6 +1494,15 @@ static int do_vchiq_entry(const char *filename, void *symval, char *alias) · 1493 unmodified lines | ||
| 1494 | 1494 | return 1; |
| 1495 | 1495 | } |
| 1496 | 1496 | |
| 1497 | +/* Looks like: coreboot:tN */ | |
| 1498 | +static int do_coreboot_entry(const char *filename, void *symval, char *alias) | |
| 1499 | +{ | |
| 1500 | + DEF_FIELD(symval, coreboot_device_id, tag); | |
| 1501 | + sprintf(alias, "coreboot:t%08X", tag); | |
| 1502 | + | |
| 1503 | + return 1; | |
| 1504 | +} | |
| 1505 | + | |
| 1497 | 1506 | /* Does namelen bytes of name exactly match the symbol? */ |
| 1498 | 1507 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
| 1499 | 1508 | { |
| @@ -1575,6 +1584,7 @@ static const struct devtable devtable[] = { · 75 unmodified lines | ||
| 1575 | 1584 | {"ishtp", SIZE_ishtp_device_id, do_ishtp_entry}, |
| 1576 | 1585 | {"cdx", SIZE_cdx_device_id, do_cdx_entry}, |
| 1577 | 1586 | {"vchiq", SIZE_vchiq_device_id, do_vchiq_entry}, |
| 1587 | + {"coreboot", SIZE_coreboot_device_id, do_coreboot_entry}, | |
| 1578 | 1588 | }; |
| 1579 | 1589 | |
| 1580 | 1590 | /* Create MODULE_ALIAS() statements. |