diff options
author | Michael Brown | 2012-07-23 18:41:38 +0200 |
---|---|---|
committer | Michael Brown | 2012-07-23 18:57:40 +0200 |
commit | 5de45cd3da2308a6db37fb7c0822c9fdadf00d96 (patch) | |
tree | e33ac06ab9d117ea86644d2362660e84b7727c2f /src/util/disrom.pl | |
parent | [contrib] Fix rom-o-matic git version number issues (diff) | |
download | ipxe-5de45cd3da2308a6db37fb7c0822c9fdadf00d96.tar.gz ipxe-5de45cd3da2308a6db37fb7c0822c9fdadf00d96.tar.xz ipxe-5de45cd3da2308a6db37fb7c0822c9fdadf00d96.zip |
[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>
Diffstat (limited to 'src/util/disrom.pl')
-rwxr-xr-x | src/util/disrom.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/disrom.pl b/src/util/disrom.pl index c133c26a..87138686 100755 --- a/src/util/disrom.pl +++ b/src/util/disrom.pl @@ -85,4 +85,15 @@ do { printf "\n"; } + my $ipxe = $rom->ipxe_header(); + if ( $ipxe ) { + printf "iPXE header:\n\n"; + printf " %-16s 0x%02x (%s0x%02x)\n", "Checksum:", $ipxe->{checksum}, + ( ( $ipxe->checksum == 0 ) ? "" : "INCORRECT: " ), $ipxe->checksum; + printf " %-16s 0x%02x (%d)\n", "Shrunk length:", + $ipxe->{shrunk_length}, ( $ipxe->{shrunk_length} * 512 ); + printf " %-16s 0x%08x\n", "Build ID:", $ipxe->{build_id}; + printf "\n"; + } + } while ( $rom = $rom->next_image ); |