summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2016-02-17 00:16:49 +0100
committerMichael Brown2016-02-17 00:16:49 +0100
commit9dc340d73538ecac72851407b4865e2a778589f8 (patch)
treeee9cd35ca98f6da05cfe33b9a3cc8821ae5eb5bd
parent[bios] Add bin-x86_64-pcbios build platform (diff)
downloadipxe-9dc340d73538ecac72851407b4865e2a778589f8.tar.gz
ipxe-9dc340d73538ecac72851407b4865e2a778589f8.tar.xz
ipxe-9dc340d73538ecac72851407b4865e2a778589f8.zip
[librm] Discard argument as part of return from prot_call()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/arch/i386/interface/syslinux/comboot_call.c6
-rw-r--r--src/arch/x86/core/dumpregs.c1
-rw-r--r--src/arch/x86/interface/pcbios/bios_console.c1
-rw-r--r--src/arch/x86/interface/pxe/pxe_entry.S1
-rw-r--r--src/arch/x86/prefix/dskprefix.S1
-rw-r--r--src/arch/x86/prefix/exeprefix.S1
-rw-r--r--src/arch/x86/prefix/hdprefix.S1
-rw-r--r--src/arch/x86/prefix/libprefix.S1
-rw-r--r--src/arch/x86/prefix/lkrnprefix.S1
-rw-r--r--src/arch/x86/prefix/nbiprefix.S1
-rw-r--r--src/arch/x86/prefix/pxeprefix.S1
-rw-r--r--src/arch/x86/prefix/romprefix.S1
-rw-r--r--src/arch/x86/prefix/undiloader.S4
-rw-r--r--src/arch/x86/transitions/librm.S6
-rw-r--r--src/arch/x86/transitions/librm_test.c1
15 files changed, 6 insertions, 22 deletions
diff --git a/src/arch/i386/interface/syslinux/comboot_call.c b/src/arch/i386/interface/syslinux/comboot_call.c
index 22848006..37cba1b7 100644
--- a/src/arch/i386/interface/syslinux/comboot_call.c
+++ b/src/arch/i386/interface/syslinux/comboot_call.c
@@ -663,7 +663,7 @@ void hook_comboot_interrupts ( ) {
"pushl %0\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addw $4, %%sp\n\t"
+ "clc\n\t"
"call patch_cf\n\t"
"iret\n\t" )
: : "i" ( int20 ) );
@@ -675,7 +675,7 @@ void hook_comboot_interrupts ( ) {
"pushl %0\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addw $4, %%sp\n\t"
+ "clc\n\t"
"call patch_cf\n\t"
"iret\n\t" )
: : "i" ( int21 ) );
@@ -687,7 +687,7 @@ void hook_comboot_interrupts ( ) {
"pushl %0\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addw $4, %%sp\n\t"
+ "clc\n\t"
"call patch_cf\n\t"
"iret\n\t" )
: : "i" ( int22) );
diff --git a/src/arch/x86/core/dumpregs.c b/src/arch/x86/core/dumpregs.c
index 82dc2184..d23988d3 100644
--- a/src/arch/x86/core/dumpregs.c
+++ b/src/arch/x86/core/dumpregs.c
@@ -9,7 +9,6 @@ void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) {
"pushl $_dump_regs\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addr32 leal 4(%%esp), %%esp\n\t"
"ret\n\t" ) : : );
printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
diff --git a/src/arch/x86/interface/pcbios/bios_console.c b/src/arch/x86/interface/pcbios/bios_console.c
index cfffd954..364c294d 100644
--- a/src/arch/x86/interface/pcbios/bios_console.c
+++ b/src/arch/x86/interface/pcbios/bios_console.c
@@ -536,7 +536,6 @@ static void bios_inject_startup ( void ) {
"pushl %0\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addw $4, %%sp\n\t"
"\n1:\n\t"
"popfw\n\t"
"ljmp *%%cs:int16_vector\n\t" )
diff --git a/src/arch/x86/interface/pxe/pxe_entry.S b/src/arch/x86/interface/pxe/pxe_entry.S
index 07852cd5..84eba1e0 100644
--- a/src/arch/x86/interface/pxe/pxe_entry.S
+++ b/src/arch/x86/interface/pxe/pxe_entry.S
@@ -123,7 +123,6 @@ pxenv_entry:
pushl $pxe_api_call
pushw %cs
call prot_call
- addl $4, %esp
lret
.size pxenv_entry, . - pxenv_entry
diff --git a/src/arch/x86/prefix/dskprefix.S b/src/arch/x86/prefix/dskprefix.S
index 7aa017cc..d716a30f 100644
--- a/src/arch/x86/prefix/dskprefix.S
+++ b/src/arch/x86/prefix/dskprefix.S
@@ -373,7 +373,6 @@ start_runtime:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/exeprefix.S b/src/arch/x86/prefix/exeprefix.S
index 5c648d51..35061b15 100644
--- a/src/arch/x86/prefix/exeprefix.S
+++ b/src/arch/x86/prefix/exeprefix.S
@@ -151,7 +151,6 @@ _exe_start:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/hdprefix.S b/src/arch/x86/prefix/hdprefix.S
index 1d012d80..9f5752aa 100644
--- a/src/arch/x86/prefix/hdprefix.S
+++ b/src/arch/x86/prefix/hdprefix.S
@@ -102,7 +102,6 @@ start_image:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/libprefix.S b/src/arch/x86/prefix/libprefix.S
index 3cdb6ec9..897a6656 100644
--- a/src/arch/x86/prefix/libprefix.S
+++ b/src/arch/x86/prefix/libprefix.S
@@ -880,7 +880,6 @@ payload_death_message:
movw %ax, (prot_call_vector+2)
pushl $relocate
lcall *prot_call_vector
- popl %edx /* discard */
/* Copy code to new location */
progress " copy\n"
diff --git a/src/arch/x86/prefix/lkrnprefix.S b/src/arch/x86/prefix/lkrnprefix.S
index 64135e14..34e2bdc8 100644
--- a/src/arch/x86/prefix/lkrnprefix.S
+++ b/src/arch/x86/prefix/lkrnprefix.S
@@ -200,7 +200,6 @@ no_cmd_line:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/nbiprefix.S b/src/arch/x86/prefix/nbiprefix.S
index 16c79566..539b5eba 100644
--- a/src/arch/x86/prefix/nbiprefix.S
+++ b/src/arch/x86/prefix/nbiprefix.S
@@ -69,7 +69,6 @@ _nbi_start:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/pxeprefix.S b/src/arch/x86/prefix/pxeprefix.S
index 465ce434..c742add6 100644
--- a/src/arch/x86/prefix/pxeprefix.S
+++ b/src/arch/x86/prefix/pxeprefix.S
@@ -823,7 +823,6 @@ run_ipxe:
pushl $main
pushw %cs
call prot_call
- popl %ecx /* discard */
/* Uninstall iPXE */
call uninstall
diff --git a/src/arch/x86/prefix/romprefix.S b/src/arch/x86/prefix/romprefix.S
index 8974c539..57eb31af 100644
--- a/src/arch/x86/prefix/romprefix.S
+++ b/src/arch/x86/prefix/romprefix.S
@@ -807,7 +807,6 @@ exec: /* Set %ds = %cs */
pushl $main
pushw %cs
call prot_call
- popl %eax /* discard */
/* Set up flat real mode for return to BIOS */
call flatten_real_mode
diff --git a/src/arch/x86/prefix/undiloader.S b/src/arch/x86/prefix/undiloader.S
index 5cace44b..95266133 100644
--- a/src/arch/x86/prefix/undiloader.S
+++ b/src/arch/x86/prefix/undiloader.S
@@ -41,9 +41,7 @@ undiloader:
pushw %ax
pushw $prot_call
lret
-1: popw %bx /* discard */
- popw %bx /* discard */
- /* Restore registers and return */
+1: /* Restore registers and return */
popw %bx
popw %es
popw %ds
diff --git a/src/arch/x86/transitions/librm.S b/src/arch/x86/transitions/librm.S
index 863e2241..bf79637a 100644
--- a/src/arch/x86/transitions/librm.S
+++ b/src/arch/x86/transitions/librm.S
@@ -134,7 +134,6 @@ init_librm:
pushl $init_idt
pushw %cs
call prot_call
- popl %eax /* discard */
/* Restore registers */
negl %edi
@@ -385,8 +384,8 @@ rm_gdtr:
*
* Example usage:
* pushl $pxe_api_call
+ * pushw %cs
* call prot_call
- * addw $4, %sp
* to call in to the C function
* void pxe_api_call ( struct i386_all_regs *ix86 );
****************************************************************************
@@ -455,7 +454,7 @@ pc_rmode:
*/
addr32 movl -20(%esp), %esp
popfl
- lret
+ lret $4
/****************************************************************************
* real_call (protected-mode near call, 32-bit virtual return address)
@@ -554,7 +553,6 @@ flatten_real_mode:
pushl $flatten_dummy
pushw %cs
call prot_call
- addw $4, %sp
/* Restore GDT */
movb $0x00, real_cs + 6
movb $0x00, real_ds + 6
diff --git a/src/arch/x86/transitions/librm_test.c b/src/arch/x86/transitions/librm_test.c
index 496d5612..f86584e3 100644
--- a/src/arch/x86/transitions/librm_test.c
+++ b/src/arch/x86/transitions/librm_test.c
@@ -108,7 +108,6 @@ static void librm_test_exec ( void ) {
"pushl %k3\n\t"
"pushw %%cs\n\t"
"call prot_call\n\t"
- "addw $4, %%sp\n\t"
"rdtsc\n\t" )
: "=a" ( stopped ), "=d" ( discard_d ),
"=R" ( started )