[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:
@@ -32,6 +32,7 @@ foreach my $romfile ( @romfiles ) {
|
||||
my $image = $rom;
|
||||
while ( $image ) {
|
||||
$image->pnp_header->fix_checksum() if $image->pnp_header;
|
||||
$image->ipxe_header->fix_checksum() if $image->ipxe_header;
|
||||
$image->fix_checksum();
|
||||
$image = $image->next_image();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user