diff options
author | Michael Brown | 2016-02-16 17:45:12 +0100 |
---|---|---|
committer | Michael Brown | 2016-02-16 20:32:32 +0100 |
commit | 1a457e933a5e6c61fe08e1a6813f4514978b4c1d (patch) | |
tree | 545472e02bdfa5730fd53214b653f2252a4dd11b /src/arch/i386/transitions/librm_mgmt.c | |
parent | [bios] Allow memmap.c to be compiled for x86_64 (diff) | |
download | ipxe-1a457e933a5e6c61fe08e1a6813f4514978b4c1d.tar.gz ipxe-1a457e933a5e6c61fe08e1a6813f4514978b4c1d.tar.xz ipxe-1a457e933a5e6c61fe08e1a6813f4514978b4c1d.zip |
[bios] Allow librm to be compiled for x86_64
This commit does not make librm functional for x86_64; it merely
allows it to compile without errors.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/transitions/librm_mgmt.c')
-rw-r--r-- | src/arch/i386/transitions/librm_mgmt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/i386/transitions/librm_mgmt.c b/src/arch/i386/transitions/librm_mgmt.c index becb0267..32695ae0 100644 --- a/src/arch/i386/transitions/librm_mgmt.c +++ b/src/arch/i386/transitions/librm_mgmt.c @@ -80,8 +80,8 @@ void set_interrupt_vector ( unsigned int intr, void *vector ) { idte = &idt[intr]; idte->segment = VIRTUAL_CS; idte->attr = ( vector ? ( IDTE_PRESENT | IDTE_TYPE_IRQ32 ) : 0 ); - idte->low = ( ( ( uint32_t ) vector ) & 0xffff ); - idte->high = ( ( ( uint32_t ) vector ) >> 16 ); + idte->low = ( ( ( intptr_t ) vector ) & 0xffff ); + idte->high = ( ( ( intptr_t ) vector ) >> 16 ); } /** @@ -99,8 +99,8 @@ void init_idt ( void ) { vec->movb = MOVB_INSN; vec->intr = intr; vec->jmp = JMP_INSN; - vec->offset = ( ( uint32_t ) interrupt_wrapper - - ( uint32_t ) vec->next ); + vec->offset = ( ( intptr_t ) interrupt_wrapper - + ( intptr_t ) vec->next ); set_interrupt_vector ( intr, vec ); } DBGC ( &intr_vec[0], "INTn vector at %p+%zxn (phys %#lx+%zxn)\n", @@ -132,7 +132,7 @@ static struct profiler * interrupt_profiler ( int intr ) { * * @v intr Interrupt number */ -void __attribute__ (( cdecl, regparm ( 1 ) )) interrupt ( int intr ) { +void __attribute__ (( regparm ( 1 ) )) interrupt ( int intr ) { struct profiler *profiler = interrupt_profiler ( intr ); uint32_t discard_eax; |