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()
On Sat, Mar 09, 2013 at 10:56:26PM -0500, Kevin O'Connor wrote:
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.
Almost assuredly the issue on FC12 and earlier is x86emu not supporting the "leal" instruction (which was fixed in xorg server commit f57bc0ede - x86emu: Respect the LEA 67h address size prefix.).
I think this one is a show-stopper - gcc uses the leal instruction in various math calculations, so the upper bits can't just be discarded. I'm not sure there is an easy way to fix them up.
:-(
-Kevin