summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2009-06-28 21:12:16 +0200
committerMichael Brown2009-06-28 21:12:16 +0200
commitee1d315ac06d6fa0dcc95cbd54ee264e838d1b6b (patch)
tree60b212cb75dd60c0fa90cb879b1e7ba27624e954 /src/arch
parent[pxe] Create pxe_[de]activate() wrapper functions (diff)
downloadipxe-ee1d315ac06d6fa0dcc95cbd54ee264e838d1b6b.tar.gz
ipxe-ee1d315ac06d6fa0dcc95cbd54ee264e838d1b6b.tar.xz
ipxe-ee1d315ac06d6fa0dcc95cbd54ee264e838d1b6b.zip
[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).
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/interface/pxe/pxe_preboot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_preboot.c b/src/arch/i386/interface/pxe/pxe_preboot.c
index 21461a5a..3939c7bf 100644
--- a/src/arch/i386/interface/pxe/pxe_preboot.c
+++ b/src/arch/i386/interface/pxe/pxe_preboot.c
@@ -37,6 +37,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <gpxe/init.h>
#include <gpxe/if_ether.h>
#include <basemem_packet.h>
+#include <biosint.h>
#include "pxe.h"
#include "pxe_call.h"
@@ -316,6 +317,14 @@ PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
/* Prepare for unload */
shutdown ( SHUTDOWN_BOOT );
+ /* Check to see if we still have any hooked interrupts */
+ if ( hooked_bios_interrupts != 0 ) {
+ DBG ( "PXENV_STOP_UNDI failed: %d interrupts still hooked\n",
+ hooked_bios_interrupts );
+ stop_undi->Status = PXENV_STATUS_KEEP_UNDI;
+ return PXENV_EXIT_FAILURE;
+ }
+
stop_undi->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}