Various tiny fixes (trivial):
- Show PCI IDs as 4-digit numbers always. - Cosmetic changes to make UI look more consistent. - Drop MODULE_COUNT #define and use ARRAY_SIZE() where needed. - Small fix to improve build system (create build/ when not there). Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3191 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
408c4e1784
commit
a0c0093a09
|
@ -66,7 +66,7 @@ else
|
|||
|
||||
include $(src)/.config
|
||||
|
||||
all: $(TARGET)
|
||||
all: prepare $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(Q)printf " LD $(subst $(shell pwd)/,,$(@))\n"
|
||||
|
|
|
@ -47,30 +47,30 @@ int coreboot_module_redraw(WINDOW *win)
|
|||
print_module_title(win, "Coreboot Tables");
|
||||
|
||||
if (tables_good) {
|
||||
mvwprintw(win, row++, 2, "No Coreboot tables were found");
|
||||
mvwprintw(win, row++, 1, "No Coreboot tables were found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
mvwprintw(win, row++, 2, "Vendor: %s", cb_info.vendor);
|
||||
mvwprintw(win, row++, 2, "Part: %s", cb_info.part);
|
||||
mvwprintw(win, row++, 1, "Vendor: %s", cb_info.vendor);
|
||||
mvwprintw(win, row++, 1, "Part: %s", cb_info.part);
|
||||
|
||||
mvwprintw(win, row++, 2, "Version: %s%s",
|
||||
mvwprintw(win, row++, 1, "Version: %s%s",
|
||||
cb_info.strings[CB_TAG_VERSION - 0x4],
|
||||
cb_info.strings[CB_TAG_EXTRA_VERSION - 0x4]);
|
||||
|
||||
mvwprintw(win, row++, 2, "Built: %s (%s@%s.%s)",
|
||||
mvwprintw(win, row++, 1, "Built: %s (%s@%s.%s)",
|
||||
cb_info.strings[CB_TAG_BUILD - 0x4],
|
||||
cb_info.strings[CB_TAG_COMPILE_BY - 0x04],
|
||||
cb_info.strings[CB_TAG_COMPILE_HOST - 0x04],
|
||||
cb_info.strings[CB_TAG_COMPILE_DOMAIN - 0x04]);
|
||||
|
||||
if (cb_info.serial.tag != 0x0) {
|
||||
mvwprintw(win, row++, 2, "Serial Port I/O base: 0x%x",
|
||||
mvwprintw(win, row++, 1, "Serial Port I/O base: 0x%x",
|
||||
cb_info.serial.ioport);
|
||||
}
|
||||
|
||||
if (cb_info.console.tag != 0x0) {
|
||||
mvwprintw(win, row++, 2, "Default Output Console: ");
|
||||
mvwprintw(win, row++, 1, "Default Output Console: ");
|
||||
|
||||
switch (cb_info.console.type) {
|
||||
case CB_TAG_CONSOLE_SERIAL8250:
|
||||
|
@ -95,18 +95,18 @@ int coreboot_module_redraw(WINDOW *win)
|
|||
}
|
||||
|
||||
row++;
|
||||
mvwprintw(win, row++, 2, "-- Memory Map --");
|
||||
mvwprintw(win, row++, 1, "-- Memory Map --");
|
||||
|
||||
for (i = 0; i < cb_info.mem_count; i++) {
|
||||
switch (cb_info.range[i].type) {
|
||||
case CB_MEM_RAM:
|
||||
mvwprintw(win, row++, 4, " RAM: ");
|
||||
mvwprintw(win, row++, 3, " RAM: ");
|
||||
break;
|
||||
case CB_MEM_RESERVED:
|
||||
mvwprintw(win, row++, 4, "Reserved: ");
|
||||
mvwprintw(win, row++, 3, "Reserved: ");
|
||||
break;
|
||||
case CB_MEM_TABLE:
|
||||
mvwprintw(win, row++, 4, " Table: ");
|
||||
mvwprintw(win, row++, 3, " Table: ");
|
||||
}
|
||||
|
||||
wprintw(win, "%16.16llx - %16.16llx",
|
||||
|
|
|
@ -26,12 +26,10 @@ extern struct coreinfo_module cpuinfo_module;
|
|||
extern struct coreinfo_module pci_module;
|
||||
extern struct coreinfo_module coreboot_module;
|
||||
|
||||
#define MODULE_COUNT 3
|
||||
|
||||
struct coreinfo_module *modules[MODULE_COUNT] = {
|
||||
struct coreinfo_module *modules[] = {
|
||||
&cpuinfo_module,
|
||||
&pci_module,
|
||||
&coreboot_module
|
||||
&coreboot_module,
|
||||
};
|
||||
|
||||
static WINDOW *modwin;
|
||||
|
@ -61,7 +59,7 @@ static void print_menu(void)
|
|||
for (j = 0; j < SCREEN_X; j++)
|
||||
waddch(stdscr, ' ');
|
||||
|
||||
for (i = 0; i < MODULE_COUNT; i++)
|
||||
for (i = 0; i < ARRAY_SIZE(modules); i++)
|
||||
ptr += sprintf(ptr, "F%d: %s ", i + 1, modules[i]->name);
|
||||
|
||||
mvprintw(23, 0, menu);
|
||||
|
@ -127,7 +125,7 @@ static void loop(void)
|
|||
if (key >= KEY_F(1) && key <= KEY_F(9)) {
|
||||
unsigned char ch = key - KEY_F(1);
|
||||
|
||||
if (ch < MODULE_COUNT) {
|
||||
if (ch < ARRAY_SIZE(modules)) {
|
||||
curwin = ch;
|
||||
redraw_module();
|
||||
continue;
|
||||
|
@ -167,7 +165,7 @@ int main(void)
|
|||
|
||||
refresh();
|
||||
|
||||
for (i = 0; i < MODULE_COUNT; i++)
|
||||
for (i = 0; i < ARRAY_SIZE(modules); i++)
|
||||
modules[i]->init();
|
||||
|
||||
loop();
|
||||
|
|
|
@ -156,7 +156,7 @@ static int pci_module_redraw(WINDOW *win)
|
|||
else
|
||||
wattrset(win, COLOR_PAIR(2));
|
||||
|
||||
mvwprintw(win, 2 + i, 1, "%X:%2.2X.%2.2X %X:%X ",
|
||||
mvwprintw(win, 2 + i, 1, "%X:%2.2X.%2.2X %04X:%04X ",
|
||||
bus, devfn, func,
|
||||
devices[item].id & 0xffff,
|
||||
(devices[item].id >> 16) & 0xffff);
|
||||
|
|
Loading…
Reference in New Issue