[Xorg-driver-geode] switching consoles with GeodeLX

Bart Trojanowski bart at jukie.net
Fri Feb 1 20:04:26 PST 2008


I hacked up the emulator again, resurrecting some patches that I used to
debug the other issue...

* Bart Trojanowski <bart at jukie.net> [080201 15:48]:
>
>     c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE!
>

So it seems that when calling INT 10/00 to reset the mode back to VGA
(I've tried a few different modes, it doesn't seem to make a
difference).  The emulator executes a 200+ instructions that seem to
make some sense at a glace.

Then, it tries to execute:

        PUSH %EDX
        PUSH %ECX
        PUSH %EAX
        MOV  $1, %EAX
        MOV  %AL, (...)

This is where the emulator stops decoding.  I haven't looked at what
"..." is, but I know it's an 8bit memory offset.  This instruction is
encoded in opcode 0xA2.

The VGA BIOS uses the C000 segment for both data and code; it's common
for the BIOS to store variables right with the code.  In this case the
code is storing a 1 at a memory location ~127 bytes around the current
IP pointer.

Given the error that is printed, I am lead to believe that 0xA2 is not
allowed in x86 real mode... or at least as per some spec.  I guess the
real CPU does execute this opcode, and I think I can easily emulate it.

I'll run some experiments on a live CPU to make sure that I understand
what MOV-moffset8-AL instruction really does and then try to put that
support into x86emu.  And while I am at it, I might as well emulate 0xA3
which is a 16bit offset variant of the same thing.

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/


More information about the Xorg-driver-geode mailing list