mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
[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>
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user