* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <coreboot_tables.h>
#include "coreinfo.h"
+#include <coreboot_tables.h>
+
+#ifdef CONFIG_MODULE_COREBOOT
#define MAX_MEMORY_COUNT 5
if (cb_info.serial.tag != 0x0) {
mvwprintw(win, row++, 1, "Serial Port I/O base: 0x%x",
- cb_info.serial.ioport);
+ cb_info.serial.baseaddr);
}
if (cb_info.console.tag != 0x0) {
}
wprintw(win, "%16.16llx - %16.16llx",
- UNPACK_CB64(cb_info.range[i].start),
- UNPACK_CB64(cb_info.range[i].start) +
- UNPACK_CB64(cb_info.range[i].size) - 1);
+ cb_unpack64(cb_info.range[i].start),
+ cb_unpack64(cb_info.range[i].start) +
+ cb_unpack64(cb_info.range[i].size) - 1);
}
return 0;
/* FIXME: Check the checksum. */
- if (ipchksum((uint16_t *) header, sizeof(*header)))
+ if (cb_checksum(header, sizeof(*header)))
return -1;
- if (ipchksum((uint16_t *) (ptr + sizeof(*header)), header->table_bytes)
+ if (cb_checksum((ptr + sizeof(*header)), header->table_bytes)
!= header->table_checksum)
return -1;
struct cb_record *rec = (struct cb_record *)ptr;
switch (rec->tag) {
+ case CB_TAG_FORWARD:
+ return parse_header((void *)(unsigned long)((struct cb_forward *)rec)->forward, 1);
+ break;
case CB_TAG_MEMORY:
parse_memory(ptr);
break;
.init = coreboot_module_init,
.redraw = coreboot_module_redraw,
};
+
+#else
+
+struct coreinfo_module coreboot_module = {
+};
+
+#endif