Am 18.08.2009 13:26, schrieb Harrison, Jon (SELEX GALILEO, UK):
I really don't have the time or inclination to get into a protracted re-structuring of the code right now, after all the effort it's taken to get to this point. I'm looking for the quick hack option that'll get me up and running again. If I knew how to locate and find the binary data in flash then I could more or less preserve my current infrastructure and worry about making it more coreboot friendly later.
Sure, working code is always better than non-working code :-) You can explicitely copy an optionrom to RAM using cbfs_load_optionrom(vendor, device, destination address); Choose some unused vid/did pair (vendor 0xffff should be a safe choice), add the files using the pci_rom statement in Config.lb, and use that function to load the images to where you want them.
If you need the ROM address of a cbfs file, cbfs_find(filename) is useful, but you'll have to skip over the file's header. Something like: cbfs_file *f = cbfs_find(filename); uchar *romaddr = (char*)f+(f->offset); should do the trick.
Hope this helps, Patrick