This fixes a bug in romfs code; see comment. If we add the pci rom
authorRonald G. Minnich <rminnich@gmail.com>
Mon, 6 Apr 2009 23:28:22 +0000 (23:28 +0000)
committerRonald G. Minnich <rminnich@gmail.com>
Mon, 6 Apr 2009 23:28:22 +0000 (23:28 +0000)
to romfs for qemu,we get this:
Check pci1013,00b8.rom
found it, @ fff99698, first word is e946aa55
In cbfs, rom address for PCI: 00:02.0 = 0
On mainboard, rom address for PCI: 00:02.0 = fff99698
copying VGA ROM Image from fff99698 to 0xc0000, 0x8c00 bytes

This is sort of OK, excpet that when it gets to payload time, the
system explodes. I suspect that copy is kind of a problem.

But this is a pretty important bug fix so in it goes.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4079 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/lib/romfs.c

index b95b5e239032b8ea8f731689aa7d17593b7f4207..6c638cec7b0654c6864e40c8429ca388acfe7a88 100644 (file)
@@ -151,7 +151,8 @@ void *romfs_load_optionrom(u16 vendor, u16 device, void * dest)
         * return a pointer to it. 
         */
 
-       src = ((unsigned char *) orom) + sizeof(struct romfs_optionrom);
+       /* BUG: the romtool is (not yet) including a romfs_optionrom header */
+       src = ((unsigned char *) orom); // + sizeof(struct romfs_optionrom);
 
        if (! dest)
                return src;