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

Function coreboot_module_redraw

payloads/coreinfo/coreboot_module.c:27–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static int tables_good = 0;
26
27static int coreboot_module_redraw(WINDOW *win)
28{
29 int row = 2;
30 int i;
31
32 print_module_title(win, "coreboot Tables");
33
34 if (tables_good) {
35 mvwprintw(win, row++, 1, "No coreboot tables were found");
36 return 0;
37 }
38
39 mvwprintw(win, row++, 1, "Vendor: %s", cb_info.vendor);
40 mvwprintw(win, row++, 1, "Part: %s", cb_info.part);
41
42 mvwprintw(win, row++, 1, "Version: %s%s",
43 cb_info.strings[CB_TAG_VERSION - 0x4],
44 cb_info.strings[CB_TAG_EXTRA_VERSION - 0x4]);
45
46 mvwprintw(win, row++, 1, "Built: %s (%s@%s.%s)",
47 cb_info.strings[CB_TAG_BUILD - 0x4],
48 cb_info.strings[CB_TAG_COMPILE_BY - 0x04],
49 cb_info.strings[CB_TAG_COMPILE_HOST - 0x04],
50 cb_info.strings[CB_TAG_COMPILE_DOMAIN - 0x04]);
51
52 if (cb_info.serial.tag != 0x0) {
53 mvwprintw(win, row++, 1, "Serial Port I/O base: 0x%x",
54 cb_info.serial.baseaddr);
55 }
56
57 if (cb_info.console.tag != 0x0) {
58 mvwprintw(win, row++, 1, "Default Output Console: ");
59
60 switch (cb_info.console.type) {
61 case CB_TAG_CONSOLE_SERIAL8250:
62 wprintw(win, "Serial Port");
63 break;
64 case CB_TAG_CONSOLE_VGA:
65 wprintw(win, "VGA");
66 break;
67 case CB_TAG_CONSOLE_BTEXT:
68 wprintw(win, "BTEXT");
69 break;
70 case CB_TAG_CONSOLE_LOGBUF:
71 wprintw(win, "Log Buffer");
72 break;
73 case CB_TAG_CONSOLE_SROM:
74 wprintw(win, "Serial ROM");
75 break;
76 case CB_TAG_CONSOLE_EHCI:
77 wprintw(win, "USB Debug");
78 break;
79 }
80 }
81
82 row++;
83 mvwprintw(win, row++, 1, "-- Memory Map --");
84

Callers

nothing calls this directly

Calls 3

print_module_titleFunction · 0.85
mvwprintwFunction · 0.50
wprintwFunction · 0.50

Tested by

no test coverage detected