]> xenbits.xensource.com Git - seabios.git/commitdiff
Don't assume __call16_from32 and __call16 are linear in romlayout.S.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 18 Jan 2009 01:57:11 +0000 (20:57 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 18 Jan 2009 01:57:11 +0000 (20:57 -0500)
The rom layouts can be dynamic, so don't try to "fall through" to the
    next function.

src/romlayout.S

index 196178ee736ee88352e9c61919501f76b32ca1d9..4676d2fe55434b780644457ca217abc17f433313 100644 (file)
@@ -157,6 +157,7 @@ entry_post:
         movw $SEG_BDA, %ax
         movw %ax, %ds
         movw BDA_ebda_seg, %ax
+        // XXX - should verify ebda_seg looks sane.
         movw %ax, %ss
         movw %ax, %ds
         movl $EBDA_OFFSET_TOP_STACK, %esp
@@ -268,10 +269,11 @@ __call16big_from32:
 
         popl %eax
 
-        // Set __call16 return address to be transition32
-        pushl $transition32
+        // Make call.
+        calll __call16
 
-        // Fall through to __call16
+        // Return via transition32
+        jmp transition32
 
 
 // Call a 16bit function from 16bit mode with a specified cpu register state