Kaynağa Gözat

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

tags/v0.9.7
Michael Brown 15 yıl önce
ebeveyn
işleme
7f903f03af

+ 1
- 0
src/arch/i386/image/com32.c Dosyayı Görüntüle

@@ -136,6 +136,7 @@ static int com32_exec ( struct image *image ) {
136 136
 		break;
137 137
 	}
138 138
 
139
+	unhook_comboot_interrupts();
139 140
 	comboot_force_text_mode();
140 141
 
141 142
 	return 0;

+ 1
- 0
src/arch/i386/image/comboot.c Dosyayı Görüntüle

@@ -205,6 +205,7 @@ static int comboot_exec ( struct image *image ) {
205 205
 		break;
206 206
 	}
207 207
 
208
+	unhook_comboot_interrupts();
208 209
 	comboot_force_text_mode();
209 210
 
210 211
 	return 0;

+ 1
- 0
src/arch/i386/include/comboot.h Dosyayı Görüntüle

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

+ 15
- 0
src/arch/i386/interface/syslinux/comboot_call.c Dosyayı Görüntüle

@@ -616,3 +616,18 @@ void hook_comboot_interrupts ( ) {
616 616
 	hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper,
617 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…
İptal
Kaydet