Procházet zdrojové kódy

[pxe] Check for unhookable interrupts in PXENV_STOP_UNDI

PXENV_STOP_UNDI should return PXENV_STATUS_KEEP_UNDI if the UNDI
cannot be safely unloaded (e.g. due to interrupt vectors that could
not be unhooked).
tags/v0.9.8
Michael Brown před 15 roky
rodič
revize
ee1d315ac0
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9
    0
      src/arch/i386/interface/pxe/pxe_preboot.c

+ 9
- 0
src/arch/i386/interface/pxe/pxe_preboot.c Zobrazit soubor

37
 #include <gpxe/init.h>
37
 #include <gpxe/init.h>
38
 #include <gpxe/if_ether.h>
38
 #include <gpxe/if_ether.h>
39
 #include <basemem_packet.h>
39
 #include <basemem_packet.h>
40
+#include <biosint.h>
40
 #include "pxe.h"
41
 #include "pxe.h"
41
 #include "pxe_call.h"
42
 #include "pxe_call.h"
42
 
43
 
316
 	/* Prepare for unload */
317
 	/* Prepare for unload */
317
 	shutdown ( SHUTDOWN_BOOT );
318
 	shutdown ( SHUTDOWN_BOOT );
318
 
319
 
320
+	/* Check to see if we still have any hooked interrupts */
321
+	if ( hooked_bios_interrupts != 0 ) {
322
+		DBG ( "PXENV_STOP_UNDI failed: %d interrupts still hooked\n",
323
+		      hooked_bios_interrupts );
324
+		stop_undi->Status = PXENV_STATUS_KEEP_UNDI;
325
+		return PXENV_EXIT_FAILURE;
326
+	}
327
+
319
 	stop_undi->Status = PXENV_STATUS_SUCCESS;
328
 	stop_undi->Status = PXENV_STATUS_SUCCESS;
320
 	return PXENV_EXIT_SUCCESS;
329
 	return PXENV_EXIT_SUCCESS;
321
 }
330
 }

Načítá se…
Zrušit
Uložit