memcpy((void*)bios_table_cur_addr, pos, length);
struct mptable_floating_s *newp = (void*)bios_table_cur_addr;
newp->physaddr = bios_table_cur_addr + length;
- newp->checksum = 0;
- newp->checksum = -checksum(newp, sizeof(*newp));
+ newp->checksum -= checksum(newp, sizeof(*newp));
memcpy((void*)bios_table_cur_addr + length, (void*)p->physaddr, mpclength);
bios_table_cur_addr += length + mpclength;
}
#define MEM_RANGE_COUNT(_rec) \
(((_rec)->size - sizeof(*(_rec))) / sizeof((_rec)->map[0]))
+struct cb_mainboard {
+ u32 tag;
+ u32 size;
+ u8 vendor_idx;
+ u8 part_idx;
+ char strings[0];
+};
+
+#define CB_TAG_MAINBOARD 0x0003
+
struct cb_forward {
u32 tag;
u32 size;
// smbios/dmi table is found from coreboot and use that instead.
smbios_init();
+ struct cb_mainboard *cbmb = find_cb_subtable(cbh, CB_TAG_MAINBOARD);
+ if (cbmb) {
+ const char *vendor = &cbmb->strings[cbmb->vendor_idx];
+ const char *part = &cbmb->strings[cbmb->part_idx];
+ dprintf(1, "Found mainboard %s %s\n", vendor, part);
+
+ vgahook_setup(vendor, part);
+ }
+
return;
fail:
// Copy the next file with the given prefix - starting at pos 'last'.
struct cbfs_file *
-cbfs_copyfile_prefix(void *dst, u32 maxlen, char *prefix
+cbfs_copyfile_prefix(void *dst, u32 maxlen, const char *prefix
, struct cbfs_file *last)
{
if (! CONFIG_COREBOOT_FLASH)