On Tue, Jan 13, 2009 at 11:52:23AM +1100, Timothy S. Nelson wrote: > On Mon, 12 Jan 2009, Michael Ellerman wrote: > >> And as far as the message, is the content really invalid? The comment >> says "standard PCI ROMs" start with "55 AA", which makes it sound like >> that's a normal value to find. > > Thanks for all your help; I agree with pretty much everything you've said, > except this. According to the Mindshare book on PCI, the ROM header always > begins with the bytes 0x55 0xAA. It describes them as "ROM Signature byte > 1" and "ROM Signature byte 2". You'll note that at this point in the code: > - image = rom, therefore image - rom = 0 > - The code breaks out of the loop at this point > - The return value will hence be 0, which (according to previous > discussion on this list) indicates an error. > > So, basically, if it doesn't find 0x55, it returns an error. Should > future ROMs not begin with 0x55, the code will need to be modified anyway, > so there's no reason not to put something there. But I agree that the > "Invalid ROM" message would be sufficient at that point, and the pci-sysfs > stuff should go elsewhere. What about other architectures? PARISC has a few cards that provide native "IODC" in ROM. I no longer have access to the documentation that describes the ROM format. And I know it was only a few cards - the rest had their IODC in the system FW (aka BIOS). Does OpenFirmware have a signature? Same signature? I don't know which PCI cards would have OpenFirmware. If someone else does, this would be a good time to share. :) thanks, grant -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html