History

firmware: coreboot: Generate aliases for coreboot modules

Generate aliases for coreboot modules to allow automatic module probing.

Nícolas F. R. A. Prado committed 2 years ago

Commit f1cebae1 parent c2b28f63 files · +23 −0Browse files

Showing the changes to scripts (2 of 3 files). Show all

Unified · Split

2 files
  1. scripts/mod/devicetable-offsets.c +3 −0
  2. scripts/mod/file2alias.c +10 −0
scripts/mod/devicetable-offsets.c+3−0
@@ -274,5 +274,8 @@ int main(void) · 273 unmodified lines
274274 DEVID(vchiq_device_id);
275275 DEVID_FIELD(vchiq_device_id, name);
276276
277+ DEVID(coreboot_device_id);
278+ DEVID_FIELD(coreboot_device_id, tag);
279+
277280 return 0;
278281 }
scripts/mod/file2alias.c+10−0
@@ -1494,6 +1494,15 @@ static int do_vchiq_entry(const char *filename, void *symval, char *alias) · 1493 unmodified lines
14941494 return 1;
14951495 }
14961496
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+
14971506 /* Does namelen bytes of name exactly match the symbol? */
14981507 static bool sym_is(const char *name, unsigned namelen, const char *symbol)
14991508 {
@@ -1575,6 +1584,7 @@ static const struct devtable devtable[] = { · 75 unmodified lines
15751584 {"ishtp", SIZE_ishtp_device_id, do_ishtp_entry},
15761585 {"cdx", SIZE_cdx_device_id, do_cdx_entry},
15771586 {"vchiq", SIZE_vchiq_device_id, do_vchiq_entry},
1587+ {"coreboot", SIZE_coreboot_device_id, do_coreboot_entry},
15781588 };
15791589
15801590 /* Create MODULE_ALIAS() statements.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t