memcpy(00000518, 0010d91c, c)
I have no idea why 12. I reverted it.
It turns out that option_table is actually a struct cmos_option_table in the header file.
Here's a better fix:
Index: src/arch/i386/boot/coreboot_table.c =================================================================== --- src/arch/i386/boot/coreboot_table.c (revision 4933) +++ src/arch/i386/boot/coreboot_table.c (working copy) @@ -485,11 +485,12 @@
#if (CONFIG_HAVE_OPTION_TABLE == 1) { - struct lb_record *rec_dest, *rec_src; - /* Write the option config table... */ + struct lb_record *rec_dest; + struct cmos_option_table *ct = &option_table; + /* Copy the option config table, it's already a lb_record... */ rec_dest = lb_new_record(head); - rec_src = (struct lb_record *)(void *)&option_table; - memcpy(rec_dest, rec_src, rec_src->size); + printk_debug("memcpy(%p, %p, %x)\n",rec_dest, &option_table, ct->size); + memcpy(rec_dest, &option_table, ct->size); /* Create cmos checksum entry in coreboot table */ lb_cmos_checksum(head); }
Here's the output, which is correct: memcpy(00000518, 0010dc18, 488)
If it gets an ack, I'll take out the printk before committing.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles