From b3b7db777df142e98827c61b528c0daf3877488b Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 6 Apr 2009 23:28:22 +0000 Subject: This fixes a bug in romfs code; see comment. If we add the pci rom 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 Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4079 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/lib/romfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/romfs.c b/src/lib/romfs.c index b95b5e2390..6c638cec7b 100644 --- a/src/lib/romfs.c +++ b/src/lib/romfs.c @@ -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; -- cgit v1.2.3