Browse Source

[comboot] Unhook interrupt vectors after returning from a COMBOOT image

tags/v0.9.7
Michael Brown 15 years ago
parent
commit
7f903f03af

+ 1
- 0
src/arch/i386/image/com32.c View File

136
 		break;
136
 		break;
137
 	}
137
 	}
138
 
138
 
139
+	unhook_comboot_interrupts();
139
 	comboot_force_text_mode();
140
 	comboot_force_text_mode();
140
 
141
 
141
 	return 0;
142
 	return 0;

+ 1
- 0
src/arch/i386/image/comboot.c View File

205
 		break;
205
 		break;
206
 	}
206
 	}
207
 
207
 
208
+	unhook_comboot_interrupts();
208
 	comboot_force_text_mode();
209
 	comboot_force_text_mode();
209
 
210
 
210
 	return 0;
211
 	return 0;

+ 1
- 0
src/arch/i386/include/comboot.h View File

64
 } comboot_shuffle_descriptor;
64
 } comboot_shuffle_descriptor;
65
 
65
 
66
 extern void hook_comboot_interrupts ( );
66
 extern void hook_comboot_interrupts ( );
67
+extern void unhook_comboot_interrupts ( );
67
 
68
 
68
 /* These are not the correct prototypes, but it doens't matter, 
69
 /* These are not the correct prototypes, but it doens't matter, 
69
  * as we only ever get the address of these functions;
70
  * as we only ever get the address of these functions;

+ 15
- 0
src/arch/i386/interface/syslinux/comboot_call.c View File

616
 	hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
616
 	hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
617
 	                      &int22_vector );
617
 	                      &int22_vector );
618
 }
618
 }
619
+
620
+/**
621
+ * Unhook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h)
622
+ */
623
+void unhook_comboot_interrupts ( ) {
624
+
625
+	unhook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper,
626
+				&int20_vector );
627
+
628
+	unhook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper,
629
+				&int21_vector );
630
+
631
+	unhook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
632
+				&int22_vector );
633
+}

Loading…
Cancel
Save