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>
use constant JMP_SHORT => 0xeb;
use constant JMP_NEAR => 0xe9;
+use constant CALL_NEAR => 0xe8;
sub pack_init {
my $dest = shift;
} elsif ( $jump == JMP_NEAR ) {
my $offset = unpack ( "xS", $instr );
return ( $offset + 6 );
+ } elsif ( $jump == CALL_NEAR ) {
+ my $offset = unpack ( "xS", $instr );
+ return ( $offset + 6 );
} elsif ( $jump == 0 ) {
return 0;
} else {