Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[comboot] Unhook interrupt vectors after returning from a COMBOOT image
  • Loading branch information
Michael Brown committed Feb 17, 2009
1 parent 14eafc5 commit 7f903f0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/arch/i386/image/com32.c
Expand Up @@ -136,6 +136,7 @@ static int com32_exec ( struct image *image ) {
break;
}

unhook_comboot_interrupts();
comboot_force_text_mode();

return 0;
Expand Down
1 change: 1 addition & 0 deletions src/arch/i386/image/comboot.c
Expand Up @@ -205,6 +205,7 @@ static int comboot_exec ( struct image *image ) {
break;
}

unhook_comboot_interrupts();
comboot_force_text_mode();

return 0;
Expand Down
1 change: 1 addition & 0 deletions src/arch/i386/include/comboot.h
Expand Up @@ -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;
Expand Down
15 changes: 15 additions & 0 deletions src/arch/i386/interface/syslinux/comboot_call.c
Expand Up @@ -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 );
}

0 comments on commit 7f903f0

Please sign in to comment.