LIBPAYLOAD = ../libpayload/libpayload.a
LIBGCC := $(shell $(CC) $(CROSS_CFLAGS) -print-libgcc-file-name)
-CFLAGS := -Werror -Os -fno-stack-protector -nostdinc $(INCLUDES)
+CFLAGS := -Wall -Werror -Os -fno-stack-protector -nostdinc $(INCLUDES)
MODULES = cpuinfo_module.o cpuid.o pci_module.o coreboot_module.o
OBJECTS = coreinfo.o
UNPACK_CB64(cb_info.range[i].start) +
UNPACK_CB64(cb_info.range[i].size) - 1);
}
+
+ return 0;
}
static void parse_memory(unsigned char *ptr)
{
struct cb_mainboard *mb = (struct cb_mainboard *)ptr;
- strncpy(cb_info.vendor, MB_VENDOR_STRING(mb), 31);
- strncpy(cb_info.part, MB_PART_STRING(mb), 31);
+ strncpy(cb_info.vendor, (const char *)MB_VENDOR_STRING(mb), 31);
+ strncpy(cb_info.part, (const char *)MB_PART_STRING(mb), 31);
}
static void parse_strings(unsigned char *ptr)
struct cb_string *string = (struct cb_string *)ptr;
int index = string->tag - CB_TAG_VERSION;
- strncpy(cb_info.strings[index], string->string, 63);
+ strncpy(cb_info.strings[index], (const char *)string->string, 63);
cb_info.strings[index][63] = 0;
}
for (i = 0; i < len; i += 16, ptr += 16) {
header = (struct cb_header *)ptr;
- if (!strncmp(header->signature, "LBIO", 4))
+ if (!strncmp((const char *)header->signature, "LBIO", 4))
break;
}
void print_menu(void)
{
- int i, j, len;
+ int i, j;
char menu[80];
char *ptr = menu;
refresh();
}
-int loop(void)
+void loop(void)
{
int key;
modules[i]->init();
loop();
+
+ return 0;
}
void decode_flags(WINDOW *win, unsigned long reg, const char **flags, int *row)
{
- int index = 0;
int i;
int lrow = *row;
static void get_features(WINDOW *win, int *row)
{
unsigned long eax, ebx, ecx, edx;
- int index = 0;
int lrow = *row;
wmove(win, lrow++, 1);
static void do_name(WINDOW *win, int row)
{
- char str[80], name[49], *p;
+ char name[49], *p;
unsigned long eax, ebx, ecx, edx;
int i, t;
mvwprintw(win, row, 1, "Processor: %s", name);
}
-int cpuinfo_module_redraw(WINDOW * win)
+int cpuinfo_module_redraw(WINDOW *win)
{
unsigned long eax, ebx, ecx, edx;
unsigned int brand;
- char str[80], *vstr;
+ char *vstr;
int row = 2;
print_module_title(win, "CPU Information");
break;
case VENDOR_SIS:
vstr = "SiS";
+ break;
+ default:
+ vstr = "Unknown";
+ break;
}
mvwprintw(win, row++, 1, "Vendor: %s", vstr);
row++;
get_features(win, &row);
+
+ return 0;
}
unsigned int getticks(void)
int cpuinfo_module_init(void)
{
cpu_khz = getticks();
+ return 0;
}
struct coreinfo_module cpuinfo_module = {
*val = inb(0xcfc + (reg & 3));
}
-static int show_config_space(WINDOW *win, int row, int col, int index)
+static void show_config_space(WINDOW *win, int row, int col, int index)
{
unsigned char cspace[64];
int bus, devfn;
devfn = devices[index].device & 0xff;
for (i = 0; i < 64; i += 4)
- pci_read_dword(bus, devfn, i, ((int *)&cspace[i]));
+ pci_read_dword(bus, devfn, i, ((unsigned int *)&cspace[i]));
for (y = 0; y < 4; y++) {
for (x = 0; x < 16; x++)
int pci_module_init(void)
{
- unsigned int val;
- int bus = 0;
-
pci_scan_bus(0);
-
return 0;
}