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

Function main

payloads/coreinfo/coreinfo.c:280–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280int main(int argc, char **argv)
281{
282 (void)argc;
283 (void)argv;
284
285 int j;
286
287 if (CONFIG(LP_USB))
288 usb_initialize();
289
290 initscr();
291
292 start_color();
293 init_pair(1, COLOR_WHITE, COLOR_GREEN);
294 init_pair(2, COLOR_WHITE, COLOR_BLACK);
295 init_pair(3, COLOR_BLACK, COLOR_WHITE);
296
297 modwin = newwin(SCREEN_Y - 3, SCREEN_X, 1, 0);
298 menuwin = newwin(2, SCREEN_X, SCREEN_Y - 2, 0);
299
300 wattrset(stdscr, COLOR_PAIR(1) | A_BOLD);
301 wattrset(modwin, COLOR_PAIR(2));
302 wattrset(menuwin, COLOR_PAIR(1) | A_BOLD);
303
304 werase(modwin);
305
306 for (size_t i = 0; i < ARRAY_SIZE(categories); i++) {
307 for (j = 0; j < categories[i].count; j++)
308 categories[i].modules[j]->init();
309 }
310
311 noecho(); /* don't let curses echo keyboard chars */
312 keypad(stdscr, TRUE); /* allow KEY_F(n) keys to be seen */
313 curs_set(0); /* Hide blinking cursor */
314
315 loop();
316
317 /* reboot */
318 outb(0x6, 0xcf9);
319 halt();
320 return 0;
321}

Callers

nothing calls this directly

Calls 14

usb_initializeFunction · 0.85
wattrsetFunction · 0.85
loopFunction · 0.85
initscrFunction · 0.50
start_colorFunction · 0.50
init_pairFunction · 0.50
newwinFunction · 0.50
weraseFunction · 0.50
noechoFunction · 0.50
keypadFunction · 0.50
curs_setFunction · 0.50
outbFunction · 0.50

Tested by

no test coverage detected