[librm] Provide an abstraction wrapper for prot_call
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -660,34 +660,28 @@ void hook_comboot_interrupts ( ) {
|
||||
|
||||
__asm__ __volatile__ (
|
||||
TEXT16_CODE ( "\nint20_wrapper:\n\t"
|
||||
"pushl %0\n\t"
|
||||
"call prot_call\n\t"
|
||||
VIRT_CALL ( int20 )
|
||||
"clc\n\t"
|
||||
"call patch_cf\n\t"
|
||||
"iret\n\t" )
|
||||
: : "i" ( int20 ) );
|
||||
"iret\n\t" ) );
|
||||
|
||||
hook_bios_interrupt ( 0x20, ( intptr_t ) int20_wrapper, &int20_vector );
|
||||
|
||||
__asm__ __volatile__ (
|
||||
TEXT16_CODE ( "\nint21_wrapper:\n\t"
|
||||
"pushl %0\n\t"
|
||||
"call prot_call\n\t"
|
||||
VIRT_CALL ( int21 )
|
||||
"clc\n\t"
|
||||
"call patch_cf\n\t"
|
||||
"iret\n\t" )
|
||||
: : "i" ( int21 ) );
|
||||
"iret\n\t" ) );
|
||||
|
||||
hook_bios_interrupt ( 0x21, ( intptr_t ) int21_wrapper, &int21_vector );
|
||||
|
||||
__asm__ __volatile__ (
|
||||
TEXT16_CODE ( "\nint22_wrapper:\n\t"
|
||||
"pushl %0\n\t"
|
||||
"call prot_call\n\t"
|
||||
VIRT_CALL ( int22 )
|
||||
"clc\n\t"
|
||||
"call patch_cf\n\t"
|
||||
"iret\n\t" )
|
||||
: : "i" ( int22) );
|
||||
"iret\n\t" ) );
|
||||
|
||||
hook_bios_interrupt ( 0x22, ( intptr_t ) int22_wrapper, &int22_vector );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user