Signed-off-by: Kevin O'Connor kevin@koconnor.net --- src/boot.c | 4 ++-- src/optionroms.c | 2 +- src/resume.c | 2 +- src/romlayout.S | 18 +++++++++--------- src/stacks.c | 4 ++-- src/util.c | 12 ++++++------ src/util.h | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/boot.c b/src/boot.c index 91663a2..3f6375b 100644 --- a/src/boot.c +++ b/src/boot.c @@ -530,7 +530,7 @@ call_boot_entry(struct segoff_s bootsegip, u8 bootdrv) // Set the magic number in ax and the boot drive in dl. br.dl = bootdrv; br.ax = 0xaa55; - call16(&br); + farcall16(&br); }
// Boot from a disk (either floppy or harddrive) @@ -633,7 +633,7 @@ boot_fail(void) struct bregs br; memset(&br, 0, sizeof(br)); br.code = SEGOFF(SEG_BIOS, (u32)reset_vector); - call16big(&br); + farcall16big(&br); }
// Determine next boot method and attempt a boot using it. diff --git a/src/optionroms.c b/src/optionroms.c index d5783b9..bd2f977 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -38,7 +38,7 @@ __callrom(struct rom_header *rom, u16 offset, u16 bdf) br.di = get_pnp_offset(); br.code = SEGOFF(seg, offset); start_preempt(); - call16big(&br); + farcall16big(&br); finish_preempt();
debug_serial_setup(); diff --git a/src/resume.c b/src/resume.c index 911ad96..f1a96ac 100644 --- a/src/resume.c +++ b/src/resume.c @@ -120,7 +120,7 @@ s3_resume(void) memset(&br, 0, sizeof(br)); dprintf(1, "Jump to resume vector (%x)\n", s3_resume_vector); br.code = FLATPTR_TO_SEGOFF((void*)s3_resume_vector); - call16big(&br); + farcall16big(&br); }
// Attempt to invoke a hard-reboot. diff --git a/src/romlayout.S b/src/romlayout.S index c95e8bc..666f763 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -127,11 +127,11 @@ transition16big: movl %ecx, %eax jmpl *%edx
-// Call a 16bit function from 16bit mode with a specified cpu register state +// Far call a 16bit function from 16bit mode with a specified cpu register state // %eax = address of struct bregs // Clobbers: %e[bcd]x, %e[ds]i, flags - DECLFUNC __call16 -__call16: + DECLFUNC __farcall16 +__farcall16: // Save %eax, %ebp pushl %ebp pushl %eax @@ -183,22 +183,22 @@ __call16:
retl
-// Call a 16bit function from 32bit mode. +// Far call a 16bit function from 32bit mode. // %eax = address of struct bregs // Clobbers: %e[bcd]x, %e[ds]i, flags, segment registers, idt/gdt - DECLFUNC __call16_from32 - .global __call16big_from32 + DECLFUNC __farcall16_from32 + .global __farcall16big_from32 .code32 -__call16_from32: +__farcall16_from32: movl $1f, %edx jmp transition16 -__call16big_from32: +__farcall16big_from32: movl $1f, %edx jmp transition16big
// Make call. .code16gcc -1: calll __call16 +1: calll __farcall16 // Return via transition32 movl $(2f + BUILD_BIOS_ADDR), %edx jmp transition32 diff --git a/src/stacks.c b/src/stacks.c index 7b29b8e..48512b0 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -114,7 +114,7 @@ check_irqs(void) br.flags = F_IF; br.code.seg = SEG_BIOS; br.code.offset = (u32)&trampoline_checkirqs; - call16big(&br); + farcall16big(&br); }
// 16bit trampoline for waiting for an irq from 32bit mode. @@ -144,7 +144,7 @@ yield_toirq(void) br.flags = 0; br.code.seg = SEG_BIOS; br.code.offset = (u32)&trampoline_waitirq; - call16big(&br); + farcall16big(&br); }
diff --git a/src/util.c b/src/util.c index c0c40e3..c7a22fc 100644 --- a/src/util.c +++ b/src/util.c @@ -32,17 +32,17 @@ cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx) // Call a function with a specified register state. Note that on // return, the interrupt enable/disable flag may be altered. inline void -call16(struct bregs *callregs) +farcall16(struct bregs *callregs) { if (!MODESEGMENT && getesp() > BUILD_STACK_ADDR) panic("call16 with invalid stack\n"); asm volatile( #if MODE16 == 1 - "calll __call16\n" + "calll __farcall16\n" "cli\n" "cld" #else - "calll __call16_from32" + "calll __farcall16_from32" #endif : "+a" (callregs), "+m" (*callregs) : @@ -50,13 +50,13 @@ call16(struct bregs *callregs) }
inline void -call16big(struct bregs *callregs) +farcall16big(struct bregs *callregs) { ASSERT32FLAT(); if (getesp() > BUILD_STACK_ADDR) panic("call16 with invalid stack\n"); asm volatile( - "calll __call16big_from32" + "calll __farcall16big_from32" : "+a" (callregs), "+m" (*callregs) : : "ebx", "ecx", "edx", "esi", "edi", "cc", "memory"); @@ -70,7 +70,7 @@ __call16_int(struct bregs *callregs, u16 offset) else callregs->code.seg = SEG_BIOS; callregs->code.offset = offset; - call16(callregs); + farcall16(callregs); }
diff --git a/src/util.h b/src/util.h index dece637..5357841 100644 --- a/src/util.h +++ b/src/util.h @@ -198,8 +198,8 @@ struct descloc_s { // util.c void cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx); struct bregs; -inline void call16(struct bregs *callregs); -inline void call16big(struct bregs *callregs); +inline void farcall16(struct bregs *callregs); +inline void farcall16big(struct bregs *callregs); inline void __call16_int(struct bregs *callregs, u16 offset); #define call16_int(nr, callregs) do { \ extern void irq_trampoline_ ##nr (); \