[util] Add support for EFI ROM images

The Option::ROM module recognizes and checks EFI header of image.  The
disrom.pl utility dumps this header if is present.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Petr Borsodi
2019-01-21 11:58:02 +00:00
committed by Michael Brown
parent 3f4c179a14
commit de4565cbe7
2 changed files with 78 additions and 1 deletions
+13
View File
@@ -51,6 +51,19 @@ do {
printf " %-16s 0x%04x\n", "PnP header:", $rom->{pnp_header} if ( exists $rom->{pnp_header} );
printf "\n";
my $efi = $rom->efi_header();
if ( $efi ) {
printf "EFI header:\n\n";
printf " %-16s 0x%04x (%d)\n", "Init size:",
$efi->{init_size}, ( $efi->{init_size} * 512 );
printf " %-16s 0x%08x\n", "EFI Signature:", $efi->{efi_signature};
printf " %-16s 0x%04x\n", "EFI Subsystem:", $efi->{efi_subsystem};
printf " %-16s 0x%04x\n", "EFI Machine type:", $efi->{efi_machine_type};
printf " %-16s 0x%04x\n", "Compression type:", $efi->{compression_type};
printf " %-16s 0x%04x\n", "EFI Image offset:", $efi->{efi_image_offset};
printf "\n";
}
my $pci = $rom->pci_header();
if ( $pci ) {
printf "PCI header:\n\n";