summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorDaniel Wyatt2012-08-15 13:50:01 +0200
committerMichael Brown2012-08-15 13:51:47 +0200
commit37ac7a666fbb28f50cdd64e1df1428c266f60629 (patch)
tree33c0f94bf7ff4365de1ade89ee52f5914327f8a5 /src/util
parent[comboot] Accept only ".cbt" as an extension for COMBOOT images (diff)
downloadipxe-37ac7a666fbb28f50cdd64e1df1428c266f60629.tar.gz
ipxe-37ac7a666fbb28f50cdd64e1df1428c266f60629.tar.xz
ipxe-37ac7a666fbb28f50cdd64e1df1428c266f60629.zip
[util] Allow for CALL NEAR in the option ROM initialisation entry point
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>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Option/ROM.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/Option/ROM.pm b/src/util/Option/ROM.pm
index 82d65426..bf704cad 100644
--- a/src/util/Option/ROM.pm
+++ b/src/util/Option/ROM.pm
@@ -180,6 +180,7 @@ our %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
use constant JMP_SHORT => 0xeb;
use constant JMP_NEAR => 0xe9;
+use constant CALL_NEAR => 0xe8;
sub pack_init {
my $dest = shift;
@@ -203,6 +204,9 @@ sub unpack_init {
} 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 {