[mromprefix] Use PCI length field to obtain length of individual images
authorMichael Brown <mcb30@ipxe.org>
Tue, 26 Aug 2014 11:29:54 +0000 (12:29 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 26 Aug 2014 14:17:56 +0000 (15:17 +0100)
commit3937274cfbde767ff07e839c5b45a21a0b248148
tree63618b96512063981aaf444354c29a363ce95de3
parentee0c24902a07c78ed939dfeee3b32f1c7a633ebb
[mromprefix] Use PCI length field to obtain length of individual images

mromprefix.S currently uses the initialisation length field (single
byte at offset 0x02) to determine the length of a ROM image within a
multi-image ROM BAR.  For PCI ROM images with a code type other than
0, the initialisation length field may not be present.

Fix by using the PCI header's image length field instead.

Inspired-by: Swift Geek <swiftgeek@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/prefix/mromprefix.S