[librm] Provide an abstraction wrapper for prot_call

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-02-18 23:23:38 +00:00
parent 196f0f2551
commit 31b5c2e753
20 changed files with 77 additions and 60 deletions

View File

@@ -531,14 +531,12 @@ static void bios_inject_startup ( void ) {
__asm__ __volatile__ (
TEXT16_CODE ( "\nint16_wrapper:\n\t"
"pushfw\n\t"
"cmpb $0, %%cs:bios_inject_lock\n\t"
"cmpb $0, %cs:bios_inject_lock\n\t"
"jnz 1f\n\t"
"pushl %0\n\t"
"call prot_call\n\t"
VIRT_CALL ( bios_inject )
"\n1:\n\t"
"popfw\n\t"
"ljmp *%%cs:int16_vector\n\t" )
: : "i" ( bios_inject ) );
"ljmp *%cs:int16_vector\n\t" ) );
/* Hook INT 16 */
hook_bios_interrupt ( 0x16, ( ( intptr_t ) int16_wrapper ),