#endif
};
-void lib_get_sysinfo(void)
+int lib_get_sysinfo(void)
{
+ int ret;
+
/* Get the CPU speed (for delays). */
lib_sysinfo.cpu_khz = get_cpu_speed();
/* Get information from the coreboot tables,
* if they exist */
- get_coreboot_info(&lib_sysinfo);
+ ret = get_coreboot_info(&lib_sysinfo);
if (!lib_sysinfo.n_memranges) {
/* If we can't get a good memory range, use the default. */
lib_sysinfo.memrange[1].size = 31 * 1024 * 1024;
lib_sysinfo.memrange[1].type = CB_MEM_RAM;
}
+
+ return ret;
}
#endif
};
-void lib_get_sysinfo(void)
+int lib_get_sysinfo(void)
{
+ int ret;
+
/* Get the CPU speed (for delays). */
lib_sysinfo.cpu_khz = get_cpu_speed();
/* Get information from the coreboot tables,
* if they exist */
- get_coreboot_info(&lib_sysinfo);
+ ret = get_coreboot_info(&lib_sysinfo);
if (!lib_sysinfo.n_memranges) {
/* If we can't get a good memory range, use the default. */
lib_sysinfo.memrange[1].size = 31 * 1024 * 1024;
lib_sysinfo.memrange[1].type = CB_MEM_RAM;
}
+
+ return ret;
}
int get_coreboot_info(struct sysinfo_t *info);
int get_multiboot_info(struct sysinfo_t *info);
-void lib_get_sysinfo(void);
+int lib_get_sysinfo(void);
/* Timer functions - defined by each architecture. */
unsigned int get_cpu_speed(void);