]> xenbits.xensource.com Git - seabios.git/commitdiff
Minor - move call16 assembler in romlayout.S.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 29 Sep 2013 23:25:44 +0000 (19:25 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 15 Oct 2013 01:37:56 +0000 (21:37 -0400)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/romlayout.S

index 37a02644623acda7f7213ed62a19bb6237c5c4ff..2a5ddff4f01e582fc43e842f8576214453c003c1 100644 (file)
@@ -14,7 +14,7 @@
 
 
 /****************************************************************
- * Call trampolines
+ * 16bit / 32bit call trampolines
  ****************************************************************/
 
 // Place CPU into 32bit mode from 16bit mode.
@@ -127,9 +127,37 @@ transition16big:
         movl %ecx, %eax
         jmpl *%edx
 
+// Call a 16bit SeaBIOS function from SeaBIOS 32bit C code.
+// %ebx = calling function
+// Clobbers: %ecx, %edx, flags, segment registers, idt/gdt
+        DECLFUNC __call16
+        .global __call16big
+        .code32
+__call16:
+        movl $1f, %edx
+        jmp transition16
+__call16big:
+        movl $1f, %edx
+        jmp transition16big
+
+        // Make call.
+        .code16gcc
+1:      calll *%ebx
+        // Return via transition32
+        movl $(2f + BUILD_BIOS_ADDR), %edx
+        jmp transition32
+        .code32
+2:      retl
+
+
+/****************************************************************
+ * External calling trampolines
+ ****************************************************************/
+
 // Far call a 16bit function from 16bit mode with a specified cpu register state
 // %es:%eax = address of struct bregs
 // Clobbers: %e[bcd]x, %e[ds]i, flags
+        .code16gcc
         DECLFUNC __farcall16
 __farcall16:
         // Save %eax, %ebp
@@ -188,29 +216,6 @@ __farcall16:
 
         retl
 
-// Call a 16bit SeaBIOS function from SeaBIOS 32bit C code.
-// %ebx = calling function
-// Clobbers: %ecx, %edx, flags, segment registers, idt/gdt
-        DECLFUNC __call16
-        .global __call16big
-        .code32
-__call16:
-        movl $1f, %edx
-        jmp transition16
-__call16big:
-        movl $1f, %edx
-        jmp transition16big
-
-        // Make call.
-        .code16gcc
-1:      calll *%ebx
-        // Return via transition32
-        movl $(2f + BUILD_BIOS_ADDR), %edx
-        jmp transition32
-        .code32
-2:      retl
-
-        .code16gcc
 // IRQ trampolines
         .macro IRQ_TRAMPOLINE num
         DECLFUNC irq_trampoline_0x\num