Explorar el Código

[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 hace 12 años
padre
commit
37ac7a666f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      src/util/Option/ROM.pm

+ 4
- 0
src/util/Option/ROM.pm Ver fichero

@@ -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 {

Loading…
Cancelar
Guardar