#define SCREEN_Y 25
#define SCREEN_X 80
+#define KEY_ESC 27
+
extern struct coreinfo_module cpuinfo_module;
extern struct coreinfo_module pci_module;
extern struct coreinfo_module coreboot_module;
extern struct coreinfo_module nvram_module;
extern struct coreinfo_module bootlog_module;
+extern struct coreinfo_module ramdump_module;
extern struct coreinfo_module lar_module;
struct coreinfo_module *system_modules[] = {
#ifdef CONFIG_MODULE_NVRAM
&nvram_module,
#endif
+#ifdef CONFIG_MODULE_RAMDUMP
+ &ramdump_module,
+#endif
};
struct coreinfo_module *coreboot_modules[] = {
}
};
-
static WINDOW *modwin;
static WINDOW *menuwin;
{
struct tm tm;
- while(nvram_updating())
+ while (nvram_updating())
mdelay(10);
rtc_read_clock(&tm);
mvwprintw(menuwin, 0, 57, "%02d/%02d/%04d - %02d:%02d:%02d",
- tm.tm_mon, tm.tm_mday, 1900+tm.tm_year, tm.tm_hour,
- tm.tm_min, tm.tm_sec);
+ tm.tm_mon, tm.tm_mday, 1900+tm.tm_year, tm.tm_hour,
+ tm.tm_min, tm.tm_sec);
}
#endif
ptr += sprintf(ptr, "[ %s ]", str);
-
-
for (i = ((SCREEN_X - len) / 2) + len; i < SCREEN_X; i++)
ptr += sprintf(ptr, "=");
{
if (key >= 'a' && key <= 'z') {
int index = key - 'a';
-
if (index < cat->count) {
-
- cat->cur = index;
+ cat->cur = index;
redraw_module(cat);
return;
}
{
int key;
- center(0, "coreinfo v0.1");
+ center(0, CONFIG_PAYLOAD_INFO_NAME " " CONFIG_PAYLOAD_INFO_VERSION);
refresh();
print_menu();
}
}
+ if (key == KEY_ESC)
+ return;
handle_category_key(&categories[curwin], key);
}
{
int i, j;
- curses_enable_serial(0);
- curses_enable_vga(1);
-
initscr();
init_pair(1, COLOR_WHITE, COLOR_GREEN);
wrefresh(modwin);
for (i = 0; i < ARRAY_SIZE(categories); i++) {
- for(j = 0; j < categories[i].count; j++)
+ for (j = 0; j < categories[i].count; j++)
categories[i].modules[j]->init();
}
return 0;
}
+
+PAYLOAD_INFO(name, CONFIG_PAYLOAD_INFO_NAME);
+PAYLOAD_INFO(listname, CONFIG_PAYLOAD_INFO_LISTNAME);
+PAYLOAD_INFO(desc, CONFIG_PAYLOAD_INFO_DESC);