Przeglądaj źródła

[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>
tags/v1.20.1
Daniel Wyatt 12 lat temu
rodzic
commit
37ac7a666f
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4
    0
      src/util/Option/ROM.pm

+ 4
- 0
src/util/Option/ROM.pm Wyświetl plik

@@ -180,6 +180,7 @@ our %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
180 180
 
181 181
 use constant JMP_SHORT => 0xeb;
182 182
 use constant JMP_NEAR => 0xe9;
183
+use constant CALL_NEAR => 0xe8;
183 184
 
184 185
 sub pack_init {
185 186
   my $dest = shift;
@@ -203,6 +204,9 @@ sub unpack_init {
203 204
   } elsif ( $jump == JMP_NEAR ) {
204 205
     my $offset = unpack ( "xS", $instr );
205 206
     return ( $offset + 6 );
207
+  } elsif ( $jump == CALL_NEAR ) {
208
+    my $offset = unpack ( "xS", $instr );
209
+    return ( $offset + 6 );
206 210
   } elsif ( $jump == 0 ) {
207 211
     return 0;
208 212
   } else {

Ładowanie…
Anuluj
Zapisz