summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/interface
diff options
context:
space:
mode:
authorMichael Brown2016-02-16 17:24:30 +0100
committerMichael Brown2016-02-16 20:32:32 +0100
commit15fadab5331f0588eac2d756d680ec65173ca079 (patch)
tree440440723190fc0d49934d285bf04d2257ccb6ca /src/arch/i386/interface
parent[libc] Split rmsetjmp() and rmlongjmp() into a separate rmsetjmp.h (diff)
downloadipxe-15fadab5331f0588eac2d756d680ec65173ca079.tar.gz
ipxe-15fadab5331f0588eac2d756d680ec65173ca079.tar.xz
ipxe-15fadab5331f0588eac2d756d680ec65173ca079.zip
[bios] Use intptr_t when casting .text16 function pointers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/interface')
-rw-r--r--src/arch/i386/interface/pcbios/int13.c5
-rw-r--r--src/arch/i386/interface/pcbios/rtc_entropy.c5
-rw-r--r--src/arch/i386/interface/pxe/pxe_call.c4
-rw-r--r--src/arch/i386/interface/syslinux/comboot_call.c15
4 files changed, 12 insertions, 17 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c
index f0450da90..6ba129218 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 9aab03c03..89b797581 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 414b356d5..dd5f8849c 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 d70340c65..22848006c 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 );
}