[SeaBIOS] SeaVGABIOS crash on FC13 X11

Kevin O'Connor kevin at koconnor.net
Sun Mar 10 04:56:26 CET 2013


On Sun, Mar 10, 2013 at 02:42:09AM +0000, Julian Pidancet wrote:
> Pleasure :) Tell me if you find anything.

Sigh.  It's another x86emu bug.  It was fixed in Xorg server with
commit bb18f277 (x86emu: Fix more mis-decoding of the data prefix).
Basically, "calll" isn't supported.

The patch below (which is not fully correct, but demonstrates the
problem) fixes SeaVGABIOS bochsvga on fc13 and fc14.  fc11 and fc12
are still crashing - not sure if it's something different though.

Ughh.
-Kevin


diff --git a/src/entryfuncs.S b/src/entryfuncs.S
index ea6f990..c37fec1 100644
--- a/src/entryfuncs.S
+++ b/src/entryfuncs.S
@@ -93,7 +93,8 @@
         movl %esp, %ebx         // Backup %esp, then zero high bits
         movzwl %sp, %esp
         movl %esp, %eax         // First arg is pointer to struct bregs
-        calll \cfunc
+        pushw %ax
+        callw \cfunc
         movl %ebx, %esp         // Restore %esp (including high bits)
         POPBREGS
         .endm
diff --git a/tools/vgafixup.py b/tools/vgafixup.py
index 52fb934..2493f35 100644
--- a/tools/vgafixup.py
+++ b/tools/vgafixup.py
@@ -28,6 +28,8 @@ def main():
             out.append('retw $2\n')
         elif sline == 'leave':
             out.append('movl %ebp, %esp ; popl %ebp\n')
+        elif sline.startswith('call'):
+            out.append('pushw %ax ; callw' + sline[4:] + '\n')
         else:
             out.append(line)
     infile.close()



More information about the SeaBIOS mailing list