]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[comboot] Unhook interrupt vectors after returning from a COMBOOT image
authorMichael Brown <mcb30@etherboot.org>
Tue, 17 Feb 2009 02:03:16 +0000 (02:03 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 17 Feb 2009 02:03:16 +0000 (02:03 +0000)
src/arch/i386/image/com32.c
src/arch/i386/image/comboot.c
src/arch/i386/include/comboot.h
src/arch/i386/interface/syslinux/comboot_call.c

index 3e81f4852fea2c8719b76c946b038a27e81d912e..00f752634c1884e82fc584048b67f46e0cf69a69 100644 (file)
@@ -136,6 +136,7 @@ static int com32_exec ( struct image *image ) {
                break;
        }
 
+       unhook_comboot_interrupts();
        comboot_force_text_mode();
 
        return 0;
index e04526475ae78676be6a30aaaabe56860de3383a..d9b16c5713b96aa4ad605e96d89fa55653a6fc1d 100644 (file)
@@ -205,6 +205,7 @@ static int comboot_exec ( struct image *image ) {
                break;
        }
 
+       unhook_comboot_interrupts();
        comboot_force_text_mode();
 
        return 0;
index 4376650f6b2ae7b3ff0b890e58b3a97c60e18bd5..6b8ea6b6854664ab825a6cb2128a985191c02b29 100644 (file)
@@ -64,6 +64,7 @@ typedef struct {
 } comboot_shuffle_descriptor;
 
 extern void hook_comboot_interrupts ( );
+extern void unhook_comboot_interrupts ( );
 
 /* These are not the correct prototypes, but it doens't matter, 
  * as we only ever get the address of these functions;
index f37aa2ae15618baf39e36d87b9448d1d198342e7..c641c8402baada9f69577d3fbaa4c2ef36d386b4 100644 (file)
@@ -616,3 +616,18 @@ void hook_comboot_interrupts ( ) {
        hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
                              &int22_vector );
 }
+
+/**
+ * Unhook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h)
+ */
+void unhook_comboot_interrupts ( ) {
+
+       unhook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper,
+                               &int20_vector );
+
+       unhook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper,
+                               &int21_vector );
+
+       unhook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
+                               &int22_vector );
+}