diff --git a/src/arch/i386/drivers/net/undinet.c b/src/arch/i386/drivers/net/undinet.c index 6450665f..e273ae0a 100644 --- a/src/arch/i386/drivers/net/undinet.c +++ b/src/arch/i386/drivers/net/undinet.c @@ -143,8 +143,7 @@ static void undinet_hook_isr ( unsigned int irq ) { assert ( undiisr_irq == 0 ); undiisr_irq = irq; - hook_bios_interrupt ( IRQ_INT ( irq ), - ( ( unsigned int ) undiisr ), + hook_bios_interrupt ( IRQ_INT ( irq ), ( ( intptr_t ) undiisr ), &undiisr_next_handler ); } @@ -157,8 +156,7 @@ static void undinet_unhook_isr ( unsigned int irq ) { assert ( irq <= IRQ_MAX ); - unhook_bios_interrupt ( IRQ_INT ( irq ), - ( ( unsigned int ) undiisr ), + unhook_bios_interrupt ( IRQ_INT ( irq ), ( ( intptr_t ) undiisr ), &undiisr_next_handler ); undiisr_irq = 0; } diff --git a/src/arch/i386/firmware/pcbios/bios_console.c b/src/arch/i386/firmware/pcbios/bios_console.c index 2e252ecb..ee6cdce2 100644 --- a/src/arch/i386/firmware/pcbios/bios_console.c +++ b/src/arch/i386/firmware/pcbios/bios_console.c @@ -543,7 +543,7 @@ static void bios_inject_startup ( void ) { : : "i" ( bios_inject ) ); /* Hook INT 16 */ - hook_bios_interrupt ( 0x16, ( ( unsigned int ) int16_wrapper ), + hook_bios_interrupt ( 0x16, ( ( intptr_t ) int16_wrapper ), &int16_vector ); } @@ -555,7 +555,7 @@ static void bios_inject_startup ( void ) { static void bios_inject_shutdown ( int booting __unused ) { /* Unhook INT 16 */ - unhook_bios_interrupt ( 0x16, ( ( unsigned int ) int16_wrapper ), + unhook_bios_interrupt ( 0x16, ( ( intptr_t ) int16_wrapper ), &int16_vector ); } diff --git a/src/arch/i386/firmware/pcbios/fakee820.c b/src/arch/i386/firmware/pcbios/fakee820.c index 15f4d772..8b083c4f 100644 --- a/src/arch/i386/firmware/pcbios/fakee820.c +++ b/src/arch/i386/firmware/pcbios/fakee820.c @@ -88,11 +88,11 @@ void fake_e820 ( void ) { "ljmp *%%cs:real_int15_vector\n\t" ) : : "i" ( sizeof ( e820map ) ) ); - hook_bios_interrupt ( 0x15, ( unsigned int ) int15_fakee820, + hook_bios_interrupt ( 0x15, ( intptr_t ) int15_fakee820, &real_int15_vector ); } void unfake_e820 ( void ) { - unhook_bios_interrupt ( 0x15, ( unsigned int ) int15_fakee820, + unhook_bios_interrupt ( 0x15, ( intptr_t ) int15_fakee820, &real_int15_vector ); } diff --git a/src/arch/i386/firmware/pcbios/hidemem.c b/src/arch/i386/firmware/pcbios/hidemem.c index 253c601f..9f9e4f5f 100644 --- a/src/arch/i386/firmware/pcbios/hidemem.c +++ b/src/arch/i386/firmware/pcbios/hidemem.c @@ -179,8 +179,7 @@ static void hide_etherboot ( void ) { } /* Hook INT 15 */ - hook_bios_interrupt ( 0x15, ( unsigned int ) int15, - &int15_vector ); + hook_bios_interrupt ( 0x15, ( intptr_t ) int15, &int15_vector ); /* Dump memory map after mangling */ DBG ( "Hidden iPXE from system memory map\n" ); @@ -210,7 +209,7 @@ static void unhide_etherboot ( int flags __unused ) { } /* Try to unhook INT 15 */ - if ( ( rc = unhook_bios_interrupt ( 0x15, ( unsigned int ) int15, + if ( ( rc = unhook_bios_interrupt ( 0x15, ( intptr_t ) int15, &int15_vector ) ) != 0 ) { DBG ( "Cannot unhook INT15: %s\n", strerror ( rc ) ); /* Leave it hooked; there's nothing else we can do, diff --git a/src/arch/i386/image/bootsector.c b/src/arch/i386/image/bootsector.c index dba87613..67dad04f 100644 --- a/src/arch/i386/image/bootsector.c +++ b/src/arch/i386/image/bootsector.c @@ -71,9 +71,9 @@ int call_bootsector ( unsigned int segment, unsigned int offset, DBG ( "Booting from boot sector at %04x:%04x\n", segment, offset ); /* Hook INTs 18 and 19 to capture failure paths */ - hook_bios_interrupt ( 0x18, ( unsigned int ) bootsector_exec_fail, + hook_bios_interrupt ( 0x18, ( intptr_t ) bootsector_exec_fail, &int18_vector ); - hook_bios_interrupt ( 0x19, ( unsigned int ) bootsector_exec_fail, + hook_bios_interrupt ( 0x19, ( intptr_t ) bootsector_exec_fail, &int19_vector ); /* Boot the loaded sector @@ -132,9 +132,9 @@ int call_bootsector ( unsigned int segment, unsigned int offset, DBG ( "Booted disk returned via INT 18 or 19\n" ); /* Unhook INTs 18 and 19 */ - unhook_bios_interrupt ( 0x18, ( unsigned int ) bootsector_exec_fail, + unhook_bios_interrupt ( 0x18, ( intptr_t ) bootsector_exec_fail, &int18_vector ); - unhook_bios_interrupt ( 0x19, ( unsigned int ) bootsector_exec_fail, + unhook_bios_interrupt ( 0x19, ( intptr_t ) bootsector_exec_fail, &int19_vector ); return -ECANCELED; diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c index f0450da9..6ba12921 100644 --- a/src/arch/i386/interface/pcbios/int13.c +++ b/src/arch/i386/interface/pcbios/int13.c @@ -1516,15 +1516,14 @@ static void int13_hook_vector ( void ) { "iret\n\t" ) : : "i" ( int13 ) ); - hook_bios_interrupt ( 0x13, ( unsigned int ) int13_wrapper, - &int13_vector ); + hook_bios_interrupt ( 0x13, ( intptr_t ) int13_wrapper, &int13_vector ); } /** * Unhook INT 13 handler */ static void int13_unhook_vector ( void ) { - unhook_bios_interrupt ( 0x13, ( unsigned int ) int13_wrapper, + unhook_bios_interrupt ( 0x13, ( intptr_t ) int13_wrapper, &int13_vector ); } diff --git a/src/arch/i386/interface/pcbios/rtc_entropy.c b/src/arch/i386/interface/pcbios/rtc_entropy.c index 9aab03c0..89b79758 100644 --- a/src/arch/i386/interface/pcbios/rtc_entropy.c +++ b/src/arch/i386/interface/pcbios/rtc_entropy.c @@ -77,8 +77,7 @@ static void rtc_hook_isr ( void ) { "i" ( CMOS_ADDRESS ), "i" ( CMOS_DATA ), "i" ( RTC_STATUS_C ) ); - hook_bios_interrupt ( RTC_INT, ( unsigned int ) rtc_isr, - &rtc_old_handler ); + hook_bios_interrupt ( RTC_INT, ( intptr_t ) rtc_isr, &rtc_old_handler ); } /** @@ -88,7 +87,7 @@ static void rtc_hook_isr ( void ) { static void rtc_unhook_isr ( void ) { int rc; - rc = unhook_bios_interrupt ( RTC_INT, ( unsigned int ) rtc_isr, + rc = unhook_bios_interrupt ( RTC_INT, ( intptr_t ) rtc_isr, &rtc_old_handler ); assert ( rc == 0 ); /* Should always be able to unhook */ } diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c index 414b356d..dd5f8849 100644 --- a/src/arch/i386/interface/pxe/pxe_call.c +++ b/src/arch/i386/interface/pxe/pxe_call.c @@ -278,7 +278,7 @@ void pxe_activate ( struct net_device *netdev ) { /* Ensure INT 1A is hooked */ if ( ! int_1a_hooked ) { - hook_bios_interrupt ( 0x1a, ( unsigned int ) pxe_int_1a, + hook_bios_interrupt ( 0x1a, ( intptr_t ) pxe_int_1a, &pxe_int_1a_vector ); devices_get(); int_1a_hooked = 1; @@ -311,7 +311,7 @@ int pxe_deactivate ( void ) { /* Ensure INT 1A is unhooked, if possible */ if ( int_1a_hooked ) { if ( ( rc = unhook_bios_interrupt ( 0x1a, - (unsigned int) pxe_int_1a, + ( intptr_t ) pxe_int_1a, &pxe_int_1a_vector ))!= 0){ DBGC ( &pxe_netdev, "PXE could not unhook INT 1A: %s\n", strerror ( rc ) ); diff --git a/src/arch/i386/interface/syslinux/comboot_call.c b/src/arch/i386/interface/syslinux/comboot_call.c index d70340c6..22848006 100644 --- a/src/arch/i386/interface/syslinux/comboot_call.c +++ b/src/arch/i386/interface/syslinux/comboot_call.c @@ -668,8 +668,7 @@ void hook_comboot_interrupts ( ) { "iret\n\t" ) : : "i" ( int20 ) ); - hook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper, - &int20_vector ); + hook_bios_interrupt ( 0x20, ( intptr_t ) int20_wrapper, &int20_vector ); __asm__ __volatile__ ( TEXT16_CODE ( "\nint21_wrapper:\n\t" @@ -681,8 +680,7 @@ void hook_comboot_interrupts ( ) { "iret\n\t" ) : : "i" ( int21 ) ); - hook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper, - &int21_vector ); + hook_bios_interrupt ( 0x21, ( intptr_t ) int21_wrapper, &int21_vector ); __asm__ __volatile__ ( TEXT16_CODE ( "\nint22_wrapper:\n\t" @@ -694,8 +692,7 @@ void hook_comboot_interrupts ( ) { "iret\n\t" ) : : "i" ( int22) ); - hook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper, - &int22_vector ); + hook_bios_interrupt ( 0x22, ( intptr_t ) int22_wrapper, &int22_vector ); } /** @@ -703,13 +700,13 @@ void hook_comboot_interrupts ( ) { */ void unhook_comboot_interrupts ( ) { - unhook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper, + unhook_bios_interrupt ( 0x20, ( intptr_t ) int20_wrapper, &int20_vector ); - unhook_bios_interrupt ( 0x21, ( unsigned int ) int21_wrapper, + unhook_bios_interrupt ( 0x21, ( intptr_t ) int21_wrapper, &int21_vector ); - unhook_bios_interrupt ( 0x22, ( unsigned int ) int22_wrapper, + unhook_bios_interrupt ( 0x22, ( intptr_t ) int22_wrapper, &int22_vector ); }