david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

11 Commits

Author SHA1 Message Date
Michael Brown 452aa157be [util] Add ability to dump PCI device ID list
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-13 16:22:35 +01:00
Michael Brown ee0c24902a [util] Use PCI length field to obtain length of individual images
Option::ROM currently uses the initialisation length field (single
byte at offset 0x02) to determine the length of a ROM image within a
multi-image ROM file.  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.  Note that
this does not prevent us from correctly handling ISA ROMs, since ISA
ROMs do not support multiple images within a single ROM BAR anyway.

Inspired-by: Swift Geek <swiftgeek@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-26 15:17:56 +01:00
Michael Brown 69fa494280 [util] Display UNDI ROM header in disrom.pl
Requested-by: Daniel Wyatt <daniel.wyatt@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-15 13:19:16 +01:00
Daniel Wyatt 37ac7a666f [util] Allow for CALL NEAR in the option ROM initialisation entry point
Option::ROM currently understands only JMP NEAR and JMP SHORT
instructions in the initialisation entry point.  At least one Broadcom
option ROM has been observed to use a CALL NEAR instruction.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-15 12:51:47 +01:00
Michael Brown 5de45cd3da [romprefix] Report a pessimistic runtime size estimate
PCI3.0 allows us to report a "runtime size" which can be smaller than
the actual ROM size.  On systems that support PMM our runtime size
will be small (~2.5kB), which helps to conserve the limited option ROM
space.  However, there is no guarantee that the PMM allocation will
succeed, and so we need to report the worst-case runtime size in the
PCI header.

Move the "shrunk ROM size" field from the PCI header to a new "iPXE
ROM header", allowing it to be accessed by ROM-manipulation utilities
such as disrom.pl.

Reported-by: Anton D. Kachalov <mouse@yandex-team.ru>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-23 17:57:40 +01:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown f2e5f8813e [util] Allow Option::ROM to access multiple ROM images
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-12 11:36:20 +01:00
Michael Brown 132c391712 [romprefix] Add .mrom format, allowing loading of large ROMs
Add an infrastructure allowing the prefix to provide an open_payload()
method for obtaining out-of-band access to the whole iPXE image.  Add
a mechanism within this infrastructure that allows raw access to the
expansion ROM BAR by temporarily borrowing an address from a suitable
memory BAR on the same PCI card.

For cards that have a memory BAR that is at least as large as their
expansion ROM BAR, this allows large iPXE ROMs to be supported even on
systems where PMM fails, or where option ROM space pressure makes it
impossible to use PMM shrinking.  The BIOS sees only a stub ROM of
approximately 3kB in size; the remainder (which can be well over 64kB)
is loaded only at the time iPXE is invoked.

As a nice side-effect, an iPXE .mrom image will continue to work even
if its PMM-allocated areas are overwritten between initialisation and
invocation.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-25 16:37:06 +01:00
Michael Brown bd5189a96d [util] Fix interpretation of short jumps in Option::ROM
Option::ROM was assuming that ROM images using a short jump
instruction for the init entry point would have a zero byte at offset
5; this is not necessarily true.
2008-08-27 20:36:30 +01:00
Michael Brown 23bca8f9d8 [util] Allow Option::ROM to understand and modify initialisation entry point
Add support for manipulating the jump instruction that forms the
option ROM initialisation entry point, so that mergerom.pl can treat
it just like other entry points.

Add support for merging the initialisation entry point (and IBM BOFM
table) to mergerom.pl; this is another slightly icky but unfortunately
necessary GPL vs. NDA workaround.  When mergerom.pl replaces an entry
point in the original ROM, it now fills in the corresponding entry
point in the merged ROM with the original value; this allows (for
example) a merged initialisation entry point to do some processing and
then jump back to the original entry point.
2008-08-15 04:10:35 +01:00
Michael Brown 6f73bb5e00 [util] Add Option::ROM library and rewrite disrom.pl to use it.
The Option::ROM module provides an easy way to read and edit fields
within option ROM headers.
2008-07-31 05:30:04 +01:00