summaryrefslogtreecommitdiff
path: root/src/romlayout.S
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-24 17:48:28 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-10-11 13:41:54 -0400
commit2342129449c2191f048d4d86153940fde35719b1 (patch)
tree1d982601c399f9655af8e1504717c37f23373ff4 /src/romlayout.S
parenteb88bf7db541aa2dd70cae869238cfb3003efb56 (diff)
downloadqemu-seabios-2342129449c2191f048d4d86153940fde35719b1.tar.gz
Move call16() functions from romlayout.S to inline assembler in stacks.c
Use inline assembler in call16 type functions instead of using __call16() in romlayout.S. Since call16() and call16big() are now only called with %ss==0 they do not need to update the stack pointer. Only call16_sloppy() requires the stack manipulation code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/romlayout.S')
-rw-r--r--src/romlayout.S42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/romlayout.S b/src/romlayout.S
index 028d1e8..0651112 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
@@ -129,48 +129,6 @@ transition16big:
movl %ecx, %eax
jmpl *%edx
-// Call a 16bit SeaBIOS function from SeaBIOS 32bit C code.
-// %ecx = calling function
-// Clobbers: %ecx, %edx, flags, segment registers, idt/gdt
- DECLFUNC __call16
- .global __call16big
- .code32
-__call16:
- pushl %edx
- pushl %ecx
- movl $1f, %edx
- jmp transition16
-__call16big:
- pushl %edx
- pushl %ecx
- movl $1f, %edx
- jmp transition16big
-
- // Make call.
- .code16
-1: movl $_zonelow_seg, %edx // Adjust %ds, %ss, and %esp
- movl %edx, %ds
- movzwl StackSeg, %edx
- movl %edx, %ecx
- shll $4, %ecx
- movl %edx, %ss
- subl %ecx, %esp
- movl %edx, %ds
-
- popl %ecx // Call function
- popl %edx
- calll *%ecx
-
- movl %ss, %edx // Readjust %esp
- shll $4, %edx
- addl %edx, %esp
-
- // Return via transition32
- movl $(2f + BUILD_BIOS_ADDR), %edx
- jmp transition32
- .code32
-2: retl
-
/****************************************************************
* External calling trampolines